Multi-model provider implementations for OpenAI Agents, supporting both OpenAI and Ollama models
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- Database storage:
- PostgreSQL (recommended): Set
PG_CONNECTION_URI=postgresql://user:pass@host/db - PGLite (default): Install Node.js and
@electric-sql/pglite(npm install -g @electric-sql/pglite). Uses a high-performance sidecar process for optimal performance.
- PostgreSQL (recommended): Set
Quick start
from timestep import run_agent, RunStateStore, consume_result
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)
result = await consume_result(result)
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)
Documentation
Full docs: https://timestep-ai.github.io/timestep/
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timestep-2026.0.13.tar.gz.
File metadata
- Download URL: timestep-2026.0.13.tar.gz
- Upload date:
- Size: 342.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c0a2929aac7d0e32b1e6cb21163ad51ebfc8ccef32d01441c023b9c1f54eabf
|
|
| MD5 |
b7da234e810627f215d5139073486816
|
|
| BLAKE2b-256 |
e972233dc64c7fb5061fda39a5a3cdb15170134ed317091ea4e40b8d32c57d20
|
File details
Details for the file timestep-2026.0.13-py3-none-any.whl.
File metadata
- Download URL: timestep-2026.0.13-py3-none-any.whl
- Upload date:
- Size: 308.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
882e8e021993fe1be7f9ea0482aeddc58122b66b73abcae6a4d3412f66f894c2
|
|
| MD5 |
9cf27be27b3fd3237d352f89cf08084c
|
|
| BLAKE2b-256 |
f99b8ca0f1ff7be97eed4a8793befad6142032ff9932633920ebb037a2d443da
|