Drop-in reliability observability for multi-agent AI workflows
Project description
sentinelai-sdk
Observability, contract enforcement, and safe replay for multi-agent AI pipelines.
Dashboard: www.agentsentinelai.com/dashboard
Install
pip install sentinelai-sdk
Get an API key at the dashboard → ⚙️ Settings → Generate Key. Free, no credit card required.
Pick what you need
| I want to… | Feature | Dashboard tab |
|---|---|---|
| See what my agents are doing — steps, inputs, outputs, latency | Tracing | Traces |
| Block bad data from reaching the next agent, replay from failure | Contract + Replay | Incidents |
| Let concurrent agents write shared state without overwriting each other | Shared State | State |
These stack — use one, two, or all three.
1. Tracing
Zero changes — auto_instrument()
One line. Detects openai, anthropic, langchain and patches them automatically.
import sentinel
sentinel.auto_instrument(api_key="sk_live_...")
sentinel.set_active_run("run_001", "my_pipeline")
# Your existing code — completely unchanged
response = client.chat.completions.create(model="gpt-4o", messages=[...])
Or instrument from the CLI
sentinel instrument pipeline.py
Reads your file, asks what you want to add, writes the instrumented version.
Manual options
# Decorator — 1 line per function
@sentinel.trace_step(name="planner", step_type="llm_call", workflow_name="my_pipeline")
def planner(query): ...
# OpenAI
sentinel.patch_openai(client, workflow_name="my_pipeline")
# Anthropic
sentinel.patch_anthropic(client, workflow_name="my_pipeline")
# LangChain
cb = sentinel.LangChainCallback(workflow_name="my_pipeline")
llm = ChatOpenAI(model="gpt-4o", callbacks=[cb])
2. Contract + Replay
Define what one agent must hand to the next. If invalid, Sentinel blocks the downstream agent, creates an incident, and saves a checkpoint for replay.
from sentinel import Sentinel
client = Sentinel(api_key="sk_live_...")
client.register_contract(
workflow_name="my_pipeline",
from_step="planner",
to_step="research",
schema={
"type": "object",
"required": ["destination", "budget", "days"],
"properties": {
"destination": {"type": "string"},
"budget": {"type": "number"},
"days": {"type": "integer"}
}
},
on_fail="block"
)
run = client.start_workflow(workflow_name="my_pipeline", input={"query": "..."})
plan = planner(query)
result = client.record_step(run_id=run["run_id"], step_name="planner", output=plan)
if result["boundary_check"]["result"] == "failed":
print("Blocked:", result["boundary_check"]["reason"])
# replay from checkpoint once fixed:
client.replay(
run_id=run["run_id"],
checkpoint_id=result["boundary_check"]["checkpoint_id"],
patched_output={"destination": "Japan", "budget": 2000, "days": 5}
)
3. Shared State
Safe concurrent writes — no silent overwrites between parallel agents.
# Read
value, version = sentinel.get_state(run_id, "key")
# Write with conflict protection
sentinel.propose_state(run_id, "key", new_value, base_version=version)
# Auto-retry on conflict
sentinel.propose_state_with_retry(run_id, "key", lambda cur: {**(cur or {}), "field": value})
Links
Project details
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 sentinelai_sdk-0.1.5.tar.gz.
File metadata
- Download URL: sentinelai_sdk-0.1.5.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aa07fdef50961b5d92e4d59d2b191536e9ec6249b2ba58da6d0b63d73390b93
|
|
| MD5 |
bb9557aa40a13462ce9ea7dda04cb5e8
|
|
| BLAKE2b-256 |
9a855837c21607d87dec27a47718198c546c9a9944394fd95915c9562b5f3c79
|
File details
Details for the file sentinelai_sdk-0.1.5-py3-none-any.whl.
File metadata
- Download URL: sentinelai_sdk-0.1.5-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07bba7f3d0b408ed2a751e972ce11ccde19b3ae05dd9e04f92293da686f81dce
|
|
| MD5 |
eb447e248d0c6c0d124cd748748f023b
|
|
| BLAKE2b-256 |
32ec491800bb496cc81c45729cca2d38f45a58a9233a14606934717595c9daef
|