# Multiagent Memory Setup

Import the user's own Claude Code and/or Codex session history (the prompts they typed...

- Repository: https://github.com/topoteretes/cognee (32985 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add topoteretes/cognee --skill multiagent-memory-setup -g -a claude-code -y`
Codex: `npx skills add topoteretes/cognee --skill multiagent-memory-setup -g -a codex -y`
Cursor: `npx skills add topoteretes/cognee --skill multiagent-memory-setup -g -a cursor -y`
Gemini CLI: `npx skills add topoteretes/cognee --skill multiagent-memory-setup -g -a gemini-cli -y`

## Description

Import the user's own Claude Code and/or Codex session history (the prompts they typed and the agents' answers) into one cognee dataset, then answer questions over it, across every agent and per agent. Use when someone wants to load, import or backfill their previous coding-agent sessions into cognee, give several coding agents one shared memory of past work, or ask what their earlier sessions were about. Runs locally; reads ~/.claude and ~/.codex read-only, writes only to cognee's memory.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Import coding-agent sessions

Runs the cookbook in `examples/cookbooks/import_agent_sessions/`. It first finds the coding
agents installed on this machine and the sessions each has kept. One LLM key
(`LLM_API_KEY`, `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`) runs cognee and imports every agent's
history. The chosen agents go into the dataset `imported_agent_sessions`, and each question is
answered over all of them. Setup, the scripts and what each one does are in the cookbook's
[`README.md`](../../../examples/cookbooks/import_agent_sessions/README.md).

Run every command from the repo root.

## Demo

When the user has no Claude Code or Codex history, or wants to see it work first, run the
demo instead of the steps below. It needs one key and imports sample sessions of both
agents (a made-up web shop), never the user's own. It is what the cookbook runs without
`--agents`: `uv run python examples/cookbooks/import_agent_sessions/import_agent_sessions.py`
(`--check` first to check the key; exit 2 with a `MISSING:` line means no key is set). Give
the user the `[ask]` answers and tell them they come from sample data. Pass `--ask "..."` for
their own question.

## Steps

The rest: https://github.com/topoteretes/cognee/blob/HEAD/.agents/skills/multiagent-memory-setup/SKILL.md
