Metadata-Version: 2.4
Name: scandar-guard
Version: 0.1.0
Summary: Runtime security monitoring for AI agents. In-process. No data leaves your environment.
Project-URL: Homepage, https://scandar.ai
Project-URL: Documentation, https://scandar.ai/docs
Project-URL: Repository, https://github.com/scandar/scandar
Project-URL: Issues, https://github.com/scandar/scandar/issues
License: MIT
Keywords: agents,ai,llm,mcp,monitoring,runtime,security
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 :: Security
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Provides-Extra: all
Requires-Dist: anthropic>=0.20.0; extra == 'all'
Requires-Dist: langchain-core>=0.1.0; extra == 'all'
Requires-Dist: mcp>=1.0.0; extra == 'all'
Requires-Dist: openai>=1.0.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.20.0; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: anthropic>=0.20.0; extra == 'dev'
Requires-Dist: openai>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.1.0; extra == 'langchain'
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == 'openai'
Description-Content-Type: text/markdown

# scandar-guard

Runtime security monitoring for AI agents. Drop-in wrapper for Anthropic, OpenAI, LangChain, CrewAI, and AutoGen.

**Zero data leaves your environment.** All inspection runs in-process.

## Install

```bash
pip install scandar-guard
```

## Quick Start

```python
from anthropic import Anthropic
from scandar_guard import guard, GuardConfig

client = guard(Anthropic(), GuardConfig(
    agent_id="my-agent",
    asg_telemetry=True,
    asg_api_key="sk_your_key",
))

# Use as normal — Guard monitors every call
response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
```

## Context Manager (recommended)

```python
from scandar_guard import guard_session, GuardConfig

with guard_session(Anthropic(), GuardConfig(
    agent_id="my-agent",
    asg_telemetry=True,
    asg_api_key="sk_your_key",
)) as client:
    response = client.messages.create(...)
    # session_end telemetry sent automatically on exit
```

## CrewAI

```python
from crewai import Crew
from scandar_guard.integrations.crewai import ScandarCrewAIMonitor

monitor = ScandarCrewAIMonitor(api_key="sk_xxx")

crew = Crew(
    agents=[...],
    tasks=[...],
    step_callback=monitor.step_callback,
    task_callback=monitor.task_callback,
)
```

## AutoGen

```python
from autogen import ConversableAgent
from scandar_guard.integrations.autogen import register_scandar_hooks

agent = ConversableAgent(name="my-agent", ...)
register_scandar_hooks(agent, api_key="sk_xxx")
```

## What it detects

- Prompt injection (direct, indirect, encoded, multi-turn)
- Tool argument injection and data exfiltration sequences
- Privilege escalation and anomalous tool call patterns
- Behavioral profile deviations with per-agent baselines
- 140+ detection rules mapped to OWASP LLM Top 10

## Agent Security Graph

When `asg_telemetry=True` and `asg_api_key` are set, Guard sends anonymized telemetry (tool names, finding categories, threat scores — never prompts or content) to the Agent Security Graph for fleet-wide visibility.

## Links

- [Documentation](https://scandar.ai/docs)
- [Agent Security Graph](https://scandar.ai/features/agent-security-graph)
- [Scandar](https://scandar.ai)
