Context Pack • AI Agent SDK
ContextPack: Context pack for orchestrator pattern – retrieval without generation.
ContextPack
Defined in the models module.
AI Agent
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
strNo description available.
ResponseField
List[Citation]No description available.
ResponseField
strNo description available.
ResponseField
Dict[str, Any]No description available.
Methods
has_citations()
Check if context pack has citations.
format_for_prompt()Format context for injection into a prompt.
Internal & Generic Methods
- from_dict: Create from dictionary.
- to_dict: Convert to dictionary.
Source
View on GitHubpraisonaiagents/rag/models.py at line 78