Runtime-enforced governance kernel for AI agents
Project description
AgenWatch
Runtime-enforced execution governance for AI agents.
AgenWatch is a Python SDK that guarantees AI agent executions stop when they must. Budgets, iteration limits, and execution boundaries are enforced during runtime, not observed after failure.
This is not an observability tool. This is an execution kernel.
Deep Dive: See ARCHITECTURE.md for design philosophy and guarantees.
Why AgenWatch Exists
Most agent frameworks answer:
"How do I make my agent smarter?"
AgenWatch answers a different question:
"Can I mathematically guarantee this agent will stop?"
AgenWatch enforces hard limits before tools or LLM calls execute:
- No runaway costs
- No infinite loops
- No silent retries
- No post-mortem surprises
What AgenWatch Is (and Is Not)
AgenWatch is:
- A bounded execution controller
- A deterministically governed agent runtime
- A safety and governance layer for agents
AgenWatch is not:
- A prompt engineering framework
- A UI or observability dashboard
- A workflow orchestration system
- A LangChain replacement
Installation
pip install agenwatch
Quick Example
import os
from agenwatch import Agent, tool
from agenwatch.providers import OpenAIProvider
@tool("Echo input text")
def echo(**kwargs) -> dict:
"""Echo back the provided text"""
text = kwargs.get("text", "")
return {"echo": text}
agent = Agent(
tools=[echo],
llm=OpenAIProvider(
api_key=os.getenv("OPENAI_API_KEY"),
model="gpt-4o-mini"
),
budget=1.0, # Hard execution budget
max_iterations=5
)
result = agent.run("Echo hello")
print(f"Success: {result.success}")
print(f"Cost: {result.cost}")
print(f"Output: {result.output}")
Guarantee: If the budget is exhausted, the agent cannot make another tool or LLM call.
Budget Kill-Switch (Runtime Enforcement)
AgenWatch enforces budgets as a runtime kill switch, not a warning.
Behavior:
- First call executes and is charged
- Retries are idempotent (no double charge)
- Next call is blocked before execution
- Agent terminates with
budget_exceeded
This is enforced inside the kernel, not in user code.
Note: AgenWatch enforces limits at runtime. If a limit is exceeded, execution is terminated immediately.
Streaming & Observability
AgenWatch exposes execution events for live inspection:
for event in agent.stream("Analyze input"):
print(event.type)
Event order is guaranteed. Event payloads are inspectable JSON.
Streaming is informational only and does not affect execution control.
Deterministic Execution
AgenWatch records execution decisions for post-mortem inspection.
In v0.1:
- Execution decisions are recorded for post-mortem inspection
- Replay is read-only
- Replay is in-memory
- No crash recovery or resumable execution
- Programmatic replay APIs will arrive later
Who Should Use AgenWatch
AgenWatch is designed for:
- Platform engineers
- Infrastructure teams
- AI safety & governance layers
- Production systems with cost or compliance constraints
It is not designed for:
- Chatbot demos
- Prompt experimentation
- No-code workflows
When Should You Use AgenWatch?
Use AgenWatch if you need hard execution guarantees for AI agents.
Typical use cases include:
- Preventing runaway tool or LLM calls
- Enforcing strict budget or iteration caps
- Debugging failures with deterministic replay
- Running agents in cost- or safety-sensitive environments
AgenWatch is designed for engineers who care about governance and correctness as much as model quality.
When NOT to Use AgenWatch
AgenWatch may not be the right fit if:
- You only need observability or tracing after execution
- You want rapid prototyping without hard limits
- You are looking for a high-level agent framework with many abstractions
AgenWatch intentionally trades flexibility for predictability and control.
Relationship to Other Frameworks
AgenWatch is complementary to frameworks like LangChain or CrewAI.
Those frameworks focus on agent capability. AgenWatch focuses on agent control.
AgenWatch can act as a runtime enforcement layer beneath other frameworks.
Status
Version: 0.1.1
- Kernel, SDK, and budget enforcement are stable
- Public API is minimal and frozen
- Actively evolving toward stronger governance primitives
License
MIT License
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 agenwatch-0.1.1.tar.gz.
File metadata
- Download URL: agenwatch-0.1.1.tar.gz
- Upload date:
- Size: 108.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d910dfae49789b3593577c024f7a51ccc4d00a55d244993fe3a37b7de0889a62
|
|
| MD5 |
2a7f03c37e3facc9918199f6f762bd64
|
|
| BLAKE2b-256 |
41bd187e27ec20b46870ec37a467453fc72cb6876e8594d6a009250e14fbfb28
|
File details
Details for the file agenwatch-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agenwatch-0.1.1-py3-none-any.whl
- Upload date:
- Size: 126.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96dc89f75928309611cf19e22cf89123a7362ab79e491eae2f5c8058569243cf
|
|
| MD5 |
a9b0b6ea6c09a98e4d92ac96c3713df7
|
|
| BLAKE2b-256 |
1d1df2921befedf42ef167e028a17cb02e39f05c59b8dc020201f75d47ded269
|