[email protected]
Portfolio / rtech-agents

rtech-agents

Open source under the MIT licence. View the source

A runtime for long-running, steerable AI agents, each a managed Claude or Codex session supervised by its own daemon and coordinated over NATS.

rtech-agents

The problem

One-shot agent calls (claude -p) cannot be steered mid-turn, and chat-driven coordination loses track of task ownership. This keeps one persistent session per agent, lets a person steer it, and decides a task is done from the graph of typed frames on the bus rather than a magic token in the model's reply.

How it works

Each agent daemon (rtech-agentd) holds one persistent engine session, takes work from typed frames on NATS, talks to people through Discord, Telegram or a small web chat, composes its identity from SOUL.md / USER.md / KERNEL.md, and keeps memory in Open Brain. An orchestrator derives completion from the frame graph. Agents are config: an agent.yaml per agent, with credentials as references and a loader that rejects raw secrets. It rides on the sibling fleet-bus repo.

How rtech-agents works

Features

  • Typed wire frames: TaskFrame, TurnFrame, SteerFrame, StatusFrame
  • Per-agent supervisor with NATS ingress/egress, mid-turn steering and Open Brain memory
  • Orchestrator that derives done from the frame graph
  • Chat edges for Discord and Telegram plus a local web chat
  • Persona loader that scans and caps the three Markdown identity files
  • Cron-scheduled task minter

How it was built

The repository was scaffolded on 2026-07-07 after an audit of a third-party agent gateway found that its hard problems all came from agents coordinating through chat: mention gates, bot-to-bot rules and missed hand-offs.

The first build was a uv workspace with three packages: a persona loader, a chat edge and a per-agent daemon with NATS ingress, proven by a walking-skeleton round trip.

The first spec still let agents signal completion with a done marker in their reply. The plan of record on 2026-07-10 deleted that marker, made NATS the only source of truth and introduced a typed-frame contract as the keystone.

Every frame is validated at both ends, so a malformed frame fails in the sender instead of a consumer. Completion is derived from the frame graph, so a model cannot forget to say done.

AI coding agents wrote most of the 205 commits. Rico made the design correction, on the reasoning that rules living only as prompt prose were the failure the setup had just spent weeks removing.