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

# Process Conversation • AI Agent SDK

> process_conversation: Process a conversation to extract learnings automatically.

# process\_conversation

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

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

Process a conversation to extract learnings automatically.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def process_conversation(messages: List[Dict[str, Any]], llm: Optional[str]) -> Dict[str, Any]
```

## Parameters

<ParamField query="messages" type="List" required={true}>
  Conversation messages
</ParamField>

<ParamField query="llm" type="Optional[str]" required={false}>
  Optional LLM model to use for extraction
</ParamField>

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  Dictionary with extracted learnings
</ResponseField>

## Source

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