A session is the live context for one agent run in Omnigent. It holds the full conversation history — messages, sub-agent invocations, terminal resources, and produced files — and persists on the server database so it can be resumed, shared, or forked from any device. Sessions are identified by a stableDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/omnigent-ai/omnigent/llms.txt
Use this file to discover all available pages before exploring further.
conv_* ID and are bound to the runner that created them; when a teammate attaches or the web UI connects, they all read from the same live session on the server.
Starting a Session
- Quick start
- From a YAML file
- Fork an existing session
Run a named harness directly. Omnigent resolves the configured credential and starts a session in your terminal:A local server starts automatically in the background (if not already running) and the web UI becomes available at
http://localhost:6767.Session States
A session moves through the following lifecycle states:| State | Meaning |
|---|---|
idle | The session exists and is ready, but no agent turn is currently running. |
running | An agent turn is in progress — the runner is executing the LLM loop. |
failed | The most recently completed task ended with an error. Check last_task_error for details. |
| Paused (elicitation) | A policy has paused the session and is waiting for your approval before the agent proceeds. The session shows a pending elicitation badge in the web UI. |
idle after each completed turn, allowing further interaction. An agent run is paused — not stopped — when a policy fires an elicitation; the agent resumes as soon as you respond.
What a Session Contains
Every session holds several kinds of associated resources:Messages and comments
The full conversation history: user messages, assistant turns, tool call results, and inline comments posted by teammates during a shared session.
Sub-agent child sessions
When a supervisor agent delegates work to sub-agents, each sub-agent runs in its own child session. The parent session tracks all child sessions and their statuses.
Terminal resources
Native harness sessions (
claude-native, codex-native) attach a live tmux terminal to the session. The web UI and CLI can attach to the same terminal.File resources
Files produced by the agent (code files, data exports, etc.) are stored as artifacts on the server and accessible via the web UI or the files API.
Attaching to a Session
Any team member with access to the server can attach to a live session and co-drive it:attach is a thin client — it joins the already-running conversation without spawning a new server or runner. Messages you type are dispatched to the runner that owns the session (typically your teammate’s machine), which means the agent runs with that machine’s credentials and filesystem access. Use this for pair-programming on an agent, or to hand control to a domain expert mid-investigation.
attach never starts a server or runner. If there is no live session at the given ID, it fails loudly. Use omnigent run to start a new session, or omnigent resume to restart a stored one.Forking a Session
Forking creates an independent copy of a session starting from its current history (or from a specific response within it). The fork gets a new session ID and runs on its own runner:Streaming Session Events
All session output is delivered as a real-time SSE stream onGET /v1/sessions/{id}/stream. The Python SDK wraps this via SessionsNamespace.stream():
Session helper (the client.session(model=...) API), use session.query() which buffers the stream into a convenient result or chunk iterator:
session.query() with stream=True returns a QueryStream that yields text chunks as they arrive. With stream=False (the default) it collects the full response and returns a QueryResult with .text and any .files the agent produced.
Sessions are persisted in the server database — SQLite for single-instance or demo deploys, Postgres for production. The database backend is configured via the
DATABASE_URL environment variable. Sessions survive server restarts and are resumable from any device.