ANCHOR SDK — two-way guardrail for AI agents. Gate inputs, outputs, and actions.
Project description
ANCHOR SDK
Monitor and self-correct your AI agents in 2 lines of code.
Install
pip install anchor-sdk
Quick start
import anchor_sdk as anchor
anchor.init(
url="https://api.anchormonitor.com",
agent_id="my-agent",
task="Describe what your agent does",
sdk_key="sk-...", # from your ANCHOR dashboard
)
# Your existing agent code — unchanged.
# ANCHOR auto-monitors every OpenAI / Anthropic / LangChain call.
Get your SDK key at anchormonitor.com.
What it does
- Detects drift — vocabulary, semantic, latency, refusal, tool-call, and input distribution
- Self-corrects — injects a correction system message before the next LLM call
- Escalates — emails + Slack + PagerDuty when correction fails after 3 attempts
- Zero code changes — patches OpenAI, Anthropic, and LangChain automatically
Manual usage
# If you prefer explicit control:
result = anchor.watch("The agent's latest response text")
if result["correction_required"]:
print(result["correction_prompt"]) # inject this as a system message
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
anchor_sdk-0.2.0.tar.gz
(9.6 kB
view details)
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 anchor_sdk-0.2.0.tar.gz.
File metadata
- Download URL: anchor_sdk-0.2.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
886f5262a33ec67755aec5ddc7ec1b2ee2386208b85b497d8de3fa72939bbfc3
|
|
| MD5 |
a946c89401cccdd4ace22c678234f17c
|
|
| BLAKE2b-256 |
f7358f1fc098c317bca74dd10234e95c51850318672a5935a0aebb16a71b0bcd
|
File details
Details for the file anchor_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: anchor_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
409c3ca8f82b0da99ac522c5390e3b0c8503b6ce83b9756c80feabfc771fdfdf
|
|
| MD5 |
3d3ad92c4748b4fb9a949f74c5e35ca7
|
|
| BLAKE2b-256 |
50a0de600304cc7e8df71dc5e405773f00a25c2762ede76ff86822a9e04eb732
|