How Agentic Retrieval Works
The agent:- Analyzes the query to understand intent
- Decomposes into multiple sub-queries
- Executes each sub-query using hybrid search
- Aggregates and re-ranks results by relevance
When to Use Agentic Retrieval
Good Candidates for Agentic
Better Suited for Hybrid
Basic Usage
Setmethod to "agentic" on /api/v2/memory/search, and give the request a longer timeout than you would a hybrid search.
A search response carries
episodes, profiles, agent_cases, agent_skills and unprocessed_messages. Which of these are populated depends on what the owner has and on include_profile.Complex Query Examples
Example 1: Meeting Preparation
Example 2: Decision History
Example 3: Relationship Analysis
Cost and Latency Considerations
Agentic retrieval has higher resource usage:Optimizing Agentic Queries
Fallback Strategy
Implement a tiered retrieval strategy:Calling Agentic Retrieval from Async Code
The Python SDK is synchronous. For an async service, either run the client in a thread or call the endpoint directly with an async HTTP client.Best Practices
Query Formulation
Query Formulation
Write detailed queries that explain what context you need:Note that
query cannot be empty. An empty string is rejected with a 422.Timeout Handling
Timeout Handling
Set the timeout on the client, and always have a fallback:The 1.x client does not retry on its own, so any retry or backoff is yours to add.
Result Caching
Result Caching
Cache results for repeated complex queries:
Selective Use
Selective Use
Reserve agentic for high-value queries where accuracy matters:
Next Steps
Concepts Guide
Compare all retrieval methods
Python Integration
Production patterns with timeout handling

