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

Method

> This is a method of the [**LearnManagerProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/LearnManagerProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Generate context for system prompt injection.

## Signature

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

### Returns

**Returns** `str`

The result of the operation.

## Used By

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

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/memory/learn/protocols.py#L239)
>
> `praisonaiagents/memory/learn/protocols.py` at line 239

***

## Related Documentation

> [card] [Context Concept](https://praison.ai/docs/docs/concepts/context)

> [card] [Context Management](https://praison.ai/docs/docs/features/context-management)

> [card] [Context Strategies](https://praison.ai/docs/docs/features/context-strategies)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.