awe docs

For developers

Codex and other coding agents

awe can share your memory with coding agents other than Claude Code: Codex, Gemini CLI, Cursor, Qwen, aider and others. This page shows the three ways to connect one, starting with the simplest. It is for people who use those agents.

For Claude Code and Cursor’s session hooks, see claude-code-hooks.md.

Three ways to connect

Way What the agent gets Works with
The agent bridge A short instruction that tells the agent to search your awe memory before it answers. Optionally, awe also learns from the agent’s past sessions Codex, Cursor, Gemini CLI, Qwen, Hermes, OpenClaw, WorkBuddy, Cola, or any agent that reads an instruction file
Session hooks Your starting context at session start, and matching memories on each prompt Agents that can run a command as a hook
MCP awe’s memory tools, and its other tools if you allow them Agents that can use MCP servers. See mcp-host.md

You can use more than one.

The agent bridge

The bridge writes a small managed block into the agent’s own instruction file. The block tells the agent to run an awe memory search before it answers, and to carry on without it if awe is not available.

See which agents awe finds on this computer:

./awe-core agents detect

Connect one. Use --dry-run first to see the change without writing it:

./awe-core agents install codex --dry-run
./awe-core agents install codex
Target File the block goes into
codex ~/.codex/AGENTS.md
gemini ~/.gemini/GEMINI.md
qwen ~/.qwen/QWEN.md
hermes ~/.hermes/SOUL.md
openclaw ~/.openclaw/workspace/AGENTS.md
cursor AGENTS.md in the folder you run the command from
workbuddy, cola Shown by --dry-run
generic The file you name with --path
./awe-core agents install generic --path ~/my-agent/INSTRUCTIONS.md

What install does:

  • It adds the block and leaves the rest of the file as it was. A copy of the file is kept with a .bak ending.
  • It creates ~/.awe/bin/awe-core, a link to your awe folder’s engine. The block uses that path, so it keeps working from any folder.
  • It refuses claude-code, because Claude Code already gets your memory through its hooks.

Check that the whole chain works:

./awe-core agents doctor

It ends with doctor: GREEN or doctor: RED, and says whether awe’s background service was reachable. If it is red, start awe with ./start-awe.sh and run it again.

To disconnect:

./awe-core agents remove codex

That takes the block out and leaves your own text in the file.

Let awe learn from the agent’s sessions

This part is separate and off until you turn it on. awe can read an agent’s saved sessions on this computer and keep what is worth remembering, the same way it does for its own chats.

Once, by hand:

./awe-core mem capture-ide --source codex --extract

Every hour:

./awe-core agents enable codex
./awe-core agents enable codex --cron "0 */6 * * *"
./awe-core agents disable codex
  • Sources are codex, cursor, claude-code, hermes, openclaw and auto.
  • enable adds a scheduled task named agent-capture-<source>. You can see it with ./awe-core schedule list. disable removes it.
  • --since-hours and --max-turns on capture-ide limit how far back and how much one run reads.

Memories learned this way are filed as captured, so you can tell them apart from what you told awe yourself.

Session hooks

The integrations/ folder in your awe folder has a ready-made piece for each tool:

Folder What is in it
integrations/codex-cli/ A snippet for ~/.codex/config.toml: a session-start hook and a per-prompt hook
integrations/gemini-cli/ A snippet for Gemini CLI’s settings.json with the same two hooks
integrations/aider/ aider-with-awe.sh, a wrapper that hands aider your starting context as a read-only file
integrations/open-interpreter/ oi-with-awe.sh, the same kind of wrapper
integrations/continue-dev/ A snippet for Continue’s config.yaml
integrations/zed/ Steps to add awe to Zed as a context server
integrations/jetbrains/ Steps to add an External Tool
integrations/claude-code-plugin/ A Claude Code plugin

Each folder has a README.md. The hook format belongs to the other tool and changes between its versions, so check that tool’s own documentation as well.

The hooks call awe-hook-bin, the small program described in claude-code-hooks.md:

Command Use
awe-hook-bin codex-session, gemini-session, aider-session, oi-session, zed-session, continue-session, jetbrains-session Print your starting context for that tool
awe-hook-bin sock prompt Send the prompt to awe and print matching memories
awe-hook-bin sock flush Ask awe to process the session

One thing to change in the snippets. They call awe-hook-bin by its bare name, and that program is not on your PATH. Either link it onto your PATH (for example ln -s "/path/to/awe/awe-hook-bin" ~/.local/bin/awe-hook-bin), or write each hook command with the full path:

"/path/to/awe/awe-hook-bin" codex-session
"/path/to/awe/awe-hook-bin" sock prompt

It finds the awe folder from where it is run, then AWE_PROJECT_PATH, then its own location, so it works from any project. The two wrapper scripts call it the same way.

The awe folder also carries its own .codex/config.toml, .gemini/settings.json and .continue/config.yaml, for sessions you start inside the awe folder.

Troubleshooting

  • The agent does not search memory: run ./awe-core agents doctor. Then open the agent’s instruction file and check that the awe block is there. Some agents read the file only when a new session starts.
  • A hook does nothing: run its command by hand in a terminal. If it prints nothing, check that the command names the real awe-hook-bin (or a link to it) and that awe is running.
  • Nothing is learned from my sessions: capture is off until you run agents enable or mem capture-ide.