Shared Memory
How workforce members share context and persist information across conversations.
Team Memory Store
Every workforce has a shared memory scope that all members can read from and write to. This enables agents to pass context, share findings, and maintain state across interactions.
Memory persists across conversations within the workforce. Data written today is available tomorrow.
Each workforce has its own memory scope. Workforce A cannot read or write to Workforce B's memory.
Optional time-to-live for automatic expiration. Perfect for temporary context or session data.
Memory Operations
Members interact with shared memory using two simple operations:
memory_write(key, value)
Store data in the shared memory under a specified key. Overwrites existing values.
memory_write("lead_info", {
name: "Acme Corp",
contact: "john@acme.com",
status: "qualified"
})memory_read(key)
Retrieve data from shared memory. Returns null if the key doesn't exist.
const lead = memory_read("lead_info")
// Returns: { name: "Acme Corp", ... }Sequence Example
Here's how shared memory enables collaboration between a Sales Agent and CEO Agent:
Sales Agent qualifies a lead
memory_write("qualified_lead_acme", {...leadData})CEO Agent checks for updates
const lead = memory_read("qualified_lead_acme")CEO reviews and responds
"Great work! I see Acme Corp has been qualified with a $50k deal size. Let me follow up directly."
Limits & Configuration
| Setting | Value | Notes |
|---|---|---|
| Max keys per workforce | 1,000 | Older keys are automatically pruned when limit is reached |
| Max value size | 64 KB | Per key-value pair |
| Default TTL | 30 days | Configurable per write operation |
| Scope isolation | Workforce-level | No cross-workforce access |
Common Patterns
Pass context when handing off work between agents.
memory_write("handoff_to_support", {
customer: "...",
issue: "...",
history: [...]
})Track progress on multi-step workflows.
memory_write("campaign_status", {
phase: "content_review",
completed: ["research", "draft"],
pending: ["design", "launch"]
})Build up context over time from multiple sources.
memory_write("competitor_intel", {
...existingData,
[newCompetitor]: findings
})Set short-lived markers with custom TTL.
memory_write("urgent_review_needed", true, {
ttl: "1h"
})memory_write. Check the agent's conversation logs to confirm the write operation was executed.