Guide · Agent skill
How to use the Import Coding-Agent Sessions agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This skill lets an agent take your past Claude Code and/or Codex chat history, meaning the prompts you typed and the agents' replies, and import it into one cognee dataset on your own machine. After it runs, you can ask what you worked on across all your agents or for each agent separately. This guide explains what the skill does, how to install it, how to trigger it, and what it needs and sends over the network.
Quick start
- 1Install the skill. Download the ZIP from the skill's page, unzip it, and place it in ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps, upload it under Settings → Capabilities → Skills.
- 2Set up cognee and your key. Install cognee from the repository, make sure uv is available, and set one of LLM_API_KEY, OPENAI_API_KEY or ANTHROPIC_API_KEY. Then run the check command.
- 3Ask for an import. Tell the agent in plain language that you want to import or backfill your earlier coding sessions. The agent will check your machine first.
- 4Choose agents and projects. When asked, pick which agents and which projects to include. Every imported session is sent to your LLM provider, so only include what you are comfortable sharing.
- 5Ask your questions. Read the answers the agent gives for all sessions and for each agent. For later questions, use the ask script without importing again.
What the skill makes the agent do
The skill teaches an agent to read the session history that Claude Code and Codex keep on your machine, from ~/.claude and ~/.codex. It reads these folders read-only and writes only to cognee's memory.
It imports the sessions into the cognee dataset named imported_agent_sessions. Once they are there, the agent can answer questions over all the chosen agents at once, or over each agent on its own.
- Finds which coding agents are installed and how many sessions each has kept
- Imports the sessions you choose into one cognee dataset
- Answers questions about earlier work without importing again
Install the skill from the ZIP or the Claude apps
Download the ZIP from the skill's page on this directory and unzip it. Put the resulting skill folder in ~/.claude/skills/ to make it available to you everywhere, or in a project's .claude/skills/ folder to limit it to that project.
If you use the Claude apps instead, open Settings, go to Capabilities, and upload the skill under Skills.
- Personal install: ~/.claude/skills/
- Project install: the .claude/skills/ folder inside your project
- Claude apps: Settings → Capabilities → Skills
Check what you need before you start
The skill runs a cookbook from the cognee repository, so you need cognee installed from that repository and Python with uv. You also need one LLM API key. The skill accepts LLM_API_KEY, OPENAI_API_KEY or ANTHROPIC_API_KEY.
You need local Claude Code and/or Codex session history, because the skill reads it from ~/.claude and ~/.codex. If you have no such history, the skill can run a demo with sample sessions instead, and that demo does not use your own data.
- Python with uv
- cognee installed from the repository
- One LLM API key: LLM_API_KEY, OPENAI_API_KEY or ANTHROPIC_API_KEY
- Local Claude Code and/or Codex session history
uv run python examples/cookbooks/import_agent_sessions/import_agent_sessions.py --checkTrigger the skill with natural requests
You don't need a special command. Ask in plain language and the agent will pick up the skill when your request matches its purpose. Requests such as loading your previous sessions, backfilling your history, giving several agents one shared memory, or asking what your earlier sessions were about should all fit.
The agent will then check your setup, tell you which agents and sessions it found, and ask which agents and projects to include before it imports anything.
- "Import my Claude Code sessions into cognee."
- "Backfill my Codex history so my agents share one memory."
- "What were my earlier coding sessions about?"
Walk through an import step by step
First the agent runs the check. If a key is missing, it names the fix and stops, and it will not ask you to paste the key into the chat. If the check passes, it lists each agent, how it is installed, and how many sessions it has. It also names any apps whose chats can't be read, such as Claude desktop chats, Cursor's own agent, and ChatGPT.
Next the agent asks which agents and which projects to include. It will not choose for you. Then it runs the import with your choices and passes along your question. The answers appear as all-sessions results and, when two agents are chosen, one result per agent. The first import of 20 sessions takes a few minutes.
- Default limit is 20 sessions unless you ask for more
- Use a date range to limit the period imported
- Pass your question with --ask, or the run asks what you worked on in these sessions
uv run python examples/cookbooks/import_agent_sessions/import_agent_sessions.py --agents claude,codex --project <path> --ask "What did I work on?"Ask later questions without importing again
Once the sessions are in the dataset, you can ask new questions without a second import. Run the ask script and list only the agents you chose during the import.
If you want to start over, the skill can clear the dataset, but only when you ask for it. Clearing forgets everything the dataset holds and does not touch ~/.claude or ~/.codex.
uv run python examples/cookbooks/import_agent_sessions/scripts/ask.py "your question" --agents claude,codexSafety: what leaves your machine and what is redacted
The skill runs scripts and uses the network. Every imported session is sent to the provider behind the LLM key you chose, and each one costs LLM calls. Only run an import when you want one, and raise the limit only when you want more history.
Redaction catches common key formats and values with secret-style names, such as DB_PASSWORD=. It does not catch everything. If your project holds confidential code or secrets, do not assume they are removed. Look at a few files in the sessions folder first.
- Session text is sent to your LLM provider
- Redaction covers common key formats and secret-named values only
- Do not import projects holding confidential code without checking first
What people use it for
- Searching what you worked on last month across Claude Code and Codex
- Giving Claude Code and Codex one shared memory of past work on the same project
- Recalling the reasoning behind an earlier decision in a project
- Trying the skill on its sample sessions before using your own history
Frequently asked questions
How do I install the multiagent-memory-setup skill?
Download the ZIP from the skill's page and unzip it. Place the folder in ~/.claude/skills/ for personal use, or in a project's .claude/skills/ folder for one project. In the Claude apps, you can upload it under Settings → Capabilities → Skills.
What do I need to run it?
You need Python with uv, cognee installed from the repository, one LLM API key (LLM_API_KEY, OPENAI_API_KEY or ANTHROPIC_API_KEY), and local Claude Code and/or Codex session history. The skill reads that history from ~/.claude and ~/.codex.
Is it free to use?
The source does not state a price or licence terms for this skill. It does say that every imported session is sent to your LLM provider and costs LLM calls, so you should expect usage costs from that provider. Check the repository's licence for the project's terms.
Does it send my code to the cloud?
Session text is sent to the provider behind the LLM key you chose, because that is how cognee processes it. Redaction only catches common key formats and secret-named values, so sensitive content may still be sent. Avoid importing projects with confidential code or secrets.
Can it import Cursor or ChatGPT chats?
No. The skill reports Claude desktop chats, Cursor's own agent and ChatGPT as not imported, and explains why their chats can't be read. It imports Claude Code and Codex session history.
Is there a way to try it without my own history?
Yes. The demo imports sample sessions of both agents for a made-up web shop, and never touches your own sessions. It needs one LLM key, and the answers it gives come from sample data.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits developers who use Claude Code or Codex and want one searchable memory of past work shared across agents. It is a poor fit if you have no such session history, or if you cannot send your session text to an LLM provider or your project holds confidential code or secrets. In those cases, use the demo or pick a different approach.
Download the skill