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

# To System Prompt Context • AI Agent SDK

> to_system_prompt_context: Generate context for system prompt injection.

# to\_system\_prompt\_context

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

Generate context for system prompt injection.

## Signature

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

### Returns

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

## Used By

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

## Source

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

***

## Related Documentation

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

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

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