Production LLM Agent Runtime
Trust and safety mechanics for an agent platform: canonical-hash verification, YAML write-safety, and a CI check that blocks stub implementations.
- 71 endpoints shipped (team)
- 5,900+ tests (team)
- 100+ model providers (team)
- < 4 months time to ship (team)
- Python
- FastAPI
- WebSocket
- PostgreSQL
- pgvector
- pytest
Problem
An agent runtime that writes files and executes tools on a user’s behalf needs verifiable trust boundaries — a way to know that what an agent is about to write is safe, that what it claims to have verified was actually verified, and that a stub implementation quietly masquerading as a real one gets caught before it ships.
Constraints
Two things shaped the work. First, the CLI is used non-interactively — in scripts and pipelines — so it needs a stable exit-code contract that callers can depend on rather than parsing output text to guess whether something succeeded. Second, this is a large, multi-contributor codebase, and a large multi-contributor codebase invites plausible-looking stubs: code that has the right shape and passes a shallow review but doesn’t actually do the thing it claims to.
Design
I’m contributing to a production platform spanning FastAPI REST and WebSocket services, PostgreSQL with pgvector, a non-interactive CLI, and integrations with more than 100 model providers. My own contributions to date are the trust and safety mechanics: YAML write-safety checks before an agent’s file writes land, canonical-hash trust verification so a claim of “this was verified” can actually be checked, configurable memory controls, the CLI’s exit-code contract, and an AST-based CI check that statically inspects implementations and rejects ones that are stubs rather than working code. I also maintain the design and requirements documentation for these pieces through version-controlled changes in Git.
Outcome
These are still early days for this platform, so the headline numbers here are team-level, not individual: across the team, the platform shipped 71 endpoints and more than 5,900 tests in under four months, with support for more than 100 model providers. My own contributions are the specific mechanisms above — write-safety, trust verification, memory controls, the exit-code contract, and the anti-stub CI check — rather than the endpoint or test count as a whole.