Overview
Memory System
The PilottAI Memory System provides robust storage and retrieval capabilities for agents, enabling context preservation, knowledge persistence, and task history tracking.
Overview
The Memory System is designed to:
- Maintain task execution history
- Store and retrieve semantic information
- Track agent interactions
- Provide context for future tasks
- Support search and similarity matching
Memory Architecture
PilottAI implements a layered memory architecture:
Basic Memory Usage
Initializing Memory
Storing Task Information
Retrieving Task History
Storing Semantic Information
Searching Memory
Enhanced Memory
PilottAI also provides an EnhancedMemory
class for advanced memory capabilities:
Task Memory
Task memory stores the complete history of task 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:
- Task Index: Maps task 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:
Task Context Building
Build rich context for new tasks 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
Example Workflow
Here’s a complete example of memory usage in a multi-agent system:
API Reference
For a complete reference of all Memory System methods and attributes, see the Memory API documentation.