> ## 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.

# Add Message • AI Agent SDK

> add_message: Add a message to the session history.

# add\_message

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**GatewaySessionProtocol**](../classes/GatewaySessionProtocol) class in the [**protocols**](../modules/protocols) module.

Add a message to the session history.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def add_message(message: GatewayMessage) -> None
```

## Parameters

<ParamField query="message" type="GatewayMessage" required={true}>
  No description available.
</ParamField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L206">
  `praisonaiagents/gateway/protocols.py` at line 206
</Card>
