Skip to content

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/db or use local Postgres (auto-detected on localhost:5432)
  • PGLite: Install Node.js and @electric-sql/pglite (npm install -g @electric-sql/pglite). Uses a high-performance sidecar process.

Quick navigation

Core features

  • Durable execution: save/load RunState from 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_URI for remote Postgres.

Packages