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

# autogen.agentchat.contrib.capabilities.agent_capability.AgentCapability

<h2 id="autogen.agentchat.contrib.capabilities.agent_capability.AgentCapability" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">AgentCapability</span>
</h2>

```python theme={null}
AgentCapability()
```

Base class for composable capabilities that can be added to an agent.

### Instance Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### add\_to\_agent

```python theme={null}
add_to_agent(self, agent: ConversableAgent) -> 
```

Adds a particular capability to the given agent. Must be implemented by the capability subclass.<br />An implementation will typically call agent.register\_hook() one or more times. See teachability.py as an example.

<b>Parameters:</b>

| Name    | Description                                                                |
| ------- | -------------------------------------------------------------------------- |
| `agent` | **Type:** [ConversableAgent](/docs/api-reference/autogen/ConversableAgent) |

<br />
