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

# Agent Protocol • AI Agent SDK

> AgentProtocol: Minimal Protocol for agent implementations.

# AgentProtocol

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

Minimal Protocol for agent implementations.

This defines the essential interface that any agent must provide.
It enables proper mocking and testing without real LLM dependencies.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    input["Input Data"] --> agent["Agent: AgentProtocol"]
    agent --> output["Output Result"]
    style agent fill:#8B0000,color:#fff
    style input fill:#8B0000,color:#fff
    style output fill:#8B0000,color:#fff
```

## Methods

> [card] [name()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/AgentProtocol-name.md)
>
> Agent's name identifier.

> [card] [chat()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/AgentProtocol-chat.md)
>
> Synchronous chat with the agent.

> [card] [achat()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/AgentProtocol-achat.md)
>
> Asynchronous chat with the agent.

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Create a mock agent for testing
    class MockAgent:
        @property
        def name(self) -> str:
            return "TestAgent"
        
        def chat(self, prompt: str, **kwargs) -> str:
            return "Mock response"
        
        async def achat(self, prompt: str, **kwargs) -> str:
            return "Async mock response"
    
    # Use in tests
    agent: AgentProtocol = MockAgent()
    result = agent.chat("Hello")
```

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/protocols.py#L35)
>
> `praisonaiagents/agent/protocols.py` at line 35

***

## Related Documentation

> [card] [Agents Concept](https://praison.ai/docs/docs/concepts/agents)

> [card] [Single Agent Guide](https://praison.ai/docs/docs/guides/single-agent)

> [card] [Multi-Agent Guide](https://praison.ai/docs/docs/guides/multi-agent)

> [card] [Agent Configuration](https://praison.ai/docs/docs/configuration/agent-config)

> [card] [Auto Agents](https://praison.ai/docs/docs/features/autoagents)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.