Open source · Apache 2.0 · runs at home

Rahat, my agent platform

Rahat is the agent platform I built; seven agents run on it. Miya is the one I talk to. The platform owns routing, the harness an agent's answers run through, the evals, the policy checks, the ledger and the spend brake; an agent brings its job. It runs around the clock on a Mac mini at home.

The Rahat map: a message goes from Telegram through Miya's rules to the agent that answers it, past the checks and into the shared record
A /week message moving through Miya and the platform under it, from Telegram to Kobe, the agent that answers it.Open the live page ↗
  • 7 agents
  • 2 on the harness
  • 4 doors
  • 4,209 tests
  • 86 real asks in private eval sets

Agents, harness agents and doors counted Nov 1 and tests Oct 17, in the repo; the eval sets (Oct 17) are private, so that one is my count.

Four product decisions

A few weeks after I started talking to Miya, it told me something about myself that had never been true, in a flawless voice. That's when I stopped adding features and started making decisions like these.

DecisionInstead ofWhat it bought
Check every answer in code before it's sentRewriting the prompt ten timesI replayed 126 real messages: replies with the agents' internal notes leaking into them went to zero, and about one reply in twenty had a mistake caught and fixed before it reached me.
Build one shared engine that every new agent plugs intoA new engine for each agentThe running coach plugged in as the second agent, and the food agent's 72 test cases came out exactly the same as before.
Don't let an AI grader decide until it agrees with meTrusting a second AI to grade answers from day oneIt has graded 214 answers with no say yet; it earns a vote after it matches my own judgment on 50 answers, 8 times in 10.
Numbers come from code, not from the AITelling the AI not to make up numbersA message with a number the code didn't compute is never sent. Checked against my old coaching chat: 24 numbers, 18 match, 6 still need data, 0 wrong.

Rahat in agent-platform terms

Rahat is personal scale, not enterprise software. But it has the parts an agent platform needs, and here they are in the words agent-platform teams use, with what's live and what isn't.

What it's calledIn RahatStatusCode
Orchestration and routingMiya: 16 rules in code, then Miya's model, which hands work to six specialistsLive. Routing by what each agent declares it can do: planneddelegate_classifier.py
Agent harnessOne eight-step loop the platform owns, not the agent (ADR-018)Live for Bourdain (Oct 4) and Kipchoge (Nov 1)core/harness/
Agent registry and manifestsAgents register at boot; a harness agent declares its tools, budgets, outcomes and shapes in a manifest checked in code, with a conformance testLive for the two harness agents. Huberman isn't registered for hand-offs yetcore/manifest.py
Tool accessTools allow-listed per agent; a brake per ask (Bourdain: 12 tool calls, 10 searches, $0.50)Live in the harness. MCP: not builtmanifest.json
Guardrails and output checksA validator on Miya's replies (7 checks); Fraser's contract (10); numbers from recordsLivevalidator.py
Human in the loopThe judge gets authority only from my labels; a failed answer is repaired once or says what failedLive. Approval before a risky action: not builtcontrol.py
EvalsEvery model and tool call recorded against its request; 86 real asks replay for $0; public tests on synthetic twinsLivecassette.py
Policy engineThe CharterLive for Genie's calendar writes. Kobe's policies and Miya's nudges don't route through it yetcharter.py
Audit trailThe decision ledger: agent, rule, latency and cost per decisionLivedecisions.py
Spend controlsA cost ledger, a budget gate on the newer paths, and the per-ask brakePartial: Miya's synthesizer isn't metered yetbudget.py
MemoryTyped memory the agents shareIn daily use. Nightly consolidation: not scheduled since Maycore/memory/
Access controlThe household gate: only paired phones get inLivegenie_runner/
Leak preventionA push that would publish a name, an address, a token or a chat id is refusedLivepre-push

Gaps I know about are pinned as tests marked SAFETY TARGET and expected to fail, so each one stays named in the suite until it's closed.

Three loops

Three loops do most of the work: one answers, one tests, one keeps fixed bugs fixed.

LoopWhat runsWhat I measure
The answer loop (the harness)Understand → set the bar → do the work under a brake → check in code → a second AI grades, in shadow → one repair or say what failed → fill numbers from records → keep a recordOutcomes passed and failed per answer, repairs per answer, cost per answer, time to answer
The eval loopEvery model and tool call is recorded against its request; the private test sets (72 food questions, 14 weekend questions) replay with no network and no bill; the judge grades in shadow until it agrees with my labelsPass rate per release; the judge's agreement with my labels; the snapshot diff when the platform changes
The fix loopA failure in real use becomes a regression test; a fix without its own test is refused; the pre-push gate runs the unit, contract and regression layers and the private-words checkTests added per fix (1,877 tests in 219 regression pins, Oct 17); a known-fixed bug coming back blocks the push

What's running today

Everything reaches me through Telegram. A door is a way to reach an agent directly: Miya's is where I ask almost everything, Genie has one for the household, Bourdain has one while it's being tested, and Kipchoge has one for my runs. Kobe, Fraser and Huberman answer only through Miya. Dates are when each count was taken.

WhatStatusAs ofCode
A validator on Miya's repliesLive. Seven checks against the facts on record; the reply is rewritten before it sends.Oct 17validator.py
Fraser's workout contractLive. Ten checks in code and one repair pass; anything still unverified is named in the reply.since Oct 11contract.py
The harnessOne eight-step loop an answer runs through, owned by the platform rather than the agent.Bourdain since Oct 4; Kipchoge, the running coach, since Nov 1, the first agent to bring its own shapes (amendment A6). Fraser uses the contract step.Nov 1The harness ↗
Numbers from recordsThe model writes a placeholder where a number goes; code fills it from a record.Live for Kipchoge. A message with a number that has no record behind it isn't sent.Nov 1numbers.py
The judgeA second model that grades what code can't, like taste and fit.Shadow. 214 verdicts recorded and none acted on; it has 3 of the 50 labels of mine it needs before it gets a vote.Oct 17judge.py
Knowledge with receiptsEach fact carries where it came from and when.326 places and 3,397 facts in Bourdain's knowledge base, each with its source and the date it was read.Oct 14agents/bourdain/
Replays for $0Every model and tool call is recorded against its request, so a run replays with no network and no bill.The golden sets, 86 real asks (72 food, 14 weekend), stay private. The public tests run on synthetic twins, look-alikes with nothing real in them.Oct 17cassette.py
The decision ledger7,408 rows: which agent, which rule, how long, what it cost.Oct 14decisions.py
Tests4,209 in the full suite. The unit, contract and regression layers run before every push.Oct 17tests/

How an agent joins the platform

A new agent brings five things: a manifest (its tools, budgets, latency and capabilities), an outcome library (what a good answer must meet: Bourdain 52, Kipchoge 19), a checklist for the judge (21 and 8 criteria), its own shapes (what it reads, what it answers, what counts as evidence) and its tests. The platform brings the loop, the spending brake, the ledger, the judge, the controller and the record.

The gate before it serves: a conformance test, and the first agent's 72-case snapshot unchanged, byte for byte. Kipchoge, the running coach, went through it: the shapes amendment was accepted on Oct 25, and it went live on its own Telegram bot on Nov 1.

Each agent starts on its own door, with its own tests, where its failures can't break anything else; when it passes, it's wired in behind Miya, and Miya stays the one place I ask.

Orchestration is the part I'm least done with. Today sixteen rules in code answer the asks they recognize, most without a model, and Miya's model handles the rest. Routing each ask by what every agent declares it can do is planned, not built.

Read how Rahat actually runs ↗