Tvastar
The full-stack framework for building, running, and operating AI agents in production.
From a single prompt to fleet-scale autonomous systems — one framework handles the entire lifecycle.
Agent = Model + Harness
Loop = Agent + Schedule + Verify + Handoff
Fleet = Loops + Routing + Budget + Observability
Quickstart
pip install tvastar
from tvastar import create_agent, Harness, default_toolset
from tvastar.model import AnthropicModel
agent = create_agent(
"my-agent",
model=AnthropicModel("claude-sonnet-4-6"),
tools=default_toolset(),
)
result = await Harness(agent).run("Fix the failing tests")
print(result.ok) # Did it actually work?
print(result.quality.grade) # PASS / ACCEPTABLE / FAIL
print(result.quality.summary) # What went wrong (if anything)
Benchmark: 3,651 failed agent trajectories from tau2-bench. Tvastar detected 100%. Traditional monitoring detected 0%.
The Five Layers
┌─────────────────────────────────────────────────────────┐
│ 5. FLEET — Multi-agent coordination, routing, budget │
├─────────────────────────────────────────────────────────┤
│ 4. LOOP — Autonomous: schedule, verify, retry, handoff │
├─────────────────────────────────────────────────────────┤
│ 3. QUALITY — Score every run. Detect silent failures. │
├─────────────────────────────────────────────────────────┤
│ 2. HARNESS — Sessions, tools, sandbox, durability │
├─────────────────────────────────────────────────────────┤
│ 1. AGENT — Model + config. Any provider. │
└─────────────────────────────────────────────────────────┘
Each layer is independently useful. Use just the Harness, or go all the way up to Fleet.
| Layer | Problem it solves |
|---|---|
| Agent | One create_agent() call, works with any model (Anthropic, OpenAI, 100+ via LiteLLM) |
| Harness | Sessions, tools, sandbox, memory, compaction, structured output, MCP — you don't write this from scratch |
| Quality | Agents lie about success. 8 detectors catch what monitoring can't. Scores every run 0–100. |
| Loop | Agents run unattended — on schedules, with retry, with escalation when stuck |
| Fleet | Budget governance, semantic routing, alerting, versioned deploys across many agents |
Loop in 60 Seconds
from tvastar.loop import Loop, LoopConfig
loop = Loop(agent, LoopConfig(
name="ci-fixer",
schedule="*/15 * * * *", # every 15 min
max_iterations=3, # retry up to 3 times
cancel_after=300.0, # 5 min timeout per run
))
await loop.start() # Runs forever. Fixes CI. Alerts you if stuck.
The Loop runs the agent, verifies the result, retries with exponential backoff, and escalates (Slack, email, webhook) only when it cannot fix something itself.
Sessions Survive Crashes
Sessions are event-sourced by default. With a persistent Store, they survive process restarts:
from tvastar.memory.store import FileStore
harness = Harness(agent, store=FileStore("./data"))
result = await harness.run("Fix auth tests", session_id="my-session")
# Later — even after restart:
session = harness.resume("my-session")
What Makes Tvastar Different
| Competitor | What they miss |
|---|---|
| LangGraph | No loops, no fleet, no quality scoring |
| CrewAI | No autonomous loops, no verification |
| AWS AgentCore | No quality scoring, no loop engineering |
| LangSmith | Shows what happened — doesn't judge correctness |
Everyone else does one layer. We do the full stack.
Key Numbers
| Metric | Value |
|---|---|
| Python | 3.10+ |
| Core dependencies | Zero (all providers are optional extras) |
| Tests | 2,500+ |
| Detection accuracy | 100% on tau2-bench (vs 0% traditional monitoring) |
| Model backends | Anthropic, OpenAI, LiteLLM (100+), Mock |
| Sandbox types | Virtual, Local, Docker, Remote |
| Storage backends | InMemory, File, SQLite |
| Built-in detectors | 8 |
CLI
tvastar serve agent.py:agent # HTTP server
tvastar chat agent.py:agent # Interactive REPL
tvastar quality agent.py:agent "task" # Score a run (exit 1 if FAIL)
tvastar-fix --test-cmd "pytest" # Auto-fix failing tests
tvastar-ci # Autonomous CI monitor
tvastar-comply audit loop.py:loop # Compliance check
Documentation
| Doc | What it covers |
|---|---|
| Getting Started | Install, first agent, first loop |
| Usage Guide | Sessions, tools, sub-agents, structured output |
| API Reference | Every public symbol, field, and signature |
| Cookbook | 40+ patterns, recipes, and full examples |
| Loop Engineering | Schedules, retry, handoff, circuit breaker |
| Fleet | Multi-agent coordination, routing, budget |
| Architecture | ADRs and design decisions |
| Error Handling | What raises, what swallows, and why |
| SLOs | Reliability promises |
| Failure Modes | FMEA table — top 10 failure modes |
| Runbooks | Operational response for each alert type |
| Threat Model | Actors, boundaries, security primitives |
| Contributing | How to contribute |
Install Extras
pip install tvastar[anthropic] # Anthropic Claude models
pip install tvastar[openai] # OpenAI models
pip install tvastar[litellm] # 100+ providers via LiteLLM
pip install tvastar[all] # Everything
Environment Variables
| Variable | Purpose |
|---|---|
ANTHROPIC_API_KEY |
Anthropic model access |
OPENAI_API_KEY |
OpenAI model access |
TVASTAR_STORE_PATH |
Default FileStore location |
TVASTAR_LOG_LEVEL |
Structured log verbosity (DEBUG/INFO/WARNING/ERROR) |
License
Metadata
Release files for tvastar 0.26.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tvastar-0.26.0.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tvastar-0.26.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.6 MB
Release files / tvastar-0.26.0.tar.gz
| Download URL | tvastar-0.26.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0e2a02d1a46d9b417d1ceb37b1a9ce5b18e047f990e20a1f510caf8c4db8432
|
|
BLAKE2b-256 checksum How to use checksums |
36fe87f0b2cab5e29bfff9bb42c08c043b9acf7e92e2e31244e1da4d781d2603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.
Transparency logRelease files / tvastar-0.26.0-py3-none-any.whl
| Download URL | tvastar-0.26.0-py3-none-any.whl |
|---|---|
| Size | 433.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6d2bef3fed312f49af075a155b89ac166fef63debef11818c828570afd310a1
|
|
BLAKE2b-256 checksum How to use checksums |
1a1cb5284f4317cb6b36ec9f1e55b34882822034e0c1a3ea2a4409b5159746a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.
Transparency log