What is the Morphik Agent?
The Morphik Agent is an intelligent assistant that can autonomously use various tools to answer complex queries. Unlike the regularquery
method which retrieves and generates responses from existing documents, the agent can:
- Plan and execute: Decide which tools to use based on your query
- Perform calculations: Write and run Python code for analysis
- Explore relationships: Navigate knowledge graphs to find connections
- Remember context: Save insights for future queries
- Generate rich content: Provide structured responses with text and images
When should I use agent_query
vs query
?
Use agent_query
when you need:
✅ Multi-step analysis
Use regular query
when you need:
✅ Quick fact-finding
How do I interpret agent responses?
The agent returns a rich dictionary with four components:1. Main Response
2. Tool History (understand what the agent did)
3. Display Objects (structured content)
4. Sources (attribution)
Best Practices
1. Be specific about your goals
2. Use memory for complex projects
3. Validate important results
Common Use Cases
Financial Analysis
Customer Research
Competitive Intelligence
Document Intelligence
Troubleshooting
Agent is taking too long
- Break complex queries into smaller steps
- Be more specific about what you need
- Check if you’re asking for too many calculations
Results seem incomplete
- Check the
tool_history
to see what the agent tried - Look for error messages in tool results
- Try rephrasing your query more clearly
Want to see intermediate steps
Limitations
- Response time: Agent queries take longer than regular queries (10-60 seconds)
- Usage limits: Cloud deployments may have rate limits for agent calls
- Context window: Very complex queries might exceed the model’s context window
- Tool availability: Some tools may not be available in all deployments
query
method will be faster and more cost-effective.