Railtracks (@_railtracks_) header
Railtracks (@_railtracks_) profile picture

Build your own AI agent harness in plain Python. Tools are functions, every run is replayable, no YAML or DSL. Open source, MIT.

Joined November 2026
Your agent's model will change every few months. The harness around it shouldn't have to. Railtracks is an open-source Python framework for building your own agent harness: the loop, tools, context, controls, and a replayable record of every run. Plain Python. MIT.
2
4
8
291
1/ Thanks to @Diyi_Yang, @michaelryan207 and @jyangballin for putting Stanford's CS329Z online, lecture videos and slides, for anyone to learn from. We wanted to help in our own small way, so we're turning their agent design patterns into runnable Railtracks examples 🧵
1
4
139
5/ What makes this orchestrator-workers rather than parallelization: the lead decides what the subtasks are. Same flow, but the diff fixes a typo in the README: no reviewers called. One model call, 2.07s, $0.001, compared with 14.84s and $0.010 for the SQL diff.
1
2
19
6/ Over the next few weeks we plan on covering the other four workflow patterns, then the lecture's reasoning and context patterns. Slides: web.stanford.edu/class/cs329… Railtracks (MIT): github.com/RailtownAI/railtr…
3
19
1/ When your model provider has a bad day, your agent doesn't have to go down with it. A Railtracks pattern for that: fall back to another node, and see every attempt in the trace 🧵
1
2
5
63
4/ The run still shows as Completed, with the backup's tokens and cost counted. The primary node stays marked Failed, so you can see it fell over. Backups are whole agents, so each one can have its own prompt or tools too, not just a different model.
1
12
1/ Most RAG ingest scripts re-embed every file on every run, and one unreadable file takes the whole run down. Railtracks retrieval does neither 🧵 Loader → chunker → embedder → store, in plain Python. Swap any piece.
1
3
8
130
4/ To give an agent the store, call runtime.retrieve inside a tool. Asked "I've ridden my new bike twice. Can I still send it back?", it found the policy and answered with the 14-day store credit rule.
1
1
27
Also handles: • Docs from files, PDFs, CSV, SQL, S3, GCS, Azure Blob, Hugging Face • Vectors in memory, Chroma or pgvector • Per-customer separation with StoreScope • An error, not junk results, if you switch embedding models docs.railtracks.org/retrieva…
23
1/ Your billing support bot will happily write someone's cover letter, and you pay for the tokens. New in Railtracks: ScopeGuard 🧵 Describe what your agent covers in one sentence. A small judge model checks every request against it before your agent's model runs.
1
1
6
245
Every call the judge makes is in the trace, label and reason included. This one cost $0.00006 (326 tokens in, 59 out), and the billing agent's own model was never called.
2
2
27
Three sensitivity levels: LOW: only labels. Run it before launch to see what would get blocked MEDIUM (default): blocks OUT_OF_SCOPE HIGH: also blocks UNKNOWN If the judge goes down, requests go through by default. docs.railtracks.org/document…
2
21