Metadata-Version: 2.4
Name: anchor-sdk
Version: 0.1.3
Summary: ANCHOR SDK — monitor and self-correct your AI agents in 2 lines
Author-email: ANCHOR <hello@anchormonitor.com>
License: MIT
Project-URL: Homepage, https://anchormonitor.com
Project-URL: Documentation, https://anchormonitor.com/docs
Project-URL: Repository, https://github.com/akinshaywai/ANCHOR
Keywords: ai,agent,monitoring,drift,correction,llm,anchor
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: scipy>=1.10.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"

# ANCHOR SDK

Monitor and self-correct your AI agents in 2 lines of code.

## Install

```bash
pip install anchor-sdk
```

## Quick start

```python
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](https://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

```python
# 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
```
