Open-source, model-agnostic production runtime for AI agents. Durable sessions, sandbox isolation, and per-model YAML profiles.
Project description
Tename
The open-source production runtime for any agent framework. Durable sessions, sandbox isolation, and per-model YAML profiles — so the same agent code runs well on Claude today and any other model tomorrow.
What is Tename?
Tename is an open-source runtime that sits beneath your agent framework — whether that's Deep Agents, Claude Agent SDK, or your own custom code. It provides the infrastructure layer most teams end up rebuilding from scratch:
- Durable sessions that survive crashes. Kill the process mid-stream, restart, and the agent resumes cleanly from an append-only event log.
- Per-model optimization via YAML profiles. Same agent code, different model, one config change. Each profile encodes caching strategy, context budget, tool format, and known quirks.
- Sandbox isolation for LLM-generated code. Docker containers with CPU, memory, and PID limits. Credentials never enter the sandbox.
- Framework adapters so you bring your existing code. Tename doesn't replace Deep Agents — it makes Deep Agents production-grade.
30-second look
from tename import Tename
with Tename() as client:
agent = client.agents.create(
name="coding-agent",
model="claude-opus-4-6",
system_prompt="You are a careful software engineer.",
tools=["python", "bash", "file_read", "file_write"],
)
session = client.sessions.create(agent_id=agent.id)
for event in session.send("Compute the 50th Fibonacci number in Python."):
if event.type == "assistant_message" and event.payload.get("is_complete"):
print(event.payload["content"])
When GPT-5 ships a profile, switching models is one field change:
agent = client.agents.create(
model="gpt-5", # ← just this
...
)
The runtime handles the rest — different caching strategy, different tool format, different context management — all from the YAML profile.
Why Tename exists
Teams building production AI agents face a forced choice:
| Option | Pros | Cons |
|---|---|---|
| Proprietary runtimes (Anthropic Managed Agents, AWS Bedrock AgentCore) | Production-grade infrastructure | Locked to one model provider |
| Open frameworks (Deep Agents, Claude Agent SDK) | Model flexibility, code ownership | You build all the infrastructure yourself |
Tename is the third option: production-grade infrastructure that works with any model and any framework.
Architecture
Your Code → Python SDK → Harness Runtime → Model Router → Any Provider
↕ ↕
Session Service Sandbox (Docker)
(Postgres) ↕
Tool Proxy + Vault
Three decoupled interfaces (brain, hands, state) that fail and recover independently. See docs/architecture/overview.md.
What's in v0.1
- Session Service with append-only event log, idempotent writes, and advisory-lock-serialized concurrent emitters
- Stateless Harness Runtime with crash-safe resume
- Model Router with Anthropic provider and streaming
- YAML profile system with inheritance, validation, and a bundled Claude Opus 4.6 profile
- Docker sandbox with six built-in tools (
bash,python,file_read,file_write,file_edit,file_list) - Vault (PBKDF2 + Fernet) for encrypted credential storage
- Tool Proxy that injects credentials at call time — credentials never reach the sandbox or the session log
- Deep Agents framework adapter
- Vanilla adapter (no-framework fallback)
- Python SDK (sync + async)
tename vaultCLI for credential management- 5 benchmark tasks for profile validation
- 3 worked examples
Coming in v0.2: GPT-5 and Gemini profiles, Claude Agent SDK adapter, summarization compaction, OpenTelemetry tracing, TypeScript SDK.
Getting started
Prerequisites
- Python 3.12+
- Docker (for Postgres and the code sandbox)
- An Anthropic API key
Install
pip install tename
Point it at Postgres and apply the schema
You need a running Postgres. Either use a managed one or spin one up with Docker:
docker run -d --name tename-postgres \
-e POSTGRES_USER=tename -e POSTGRES_PASSWORD=tename \
-e POSTGRES_DB=tename_dev -p 5433:5432 \
postgres:16-alpine
export TENAME_DATABASE_URL='postgresql+psycopg://tename:tename@localhost:5433/tename_dev'
tename migrate # applies the wheel-bundled schema
If you prefer cloning the repo: git clone ...; make dev; make migrate
does all three steps at once.
Run the hello-world
export ANTHROPIC_API_KEY=sk-ant-...
python -c "
from tename import Tename
with Tename(enable_sandbox=False) as client:
agent = client.agents.create(
name='hi',
model='claude-opus-4-6',
system_prompt='You are a concise assistant.',
)
session = client.sessions.create(agent_id=agent.id)
for ev in session.send('Tell me one interesting fact about octopuses.'):
if ev.type == 'assistant_message' and ev.payload.get('is_complete'):
print(ev.payload['content'])
"
See docs/QUICKSTART.md for the full 10-minute walkthrough, including troubleshooting.
Examples
- 01-hello-world — simplest possible agent
- 02-research-agent — Deep Agents
planning +
web_search(Tavily) - 03-coding-agent — writes and runs Python in the sandbox
Documentation
| Doc | What it covers |
|---|---|
| QUICKSTART | Clone → install → running agent in 10 minutes |
| Product vision | What Tename is and why it exists |
| Principles | Non-negotiable architectural commitments |
| Architecture overview | How the system fits together |
| Profile format | YAML profile schema reference |
| SDK design | Python SDK API reference |
| Deployment | Running Tename in production |
Contributing
We welcome contributions! The fastest way to contribute is a new model profile — one YAML file. See CONTRIBUTING.md for how to set up the dev environment, run tests, and submit PRs.
How it compares
| Tename | Anthropic Managed Agents | AWS Bedrock AgentCore | Deep Agents | |
|---|---|---|---|---|
| Type | Open-source runtime | Proprietary managed service | Proprietary managed service | Open-source framework |
| Models | Any | Claude only | Bedrock catalog | Any (no tuning) |
| Per-model tuning | Yes (profiles) | Yes (internal) | Limited | No |
| Durable sessions | Yes | Yes | Yes | No (DIY) |
| Sandbox isolation | Yes (Docker) | Yes (microVMs) | Yes | No (DIY) |
| Credential isolation | Yes (vault + proxy) | Yes | Yes (IAM) | No (DIY) |
| Self-hosted | Yes | No | AWS only | N/A (library) |
| License | Apache 2.0 | Proprietary | Proprietary | MIT |
Tename doesn't compete with Deep Agents — it runs beneath it. Use Deep Agents for orchestration, Tename for infrastructure.
License
Apache 2.0. See LICENSE.
Status
v0.1 is the initial public release. The runtime is feature-complete for single-developer local use. Please file issues and PRs — the project is maintained as an individual side-project and feedback genuinely shapes v0.2.
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 tename-0.1.1.tar.gz.
File metadata
- Download URL: tename-0.1.1.tar.gz
- Upload date:
- Size: 129.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd2c1aa8e5baf4840cd057a58068cbb512a8c40ee1f3c54810b3eed0a96cc209
|
|
| MD5 |
893534eeabb17a9cd81fceb99cdd8813
|
|
| BLAKE2b-256 |
ed8541da078f36666df8b485c5747aaec480076af09e89747e01332ad85bac6c
|
File details
Details for the file tename-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tename-0.1.1-py3-none-any.whl
- Upload date:
- Size: 114.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0b26d3b03473abb6cc1a6f8f0bb638ed1b66812ffc0bcd38603a04a36be412a
|
|
| MD5 |
ec98df95f4951c814aba41cccca7673c
|
|
| BLAKE2b-256 |
6dc4a3ef8e13a9455f1827cd0526a88b3b2b1996b2be29305a0a17ddaac03a7f
|