Agent hosting
Agent hosting
Choose an optional durable host and find its configuration, transports, and operations guides.
View Markdown source ↗An Ochat agent is defined in a ChatMD text file, including its instructions, tools, and optional ChatML workflow. The agent server is an optional way to host that agent: keep it running without an open terminal, share a session between clients, or integrate your own app.
For everyday work in a local repository, start with the local TUI. It uses the same agent core without requiring a daemon. You can introduce server hosting when you need independent lifetimes or a client protocol.
What the server adds
Section titled “What the server adds”The daemon owns sessions and their runtime independently of any one client. Multiple clients can attach, see live updates, and—with appropriate write permissions—send messages. Read-only connections can observe without submitting messages. The server’s catalog selects which prompts and workspaces are available, while permission policies support both interactive and automated use.
A workspace supplies the logical working location used by prompt and tool configuration. It can be a configured folder or a managed virtual workspace; it does not itself grant or confine tool access.
Session lifetime and storage are separate choices. Detached agents can outlive clients; owner-bound agents depend on a client’s renewable ownership and grace period; process-bound local agents end with their host. Durable state supports restart recovery, but does not preserve a running OS process or resume an arbitrary in-flight effect exactly where it stopped. Read sessions and workspaces before choosing a mode.
Pick an entry point
Section titled “Pick an entry point”- Interactive local work: run the TUI over a local prompt.
- Persistent local agents: start a Unix daemon and connect the TUI.
- A subprocess integration: use stdio, either hosting locally or forwarding to a daemon.
- An HTTP integration: use authenticated requests and SSE updates.
Unix, stdio, and HTTP expose the Ochat agent protocol, not MCP. Maintained MCP tools can still be part of an agent’s ChatMD definition; the deprecated MCP prompt-serving host is a different feature.
Guides and references
Section titled “Guides and references”| Task | Guide |
|---|---|
| Choose an execution mode | Concepts, quickstart |
| Run without a daemon | Local TUI, local stdio |
| Run a durable daemon | Unix daemon tutorial, configuration |
| Configure the host environment | Environment variables |
| Integrate a client | Protocol, Unix, stdio, HTTP/SSE |
| Manage agents and workspaces | Sessions and workspaces |
| Configure authority and automation | Permissions, shell host integration |
| Run background scripts | ChatML orchestration, tutorial |
| Deploy, recover, or diagnose | Operations, troubleshooting |
| Embed the libraries | OCaml integration |
| Verify the system | Testing |
Tutorial inputs and clients live in tracked examples. The architecture and implementation specifications provide deeper design rationale; current executable commands are in these guides.