AxonSpark
A nervous system for agents. Routing, reflex and arbitration between a brain
and its muscles, with no prompt files anywhere.

The problem
An agent's skills, memory, tools and preferences usually live in markdown. The
model re-reads them every session, they cost tokens on every turn, they cannot
be diffed in a review, and they are advisory, so the model can ignore them.
Every run starts from near zero and nothing learned last week is structural.
The idea
Split the system in three and never let the parts blur.
| Brain | what | a language model, slow, optional |
| Axon | when and how much | a graph of edges, no model |
| Muscle | nothing, it executes | one action, honest report |
The load bearing rule: a reflex must be able to bypass the brain. If
remembering something requires calling a model, a fast reflex dies. That is
what makes this a nervous system rather than a very elaborate prompt, and it
is the part that would carry to a robot unchanged.
Everything hangs off an edge, which is why there are no prompt files:
- a skill is an edge with parameters
- memory is an edge that scores
- a tool is a muscle
- a reflex is an edge whose route ignores the brain entirely
Why not a vector store
Retrieval is good at "find things like this" and bad at "follow this exactly".
A vector cannot carry a feedback loop, and a motor skill is not a paragraph
about moving a joint, it is sense, act, measure, correct. Embedding skills also
loses exact commands, grep-ability and reviewable diffs. So the graph holds
the procedure and memory scores it. Vectors may still earn a place for
episodic recall, the rung where "last time this happened" genuinely helps. That
is a later experiment, not the foundation.
v0.1, what actually works
A safety reflex that fires with no brain in the loop, which is the property the
whole architecture rests on.
use axonspark::{Edge, Nervous, Payload, Routing};
let mut n = Nervous::new();
n.add_edge(Edge::new(
"temp-limit",
100,
|p, _| match p {
Payload::Reading { value, .. } if *value > 80.0 => Routing::Fire,
_ => Routing::Pass,
},
|_| Ok(Payload::Report {
from: "motor-stop".into(),
ok: true,
detail: "stopped at 95.0".into(),
}),
));
let out = n.fire(Payload::sensor("temp", 95.0));
assert_eq!(out.len(), 1);
8 tests, 0 failures, including a_reflex_fires_with_no_brain_in_the_loop,
a_refusal_is_reported_not_swallowed and the_trace_explains_every_decision.
Experimental
This is a spike, deliberately. It is the minimum that proves one reflex works
end to end, not a framework. Expect the edges to move once there is a second
real case to design against.
Build
cargo test
cargo build --release
MIT.