The PilottAI Memory System provides robust storage and retrieval capabilities for agents, enabling context preservation, knowledge persistence, and job history tracking.
# Get complete history for a jobjob_history = await memory.get_job_history( job_id="job-123", include_context=True)# Get job resultjob_result = await memory.get_job_result( job_id="job-123")
# Store semantic information with tagsawait memory.store_semantic( text="Sales increased by 20% in Q4 2023 compared to Q4 2022", metadata={"topic": "sales", "period": "Q4 2023"}, tags={"sales", "analysis", "quarterly"})
# Search by text and tagsresults = await memory.search( query="sales increase", tags={"analysis"}, limit=5)# Get recent entries with tagsrecent_entries = await memory.get_recent( tags={"sales"}, limit=10)
# Build job context with similar jobs and agent historycontext = await memory.build_job_context( job_description="Analyze customer churn for Q1 2024", agent_id="agent-123")