Minimal autonomous systems agent with a microkernel architecture.
rx is not a chatbot.
It is a goal-directed execution engine capable of modifying files,
running commands, invoking tools, and operating locally or in distributed mode.
- Kernel decides.
- Tools act.
- State persists.
- Transport delivers.
The kernel owns reasoning and iteration. Tools own side effects. State is append-only. Transport is replaceable.
If a component grows large, it does not belong in the kernel.
+--------------------------+
| Transport Layer | CLI | HTTP | Worker
+--------------------------+
| Kernel Core | Loop | Dispatch | Control
+--------------------------+
| Tool Runtime | exec | fs | net | custom
+--------------------------+
| State Backend | memory | sqlite | future
+--------------------------+
The kernel:
- Executes the autonomous loop.
- Dispatches tool calls.
- Enforces iteration limits.
- Persists structured events.
The kernel does NOT:
- Implement filesystem logic.
- Execute shell commands directly.
- Handle networking details.
- Depend on specific persistence engines.
Each iteration:
- Observe current state.
- Decide next action (LLM).
- Invoke tool.
- Persist event.
- Evaluate termination.
The loop stops when:
donetool is invoked.- Iteration cap is reached.
- No progress is detected.
- A fatal error occurs.
exec(command)read_file(path)write_file(path, contents)list_dir(path)done(reason)
Tools are stateless from the kernel’s perspective.
cargo build
cargo run -- "create a file hello.txt with content hi"Expected behavior:
- The agent iterates.
- Uses tools.
- Logs structured events.
- Terminates deterministically.
Current runtime flags:
--max-iterations Nset loop iteration cap (default:50)--model NAMEset OpenAI model name (overridesOPENAI_MODEL)--tool-verboseprint tool inputs/outputs from emitted events--debug-log PATHmirror all events to a JSONL debug file--auto-commitrungit add .+ commit after non-donetool outputs when staged diff exists
Example:
cargo run -- --model gpt-4o --max-iterations 25 --tool-verbose --debug-log logs/run.jsonl "audit event flow"Model selection:
- If
OPENAI_API_KEYis set,rxusesOpenAIModel. - If
OPENAI_API_KEYis missing or empty,rxfalls back toMockModel.
Tool registry configuration:
rxreads optional.rx/config.tomland supports a[tools]section.enabledis an allow-list of tool names.disabledis a deny-list applied afterenabled.- Unknown tool names are ignored with warnings.
doneis always enforced to remain registered.
We keep testing lightweight and deterministic. Follow TEST_GUIDELINES.md to craft repeatable tests that respect the kernel constraints and preserve observability.
Phase 1 – Minimal Core
- In-memory state
- Local tools
- Hard iteration cap
- No UI
- No embeddings
- No vector databases
- No agent mesh
- No framework bloat
If rx cannot:
- Run offline
- Resume from disk (Phase 2)
- Be explained in one diagram
It is too complex.
rx must remain small, understandable, and composable.
Complexity is introduced only when forced by real constraints.