Skip to main content

Tvastar

PyPI Python CI License: Apache 2.0

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

Apache 2.0

Metadata

Release files for tvastar 0.25.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tvastar 0.25.0
File Size Uploaded
tvastar-0.25.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for tvastar 0.25.0
File Interpreter ABI Platform
tvastar-0.25.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / tvastar-0.25.0.tar.gz

Download URL tvastar-0.25.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
ddadca8058d1c8e8ad64694580cce34e71d0988ad0e25a91d4547aed247e44fa
BLAKE2b-256 checksum
How to use checksums
14e98f23de83dea54518744c756373e429d3475f2d75a8f8ddb9437567364a76
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 11, 2026.

Transparency log

Release files / tvastar-0.25.0-py3-none-any.whl

Download URL tvastar-0.25.0-py3-none-any.whl
Size 421.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e19e68bca11a4d6dc2cbfc2cfcf0bd40193dde994235af948c19cbf94422046
BLAKE2b-256 checksum
How to use checksums
03c00c307ece1ab578215abf74cae7099c0db7a537bc3d10ff22615d9ddc88fe
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 11, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page