Goal
Store and retrieve information across job runs. This is how agents learn and improve over time, accumulating context, preferences, and patterns that inform future decisions.
Which Agents Use This
- content_creator — Remember what content performs best, posting times, audience preferences
- reviewer — Remember approval patterns, common issues, user feedback preferences
- analytics — Remember performance benchmarks, seasonal patterns, content mix insights
- engagement — Remember response templates, escalation rules, user sentiment patterns
- All agent types benefit from memory to improve over time
Hard Rules
- Memories MUST be scoped per agent instance (agent A's memory ≠ agent B's memory)
- Memory updates allowed (same key overwrites previous value)
- MUST track updated_at timestamp for each memory
- MUST NOT share memories across different agents (isolated per agent)
- MUST NOT delete memories automatically (only explicit deletion or workspace wipe)
- Store insights, not raw data dumps
Steps
bolta.remember — Store Memory
Purpose: Store a key-value pair in long-term memory
1. Validate input
- Key must be non-empty string
- Value must be non-empty string
2. Store memory
- Create or update AgentMemory record
- Scope to current agent_id
- Set updated_at timestamp
3. Return confirmation
- Return success status and whether memory was created or updated
bolta.recall — Retrieve Memory
Purpose: Retrieve information from long-term memory
1. If key provided
- Query AgentMemory for specific key scoped to agent_id
- Return single memory with value and updated_at
2. If key omitted
- Query all memories for agent_id
- Return array of all memories with metadata
3. If memory not found
- Return success: false with clear error message
Output
remember response:
{
"success": true,
"message": "Remembered: best_posting_time",
"action": "updated"
}
recall response (single key):
{
"success": true,
"key": "audience_preference",
"value": "Educational content performs 3x better than promotional. Focus on how-to guides.",
"updated_at": "2026-02-15T14:30:00Z"
}
recall response (all memories):
{
"success": true,
"count": 3,
"memories": [
{
"key": "audience_preference",
"value": "Educational content performs 3x better...",
"updated_at": "2026-02-15T14:30:00Z"
},
{
"key": "best_posting_time",
"value": "Thursday 9am EST - 2x avg engagement",
"updated_at": "2026-02-10T09:00:00Z"
}
]
}
Failure Handling
- If key not found during recall: return success: false with "Memory not found"
- If database write fails: log error, return failure, agent continues without memory
- If invalid key format (empty string): return validation error
Recommended Memory Keys
Content Creator:
audience_preference— What content performs bestbest_posting_time— Optimal timing patternssuccessful_hooks— Hook styles that workavoid_topics— Topics that underperformedplatform_learnings— Platform-specific insights
Reviewer:
creator_patterns— Common issues to watch forapproval_criteria— What makes content approve-worthyuser_preferences— How human likes feedback delivered
Analytics:
performance_benchmarks— Baseline metrics by platformseasonal_patterns— Quarterly/monthly trendscontent_mix_optimal— Ideal ratio of content types
Engagement:
response_templates— What replies work for common questionsescalation_rules— When to flag for humaneffective_de_escalation— What works to calm complaints
Example: Learning Over Time
Job Run #1 (no memory):
Agent drafts post
Uses voice profile + recent posts
→ remember(key="first_run_topic", value="new_feature_launch")
Job Run #5:
Agent recalls memories
Sees: "Educational posts perform 3x better"
Adapts strategy
→ remember(key="feature_post_approach", value="Educational framing works better")
Job Run #10:
Agent recalls all memories
Sees patterns: Thursday 9am, educational framing, data-driven hooks
Applies learned best practices
→ Performance exceeds baseline
→ remember(key="pattern_confirmed", value="Data hooks + educational + Thursday = high engagement")
This is compounding intelligence — agents get smarter over time without human intervention.