---
title: Shared Memory Schema for Multi-Agent AI Chatbots
description: Design a typed shared state and memory schema for multi-agent chatbots so verified customer facts persist cleanly across specialist handoffs.
canonical: "https://botsquad.ai/j/define-shared-state-memory-schema-agent-teams"
modified: 2026-11-14
author: botsquad.ai editorial team
source: "https://botsquad.ai"
category: Multi-Agent Architecture & Orchestration
category_url: "https://botsquad.ai/j#group-multi-agent-orchestration"
---

# Define a shared session memory schema across specialist bots

> Stop asking customers to repeat their email, order number, or goal every time a new specialist assistant joins the conversation.

## Prepared starting prompt

Help me design a JSON session state schema shared by our Qualification, Technical Scoping, and Scheduling bots so users never repeat facts.

### Quick scenarios
- **E-commerce order + auth state:** Create a shared state object for verified customer ID, active order number, and refund eligibility.
- **Ephemeral vs long-term memory:** Separate single-session troubleshooting facts from persistent workspace preferences across visits.
- **Prevent memory poisoning:** Ensure unverified user claims cannot overwrite authenticated CRM tier fields in shared memory.

- [Join Early Access Waitlist](https://botsquad.ai/#waitlist-14a5d2)

## Steps to structure multi-agent session memory

1. **Separate verified facts from user assertions** — Store API-authenticated attributes like plan tier and account ID in read-only slots separate from conversational user preferences.
2. **Keep a rolling structured scratchpad** — Maintain concise JSON keys for current goal, resolved blockers, and open questions instead of re-feeding 40 raw chat turns.
3. **Define per-field write ownership** — Allow only designated agents or deterministic webhook tools to mutate sensitive state keys such as eligibility or booking status.
4. **Set TTL expiration on transient context** — Expire temporary troubleshooting symptoms after session closure while retaining opted-in workspace preferences safely.

## How it works in practice

### Current repetitive chat experience

User gives company size (120 seats) and stack (Okta + Snowflake) to Sales Bot, then Solutions Bot asks for team size and SSO provider all over again.

### Shared session state payload

{"account_context": {"seats": 120, "sso": "Okta", "warehouse": "Snowflake", "source": "user_stated"}, "qualification_stage": "technical_fit", "open_questions": ["data_residency_region"]}

Injecting a compact 6-field JSON state lets the Solutions Bot open with 'Since you run Okta and Snowflake for 120 seats, let's check residency.'

## Frequently Asked Questions

### Why not pass the entire raw chat transcript to every specialist agent?

Long transcripts inflate token costs, slow down time-to-first-token, and distract downstream agents with outdated tangents from earlier topics.

### How do we stop a confused agent from corrupting shared memory?

Validate every memory update against a strict JSON schema and restrict critical fields so only deterministic backend tool responses can write them.

### Should customers be able to view or reset saved chatbot preferences?

Yes—providing a simple command or settings toggle to clear remembered preferences improves accuracy when user projects change and supports privacy trust.

## Learn more

- [Seven core truths about conversational AI technology leaders need to understand](https://botsquad.ai/conversational-ai-technology.md)
- [How AI chatbots are reshaping task management](https://botsquad.ai/ai-chatbot-task-management-solutions.md)
- [AI chatbot for time management: what actually works](https://botsquad.ai/ai-chatbot-for-time-management.md)
- [Conversational agents: capabilities, failures, and cultural impact](https://botsquad.ai/conversational-agents.md)
- [Conversational AI analytics: why most chatbots underdeliver](https://botsquad.ai/conversational-ai-analytics.md)
- [AI chatbot for lead generation: what works and what fails](https://botsquad.ai/ai-chatbot-for-lead-generation.md)

## Related tasks in this category

- [Design a supervisor-router architecture for specialist AI chatbots](https://botsquad.ai/j/design-supervisor-router-agent-architecture.md)
- [Prevent infinite loops and ping-ponging between AI agents](https://botsquad.ai/j/prevent-infinite-loops-multi-agent-handoffs.md)
- [Orchestrate parallel sub-agents for research and synthesis workflows](https://botsquad.ai/j/configure-parallel-subagent-research-synthesis.md)
- [Scope API and tool-calling permissions for each specialist agent](https://botsquad.ai/j/set-tool-calling-permissions-per-specialist-bot.md)
- [Add a critic-verifier agent to check drafts before user delivery](https://botsquad.ai/j/build-critic-verifier-agent-output-review.md)
- [Refactor a bloated monolithic bot into focused domain specialists](https://botsquad.ai/j/split-monolithic-prompt-into-specialist-bots.md)

---

*Published by **Wondel.ai sp. z o.o.** · [botsquad.ai](https://botsquad.ai) · [About](https://botsquad.ai/about) · [Editorial Guidelines](https://botsquad.ai/editorial) · [Contact](https://botsquad.ai/contact) · [Wondel.ai Products](https://wondel.ai/products)*