GitHub for agent behavior
Fork, diff, test, and roll back agent behavior — just like code.
Designed for multi-step, tool-using, stateful systems.
Subtext detects redundant tool calls and helps you optimize agent behavior
Everything you need to ship reliable agents
From local development to production monitoring, Subtext gives you visibility and control over your AI agents.
Version Control for Agents
Track every change to your agent's behavior. See exactly what changed between runs.
Behavioral Comparison
Compare versions by success rate, cost, and tool usage — not just text diffs.
Instant Rollback
Something broke? Roll back to a working version in one click.
How it works
Get started in minutes with just a few lines of code
Instrument your agent
Add the @trace decorator to your agent function
@trace(subtext, prompt="router")
def route_ticket(ticket: str):
response = client.messages.create(...)
return responseRun your agent
Every execution is automatically captured with full context
result = route_ticket("Help with billing")
# ✓ Trace captured automatically
# ✓ Tokens, cost, duration tracked
# ✓ Version created on changesCompare & optimize
See behavioral metrics, get AI recommendations, rollback if needed
Compare v1.2 vs v1.3:
✓ Success rate: 85% → 92%
✓ Avg cost: $0.08/1K → $0.05/1K
✓ Tool calls: 3x → 1xReady to ship better agents?
Join developers who are using Subtext to build reliable AI agents.
Get Started Free