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

# Agent Triage Protocol

> A standardized communication protocol for AI services to request human intervention

<img className="block dark:hidden" src="https://mintcdn.com/hypertextstudio/HAFGmMlozdb_pXhG/images/hero-light.png?fit=max&auto=format&n=HAFGmMlozdb_pXhG&q=85&s=23d233cd7cbb4248ad0408b68d7956e0" alt="ATP Light" width="2064" height="1104" data-path="images/hero-light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/hypertextstudio/HAFGmMlozdb_pXhG/images/hero-dark.png?fit=max&auto=format&n=HAFGmMlozdb_pXhG&q=85&s=bcda770327e5f85caf87a6bebdf263e2" alt="ATP Dark" width="2064" height="1104" data-path="images/hero-dark.png" />

# Overview

The Agent Triage Protocol (ATP) is a standardized communication protocol that enables AI agents to request human intervention through a unified notification system. ATP provides a vendor-neutral, transport-agnostic specification for managing decision requests that require human judgment, creating a bridge between autonomous AI systems and human oversight.

## Why ATP?

As AI agents become more capable and autonomous, they increasingly encounter situations where human judgment, approval, or guidance is necessary. Rather than each AI service implementing its own notification and response system, ATP provides a common protocol that allows multiple AI services to coordinate human decision-making through a single, consistent interface.

<CardGroup cols={2}>
  <Card title="Centralized Decision Management" icon="inbox">
    Consolidate decision requests from multiple AI services into a single interface
  </Card>

  <Card title="Standardized Interactions" icon="puzzle-piece">
    Define consistent patterns for gathering user input across different services
  </Card>

  <Card title="Secure Communication" icon="shield">
    Multi-layered security model with robust authentication and authorization
  </Card>

  <Card title="Flexible Deployment" icon="cloud">
    Support for various deployment models from single-user to enterprise
  </Card>
</CardGroup>

## Key Features

* **Asynchronous Communication**: Non-blocking interaction between AI services and humans
* **Type-Safe Response Modeling**: Seven predefined response types for common interaction patterns
* **Fault-Tolerant Design**: Robust error handling and recovery mechanisms
* **Human Factors Engineering**: Designed with user experience as a priority
* **Stateless Protocol Design**: Simplified implementation and horizontal scaling
* **Multi-Layered Security**: Comprehensive security model from end to end

## Getting Started

Follow these guides to start implementing the Agent Triage Protocol in your applications.

<CardGroup cols={2}>
  <Card title="Protocol Architecture" icon="diagram-project" href="/concepts/architecture">
    Understand the core components and message flow of ATP
  </Card>

  <Card title="Message Formats" icon="envelope" href="/concepts/notifications">
    Learn how notifications and responses are structured
  </Card>

  <Card title="Response Types" icon="reply" href="/concepts/response-types">
    Explore the different ways users can respond to notifications
  </Card>

  <Card title="API Reference" icon="code" href="/api-docs/overview">
    View the complete API specification
  </Card>

  <Card title="Your First Notification" icon="bell" href="/tutorials/first-notification">
    Create and send your first notification with ATP
  </Card>
</CardGroup>

## Implementation Examples

The ATP protocol is designed to work with any programming language and framework. Here are examples of implementing ATP in different environments:

```python theme={null}
from atp import ATPClient, TriageNotification, Action, ResponseType

# Initialize the ATP client with service credentials
client = ATPClient(api_key="sk_live_service_abc123")

# Create a notification for a decision
notification = TriageNotification(
    title="Deploy to Production?",
    description="New version 2.1.0 is ready for deployment to production servers.",
    actions=[
        Action(
            id="approve",
            label="Approve Deployment",
            response_type=ResponseType.SIMPLE,
            flags=["irreversible"]
        ),
        Action(
            id="reject",
            label="Reject",
            response_type=ResponseType.TEXT,
            constraints={"placeholder": "Reason for rejection"}
        )
    ],
    deadline=datetime.now() + timedelta(hours=4)
)

# Send the notification
response = client.send_notification(notification)
```

For more complete examples, including client implementations and webhook handlers, see our client examples for various platforms:

<CardGroup cols={2}>
  <Card title="Kotlin Multiplatform" icon="kotlin" href="/examples/clients/kotlin-examples">
    Implementation examples for Kotlin Multiplatform applications
  </Card>

  <Card title="Android" icon="android" href="/examples/clients/android-example">
    Complete Android client with background processing and notifications
  </Card>

  <Card title="Android Integration" icon="code-branch" href="/examples/clients/android-integration">
    Integrating ATP into a modern Android app with dependency injection
  </Card>
</CardGroup>
