> ## Documentation Index
> Fetch the complete documentation index at: https://quintsecurity.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent SDK

> Behavioral security and policy enforcement for AI agents — one line of code.

The Quint Agent SDK captures every tool call your AI agent makes, enforces YAML-defined security policy at the tool-call boundary, and streams structured intent frames to the Quint cloud for real-time behavioral-security analysis.

## Why

AI agents call tools — file reads, shell commands, API calls, database queries. Without visibility into what tools are called and with what arguments, you can't detect prompt injection, data exfiltration, or unauthorized access.

The SDK sits at the tool-call boundary:

```
User Prompt → LLM → Tool Call → @quint.guard() → Tool Execution → Result
                                     ↓
                              Policy check (allow/block)
                              Telemetry capture (async)
```

## What it captures

| Event             | Data                                         |
| ----------------- | -------------------------------------------- |
| `session_start`   | Agent name, framework, SDK version, metadata |
| `tool_call`       | Tool name, arguments, timestamp, run ID      |
| `tool_result`     | Return value, duration, success/failure      |
| `policy_decision` | Allow/block, matched rule, reason            |
| `session_end`     | Duration, final status, event count          |

## Install

```bash theme={null}
pip install quint-agent
```

With framework integrations:

```bash theme={null}
pip install 'quint-agent[anthropic]'   # Anthropic Messages API
pip install 'quint-agent[langchain]'   # LangChain callback handler
pip install 'quint-agent[openai]'      # OpenAI function calling
pip install 'quint-agent[mcp]'         # Model Context Protocol
pip install 'quint-agent[all]'         # Everything
```

## Quick start

```python theme={null}
import quint_agent

quint_agent.init(api_key="qak_...")

@quint_agent.guard()
def read_file(path: str) -> str:
    return open(path).read()

read_file(path="/etc/hosts")        # allowed — captured to cloud
read_file(path="/home/me/.env")     # blocked — ToolBlockedError
```

That's it. Every call to `read_file` is now captured, policy-checked, and streamed to the Quint dashboard.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/sdk/quickstart">
    Get running in 2 minutes
  </Card>

  <Card title="Policy DSL" icon="shield" href="/sdk/policy">
    YAML rules for tool-call enforcement
  </Card>

  <Card title="Integrations" icon="plug" href="/sdk/integrations">
    LangChain, Anthropic, OpenAI, MCP
  </Card>

  <Card title="API Reference" icon="book" href="/sdk/api-reference">
    init(), guard(), Client, Policy
  </Card>
</CardGroup>
