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

# Get Learn Context • AI Agent SDK

> get_learn_context: Get learning context suitable for injection into system prompt.

# get\_learn\_context

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

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

Get learning context suitable for injection into system prompt.

Returns empty string if learn is not enabled.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_learn_context() -> str
```

### Returns

<ResponseField name="Returns" type="str">
  The result of the operation.
</ResponseField>

## Uses

* `to_system_prompt_context`

## Used By

* [`Agent.get_learn_context`](../functions/Agent-get_learn_context)

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Context Concept" icon="layer-group" href="/docs/concepts/context" />

  <Card title="Context Management" icon="sliders" href="/docs/features/context-management" />

  <Card title="Context Strategies" icon="diagram-project" href="/docs/features/context-strategies" />

  <Card title="Agent Learn" icon="graduation-cap" href="/docs/concepts/agent-learn" />

  <Card title="Learn Configuration" icon="gear" href="/docs/configuration/learn-config" />
</CardGroup>
