Skip to main content

Timestep AI - Agent execution framework with cross-language state persistence and multi-model support for OpenAI Agents

Project description

Timestep (Python)

Python bindings for the Timestep Agents SDK. See the root README.md for the full story; this file highlights Python-specific setup.

Install

pip install timestep

Prerequisites (Python)

  • OPENAI_API_KEY
  • PostgreSQL: Set PG_CONNECTION_URI=postgresql://user:pass@host/db

Quick start

from timestep import run_agent, RunStateStore
from agents import Agent, Session

agent = Agent(model="gpt-4.1")
session = Session()
state_store = RunStateStore(agent=agent, session_id=await session._get_session_id())

result = await run_agent(agent, input_items, session, stream=False)

if result.interruptions:
    await state_store.save(result.to_state())

Cross-language resume

Save in Python, load in TypeScript with the same session_id and RunStateStore.load().

Model routing

Use MultiModelProvider if you need OpenAI + Ollama routing:

from timestep import MultiModelProvider, MultiModelProviderMap, OllamaModelProvider

provider_map = MultiModelProviderMap()
provider_map.add_provider("ollama", OllamaModelProvider())
model_provider = MultiModelProvider(provider_map=provider_map)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timestep-2026.0.56.tar.gz (394.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timestep-2026.0.56-py3-none-any.whl (333.0 kB view details)

Uploaded Python 3

File details

Details for the file timestep-2026.0.56.tar.gz.

File metadata

  • Download URL: timestep-2026.0.56.tar.gz
  • Upload date:
  • Size: 394.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for timestep-2026.0.56.tar.gz
Algorithm Hash digest
SHA256 b84b5f0cb96b40581852d03e94b08269643f780865d6e27eca48b2dc98b0ff40
MD5 5dc805a5d48d342be64405e73af04679
BLAKE2b-256 616586d3eec14cff77bd998acc1af0459d48ef897afaeb358b9201229cde38ad

See more details on using hashes here.

File details

Details for the file timestep-2026.0.56-py3-none-any.whl.

File metadata

  • Download URL: timestep-2026.0.56-py3-none-any.whl
  • Upload date:
  • Size: 333.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for timestep-2026.0.56-py3-none-any.whl
Algorithm Hash digest
SHA256 109c6bb12d87fc824f1ca614418df9a28920ffc4dbcd176a95521590dc2f4575
MD5 f15c4a5aa34cd019d4af1d507e6ba728
BLAKE2b-256 65bfdcec4f7959686f66eac4d359effa8666cf0a4f26099abefaa9facebd533c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page