Timestep Documentation¶
Welcome! Timestep makes OpenAI Agents durable and resumable across Python and TypeScript with a tiny surface area: run_agent / runAgent, RunStateStore, and consume_result.
Prerequisites¶
OPENAI_API_KEY- Python storage options (in order of preference):
- PostgreSQL (recommended): Set
PG_CONNECTION_URI=postgresql://user:pass@host/dbor use local Postgres (auto-detected onlocalhost:5432) - PGLite: Install Node.js and
@electric-sql/pglite(npm install -g @electric-sql/pglite). Uses a high-performance sidecar process.
Quick navigation¶
- Getting started: Installation and Quick Start
- Core concepts: Architecture, Use Cases
- API reference: Utilities, MultiModelProvider, OllamaModelProvider, MultiModelProviderMap, Tools
Core features¶
- Durable execution: save/load
RunStatefrom Postgres or PGLite. - Cross-language state: same format in Python and TypeScript.
- Model routing: prefix (
ollama/gpt-oss:20b-cloud) to select providers; defaults to OpenAI. - Smart storage: auto-detects local Postgres, falls back to PGLite, or use
PG_CONNECTION_URIfor remote Postgres.
Packages¶
- Python:
timestep - TypeScript:
@timestep-ai/timestep