Memory System
The PilottAI Memory System provides robust storage and retrieval capabilities for agents, enabling context preservation, knowledge persistence, and job history tracking.Overview
The Memory System is designed to:- Maintain job execution history
- Store and retrieve semantic information
- Track agent interactions
- Provide context for future jobs
- Support search and similarity matching
Memory Architecture
PilottAI implements a layered memory architecture:Basic Memory Usage
Initializing Memory
Storing Job Information
Retrieving Job History
Storing Semantic Information
Searching Memory
Enhanced Memory
PilottAI also provides anEnhancedMemory
class for advanced memory capabilities:
Job Memory
Job memory stores the complete history of job execution:Memory Maintenance
PilottAI automatically manages memory with cleanup functionality:Memory Architecture Details
Memory Entry
Each memory entry contains:Memory Indices
The memory system maintains several indices for efficient retrieval:- Job Index: Maps job IDs to related entries
- Agent Index: Maps agent IDs to related entries
- Tag Index: Maps tags to related entries
- Timestamp Index: Organizes entries chronologically
- Priority Index: Groups entries by priority level
Memory Persistence
By default, memory is stored in-memory, but PilottAI supports persistence options:Advanced Memory Features
Pattern Recognition
The enhanced memory system can identify patterns in stored information:Agent Interaction History
Track interactions between agents:Job Context Building
Build rich context for new jobs based on history:Best Practices
- Use Tags Consistently: Develop a consistent tagging schema for easy retrieval
- Prioritize Important Information: Set higher priority for critical data
- Cleanup Regularly: Implement regular cleanup for optimal performance
- Use TTL for Temporal Data: Set time-to-live for information that expires
- Store Structured Metadata: Use structured metadata for better searchability