Overview
ThesearchChatHistory
tool transforms your agent executions into a queryable data warehouse. Every agent run creates a permanent record that can be analyzed, aggregated, and reported on by other agents.
How Search-Chat-History Works
Technical Implementation
Search Capabilities
- Full-text search across all agent outputs
- Semantic matching - finds conceptually related content
- Time-based filtering - recent vs relevant sorting
- Execution context - can filter by specific scheduler IDs
- Multi-format - searches both messages and documents
KPI Monitoring Patterns
Pattern 1: Daily Aggregation
Pattern 2: Exception Monitoring
Pattern 3: Performance Benchmarking
Advanced Search Strategies
1. Structured Output Parsing
Train your agents to output structured data for easier parsing:2. Tag-Based Organization
Use consistent tags for categorization:3. Hierarchical Reporting
Build reporting chains that progressively summarize:Real-World KPI Monitoring Examples
Example 1: E-commerce Operations Dashboard
Example 2: Sales Team Performance Tracking
Example 3: DevOps Monitoring Chain
Building Effective KPI Search Queries
Query Construction Tips
-
Be Specific with Agent Names
-
Use Consistent Terminology
-
Include Time Markers
-
Leverage Natural Language
Visualization and Reporting
Creating Report Agents
Integration with BI Tools
Performance Optimization
1. Search Query Optimization
- Use specific agent names to narrow search scope
- Leverage time-based sorting for recent data
- Limit result size when only need latest values
2. Data Structure Standardization
3. Caching Strategies
Best Practices
-
Consistent Naming Convention
- Use descriptive agent names:
region-west-sales-tracker
- Include metric type in output:
METRIC:revenue VALUE:12000
- Use descriptive agent names:
-
Time Window Management
- Always include timestamps in outputs
- Use consistent time zones (UTC recommended)
- Plan for time-based aggregations
-
Error Handling
- Log both successes and failures
- Include error context for debugging
- Build separate error-monitoring agents
-
Data Retention
- Consider search performance vs history depth
- Archive old data before deletion
- Plan for compliance requirements
Related Documentation
- Micro-Agent Concepts - Core architecture and chaining patterns
- Context Management - How context flows between agents
- Multi-User Verification - Distributed approval workflows
- Advanced Use Cases - Creative applications and optimization tips
Need help setting up KPI monitoring? Check our agent creation guide or contact support.