Metadata-Version: 2.4
Name: agentmolt
Version: 0.1.0
Summary: Agent Control Panel — monitor, control, and kill-switch your AI agents
Author-email: AgentMolt <hello@agentmolt.dev>
License: MIT
Project-URL: Homepage, https://agentmolt.dev
Project-URL: Documentation, https://agentmolt.dev/docs
Project-URL: Repository, https://github.com/saltyprojects/acp-python-sdk
Project-URL: Issues, https://github.com/saltyprojects/acp-python-sdk/issues
Keywords: ai,agents,monitoring,control-panel,kill-switch,observability,langchain,crewai,openai
Classifier: Development Status :: 3 - Alpha
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0
Requires-Dist: wrapt>=1.15.0
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == "openai"
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.18.0; extra == "anthropic"
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
Provides-Extra: all
Requires-Dist: openai>=1.0.0; extra == "all"
Requires-Dist: anthropic>=0.18.0; extra == "all"
Requires-Dist: langchain-core>=0.1.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"

# AgentMolt (ACP) — Python SDK

Monitor, control, and kill-switch your AI agents. Works with OpenAI, Anthropic, LangChain, CrewAI, and any LLM provider.

[![PyPI](https://img.shields.io/pypi/v/agentcontrol)](https://pypi.org/project/agentcontrol/)
[![Python](https://img.shields.io/pypi/pyversions/agentcontrol)](https://pypi.org/project/agentcontrol/)

## Install

```bash
pip install agentcontrol
```

With OpenAI support:
```bash
pip install agentcontrol[openai]
```

## Quick Start — 2 Lines

```python
import acp
from openai import OpenAI

# Patch OpenAI to auto-monitor all calls
client = OpenAI()
panel = acp.ACP(api_key="acp_...")
panel.patch_openai(client)

# Use OpenAI normally — ACP logs everything automatically
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
    acp_agent_id="my-agent"  # tag which agent this is
)
```

## Budget Enforcement

```python
from acp import ACP, AgentBudget

panel = ACP()
panel.register("research-agent", budget=AgentBudget(
    max_cost_usd=10.00,    # Kill at $10
    max_tokens=100_000,     # Kill at 100K tokens
    max_calls=50,           # Kill after 50 calls
    alert_at_pct=0.8,       # Alert at 80%
))

# Agent is automatically killed when budget exceeded
panel.log("research-agent", model="gpt-4o", tokens=5000, cost=0.025)
```

## Kill Switch

```python
# Manual kill
panel.kill("rogue-agent", reason="suspicious activity detected")

# Check before executing
if panel.is_alive("my-agent"):
    do_work()
else:
    print("Agent is dead. Standing down.")
```

## Decorators

```python
from acp import monitor, budget, kill_switch

@budget("expensive-agent", max_cost_usd=50.0)
@kill_switch("expensive-agent")
@monitor("expensive-agent")
def run_analysis():
    # Your agent code here
    ...
```

## CLI

```bash
# Scan for shadow agents
acp scan

# Check agent status
acp status

# Kill a rogue agent
acp kill marketing-gen --reason "unauthorized spend"
```

## How It Works

ACP wraps your LLM client calls (same pattern as OpenTelemetry):

1. **Before each call**: Check if agent is alive + within budget
2. **After each call**: Log tokens, cost, latency, model
3. **On budget exceeded**: Kill the agent, block future calls
4. **Background**: Flush events to ACP dashboard every 5 seconds

No code changes needed beyond the initial `patch_openai()` call.

## Dashboard

Connect to [agentmolt.dev](https://agentmolt.dev) for:
- Real-time agent monitoring
- Cost tracking per agent
- Security scoring
- Audit trails
- One-click kill switch

## License

MIT — [agentmolt.dev](https://agentmolt.dev)
