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

# Context Pack • AI Agent SDK

> ContextPack: Context pack for orchestrator pattern - retrieval without generation.

# ContextPack

> Defined in the [**models**](../modules/models) module.

<Badge color="blue">AI Agent</Badge>

Context pack for orchestrator pattern - retrieval without generation.

Provides deterministic context that can be passed to Agent.chat\_with\_context().

Attributes:
context: The formatted context string ready for injection
citations: List of source citations
query: The original query
metadata: Additional metadata (timing, retrieval stats, etc.)

## Properties

<ResponseField name="context" type="str">
  No description available.
</ResponseField>

<ResponseField name="citations" type="List">
  No description available.
</ResponseField>

<ResponseField name="query" type="str">
  No description available.
</ResponseField>

<ResponseField name="metadata" type="Dict">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="has_citations()" icon="function" href="../functions/ContextPack-has_citations">
    Check if context pack has citations.
  </Card>

  <Card title="format_for_prompt()" icon="function" href="../functions/ContextPack-format_for_prompt">
    Format context for injection into a prompt.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **from\_dict**: Create from dictionary.
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/rag/models.py#L78">
  `praisonaiagents/rag/models.py` at line 78
</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" />
</CardGroup>
