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

# Format For Prompt • AI Agent SDK

> format_for_prompt: Format context for injection into a prompt.

# format\_for\_prompt

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

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

Format context for injection into a prompt.

## Signature

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

## Parameters

<ParamField query="include_sources" type="bool" required={false} default="True">
  No description available.
</ParamField>

### Returns

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

## Source

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