Skip to content
ZHIVEXDocs

Agents, tools and durable state

Python 0.25.0 · published wheel reference and guides.

PythonMixed

Agent, run_agent, stream_agent and resume_agent provide the Stable runtime. Tools belong to the application: define narrow inputs, validate them, and return bounded results. Use an approval before a side effect such as changing a record.

from zhivex_ai import Agent, run_agent, stream_agent, resume_agent, tool

InMemory and SQLite run, memory, and checkpoint stores are Stable in 0.24. InMemory is process-local and suitable for tests and demos. SQLite provides durable local storage on a single host; it is not a distributed coordination service. Postgres remains the option for application-owned shared durable state. Review local storage guarantees for session writes and recovery. Applications own tenant isolation and authorization.

Durable approval persists Pydantic tool inputs as JSON and revalidates them when resuming. Keep tool schemas compatible with pending approvals during upgrades.

The API reference lists the exact store and approval contracts. The existing agent guide includes tools, typed context, checkpoints and resume. The Beta zhivex init command also provides a durable application scaffold. Review generated storage and approval configuration before deployment.

Copied