Synthetic Worlds.
Realistic worlds for agent evals and RL
Seahaven is our open-source Python framework for building synthetic worlds: working copies of your agent's tools, realistic enough that the agent can't tell the difference.
Simulate your agent's world
A private world for every run
Each instance is its own SQLite database, copied from a fixture in milliseconds and thrown away at the end. The agent can read, write, and even break things without touching anyone else's run.
Freeze known starting states
Freeze starting states like small_startup or big_co once, then reuse them across every run. Same fixture, same clock, same random seed: the same run, every time.
Hundreds of worlds, one process
seahaven serve hosts hundreds of world instances per process, at thousands of requests per second. Each new connection gets its own world.
Grade on state, not transcripts
Every row the agent changed is logged, before and after, in one JSON document. Did the agent refund the right charge? Check the row, not what the agent says it did.
Plugs into what you already use
Every world is an OpenEnv environment, the open standard for RL environments. Evaluate and optimize agents with Kiln, train models with TRL, or publish your world to Hugging Face.
Realistic like production.
Isolated like a mock.
Production is realistic but shared. Mocks are private but fake. Seahaven gets you the realism of production with the isolation of a mock.
| Capability | Seahaven | Production or staging | Hand-written mocks |
|---|---|---|---|
| Realistic tools and data | |||
| Stateful across arbitrary tool calls | |||
| A private instance for every run | |||
| Hundreds of parallel instances | |||
| Every run starts from a known state | |||
| Reproducible | |||
| Every change logged for grading | |||
| Safe for the agent to break things |
A tool is just a Python function.
Seahaven builds each tool's JSON schema from its signature, and the docstring is what the agent reads. Start from the scaffold: schema, tools, tests, a fixture generator, and an AGENTS.md.
@world.tool
def create_lead(ctx: seahaven.Ctx, email: str) -> dict[str, str]:
"""Add a contact to the pipeline as a new lead."""
lead = {"id": ctx.ids.uuid(), "email": email,
"stage": "lead", "updated_at": ctx.clock.iso()}
ctx.db.execute("INSERT INTO contacts VALUES (?, ?, ?, ?)", *lead.values())
return leadEverything a synthetic world needs
Mock AI tool calls, REST APIs, sandboxed SQL, search, or any custom format.
Every instance has its own SQLite database, so a write changes every later read.
Add Stripe World and a chat world to your world, the agent can navigate the combined tool set.
The clock and seed are wired into SQLite, so even CURRENT_TIMESTAMP replays exactly.
Drive any world from any OpenEnv client, or publish it to Hugging Face.
Open instances, call tools, and inspect state in your browser.
seahaven mcp connects a world to Claude, Cursor, or any MCP client.
Tools are functions and tests use pytest, so coding agents already know the stack.
Evaluate and optimize agents with Kiln.
Kiln connects to any Seahaven world. Write scenarios against a fixture, evaluate your agent on the state it leaves behind, then use the Kiln Harness Optimizer to improve the harness: prompts, tools, skills, subagents and model choice, all scored against those evals.
Build your first synthetic world.
Scaffold a world with one command, hand it to your coding agent, and run your agent against it in minutes.