A session is a provisioned twin instance with its own SQLite database, seeded from your scenario’sDocumentation Index
Fetch the complete documentation index at: https://docs.pome.sh/llms.txt
Use this file to discover all available pages before exploring further.
## Setup block and ready for exactly one agent run. When the run finishes, the twin state is discarded and the run artifacts are retained. The next run gets a fresh session with a clean slate.
Session lifecycle
Session provisioned
The CLI boots the twin (locally via Docker, or on a hosted pod) and applies the scenario seed to its SQLite database. The session moves from
provisioning to ready once the twin passes its health check.Agent runs
The CLI launches your agent process with the twin URL in
POME_GITHUB_REST_URL. Every HTTP call the agent makes is recorded by the twin’s middleware. The session state is running.Pome evaluates
Once your agent exits (or the timeout fires), the CLI reads the twin’s final SQLite state and runs the evaluator against your scenario’s success criteria. The score and per-criterion results are written to
score.json.Self-host vs hosted sessions
The session lifecycle is the same in both modes. What differs is how the CLI provisions the twin. Self-host: the CLI talks directly to a local twin container running on your machine. There is no session provisioning API call and nosession_id. The twin URL is always http://127.0.0.1:3333 (or whatever port you configured). The CLI reseeds the twin’s state from the scenario’s ## Setup block before each run automatically.
Hosted: the CLI calls POST /v1/sessions to provision a fresh twin pod on Pome’s infrastructure. The response includes a twin_url and a short-lived agent_token scoped to that session. The CLI passes both to your agent process. When the run completes, the scored result is recorded and the pod is torn down.
Session states
| State | Meaning |
|---|---|
provisioning | Twin is booting and seed is being applied. |
ready | Twin passed its health check; waiting for the agent to start. |
running | Agent is active and making calls to the twin. |
done | Run completed and artifacts have been written or uploaded. |
expired | Session hit its TTL before the run completed. Artifacts may be partial. |
failed | Twin failed to boot or the seed could not be applied. |
Session isolation
Each session has its own SQLite database, initialized from zero and seeded from your scenario. There is no shared state between sessions and no leftover data from previous runs. Two concurrent sessions for the same scenario will each see an identical starting state and will never observe each other’s mutations. On self-host, the twin container’s database is wiped and reseeded before everypome run invocation. On hosted, each session runs in its own pod.
Session TTL
Hosted sessions expire automatically after 30 minutes. Theexpires_at timestamp is included in the POST /v1/sessions response. If your agent is still running when the TTL fires, the session moves to expired and the twin stops accepting requests.
You can extend the TTL at scenario level by setting a longer timeout in ## Config, up to your plan’s maximum.
On hosted, use
pome sessions list to see all active sessions for your team and pome sessions kill <session-id> to tear one down early. This is useful when a run hangs and you want to free up quota without waiting for the TTL.Next steps
- Sessions API reference — full request/response shapes for
POST /v1/sessions,GET /v1/sessions, andDELETE /v1/sessions/{id}