TxVeto
TxVeto is an in-process budget and loop guard for AI agents. It is designed to stop runaway API spend and repeated tool-call loops before the next expensive call is made.
Why TxVeto
Agentic systems fail fast when guardrails are missing. A prompt injection, loop bug, or tool misuse can trigger expensive cascades in minutes.
TxVeto adds runtime safety primitives you can enforce locally:
- Hard budget ceilings per run
- Max-step loop circuit breakers
- Repeated tool-call detection
- MCP policy controls for guarded tool execution
What's included
txveto.guard.VetoGuardfor budget and loop enforcementtxveto.errorsfor typed safety exceptionstxveto.policy.BudgetPolicyfor MCP policy configuration- A browser playground in
txveto.web_demo - A JSON-RPC MCP server wrapper in
txveto.mcp_server - Pytest coverage for wallet-drain and infinite-loop scenarios
Install
Local development
pip install -e .[dev]
pytest
Package usage
# after publish
pip install txveto
Quick Start
python -m txveto.demo --mode both
python -m txveto.web_demo
Installed console scripts:
txveto-demo --mode bothtxveto-web-demotxveto-mcp
Python API Example
from txveto.guard import VetoGuard
guard = VetoGuard(max_usd=0.50, max_steps=10)
with guard:
guard.inspect_step(
model="claude-3-5-sonnet",
input_tokens=50_000,
output_tokens=2_000,
tool_name="fetch_web_data",
)
MCP Tools
The MCP server exposes policy-aware tools for inspection and runtime configuration. budget.configure updates the active per-session policy, budget.status returns the current spend and policy snapshot, and policy.evaluate lets clients simulate a step before executing it.
Launch Artifacts
- Changelog:
CHANGELOG.md - Release checklist:
RELEASE_CHECKLIST.md
License
MIT
Metadata
Release files for txveto 0.1.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 | |
|---|---|---|---|
| txveto-0.1.0.tar.gz | 15.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| txveto-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.6 kB
Release files / txveto-0.1.0.tar.gz
| Download URL | txveto-0.1.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abf755b2202bf29635992c243af84cadf4d28bca61556c33c71e32477bbaece1
|
|
BLAKE2b-256 checksum How to use checksums |
05866553936e109868642267916ca732879350ad6e7a1e0e69f91999375c4870
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / txveto-0.1.0-py3-none-any.whl
| Download URL | txveto-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f68c6bcb110149443cf20d63803df70d08276fe89baebfd96d204c0120ce34b
|
|
BLAKE2b-256 checksum How to use checksums |
278a3731316e488390cc526a2d3ffde0891c1d3a1c85e357bdd5486469f6153e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|