Symbolic reasoning in contemporary practice (Autolith)

yo yo yo,
in the last article, we discussed symbolic reasoning at a very high level, in our example, we represented a whale called Moby as a mammal, applied a rule, and recorded a derivation based on that rule. That's very detached from reality, so let's talk more about what's happening in autolith
Autolith, our clanker harness, uses the very same approaches to keep track of knowledge, derive inferences, or organize actions during a task (we actually have seven main applications of neurosymbolic AI in Autolith, but that's for later).
So, for starters:
- Autolith is a live Common Lisp image, which is introspectable
- A language model in interprets requests and chooses actions
- The Lisp runtime manages tools, persistent state, and symbolic operations.
- Tool results or other evidence can become structured facts that inform later work actions.

Facts and evidence
Autolith structured knowledge as facts, we have:
- Predicates, which describe a kind of statement and the types of its arguments
- Facts, which supply argument values for predicate.
For instance, a predicate for an appointment, would associate an event with a start time. If we take a particular event and time, that is a fact.
Facts do not spawn out of thin air, they must have a basis.
For example, file reads can support an observation, while the things a user says can support user assertions. Then, we can also have assumptions and model proposals, which have their own bases.
Evidence connects a claim to its source, so the system can distinguish what was observed from what was proposed.
Autolith can attach multiple supports to the same claim, furthermore, it can identify conflicting values for the key of a predicate.
Imagine two different start times recorded for the same appointment call, that clearly signifies a contradiction and requires us (or the agent), to resolve the conflict before acting facts derived from the time.
Rules, inference, and justifications
Rules connect premises to conclusions. In Autolith, the model proposes rules for recurring calculations and relationships, but the user has to admit rules before it can participate in inference.
Using the example from the previous article, consider the fact mammal(moby) and the rule “if x is a mammal, then x is an animal.” Matching the premise binds x to Moby and yields animal(moby).
In the derivation, we would record the rule, the version of the rule, and its the supporting premise.

Justifications link conclusions to the facts and rules by which they are supported. With (why "ID"), the user can inspect why something is the way it is. (what-changed) reports changes in the knowledge view.

When a supporting fact is retracted or corrected, Autolith reevaluates the affected derivations. A conclusion with another active justification can still hold. This is truth maintenance, which we mentioned last time: the current conclusions are held together by the things that support it and admitted rules.
Rules can also perform calculations. Given an appointment's start time and a travel duration, an admitted rule can derive a departure time. If the appointment time changes, the departure time can be computed again from the updated inputs.
Finally, rules can include guards: conditions that a match must satisfy before its conclusion is derived. Rules can calculate dates, durations, quantities, and other values using the matched facts. The conclusion of one rule can serve as a premise for another, forming a chain, and you can follow the chain back to its origin
Planning and action contracts
The plans in Autolith are a little different from the ones in Codex or Claude. First off, steps can list the facts they require and the facts used to verify the outcome of that steps.
Second, we have task methods describe how to expand a task into smaller tasks or steps. Autolith selects applicable methods using the current fact view and produces a concrete plan.
Action contracts connect facts to tool calls. A contract can specify:
- Requirements: facts that must hold before the call.
- Expected effects: predictions recorded after a successful call.
- Observations: values mapped from the tool call and its result.
When the required facts are missing or conflicting, an admitted contract can refuse the tool call before it runs.
Consider a deployment step:
- A contract can require a passing test result for a particular revision. Its expected effect can record a successful deployment as a prediction.
- A later result or check can supply an observation of the deployed revision.
Keeping those bases distinct lets subsequent steps depend on evidence appropriate to the action.
Before the call, the contract matches its requirements against facts with accepted evidence bases. The match must produce one distinct set of bindings, even when several evidence paths support it.
In the deployment example, the test result and the deployment request must refer to the same revision.
After a successful call, the contract can map fields from the result into observations and record expected effects as predictions. These records include the tool call and the facts that satisfied the requirements, connecting the outcome back to the preconditions.

Procedures and diagnoses
Autolith can learn reusable procedures from repeated tool sequences. Procedure captures a sequence with parameters for values that vary between uses.
We learn a candidate procedure in stages:
- Group traces with the same sequence of tools and identify values that vary between examples.
- Look for values passed from one tool's result into a later call.
- Check whether the candidate explains held-out examples before proposing it.
Procedures save the calls and their results when they run.
Diagnoses organize an investigation around competing hypotheses. Each hypothesis predicts what particular probes will observe.
Autolith can choose probes that distinguish the candidates, run them, and compare observations with predictions.
Imagine, if a service cannot be reached, we can consider three hypotheses:
- Either the service is stopped,
- Or the service is active, but there is a network fault
- Or, the service is active, but a firewall is blocking traffic
A service-status probe distinguishes the first from the other two. If the service is active, the stopped hypothesis is eliminated, but the remaining candidates need another probe.

We will go more in-depth, with more Autolith screenshots in the future o algo
See you,
Lukáš Hozda