如何透過 Beacon 讓 Claude Code、Codex 和 Cursor 共用記憶
How to share memory between Claude Code, Codex and Cursor with Beacon
Beacon by Asymptote Labs 可把 Claude Code、Codex 和 Cursor 等工具的工作階段記錄整理成其他智能體可檢索的知識。
You fix a mistake in Claude Code. Tomorrow you open Codex or Cursor and correct the exact same mistake again, because each harness keeps its own memory. Beacon by Asymptote Labs is an open-source, local-first memory layer that sits across the harness layer. It captures session history from Claude Code, Cursor, Codex, OpenCode, Cline and 20+ other harnesses into one OpenTelemetry-based trace format, then turns useful workflows, corrections and debugging patterns into reviewed knowledge that future agents can retrieve through MCP or Agent Skills.
The README sums it up in one line: a problem solved by one agent should not need to be learned from scratch by another.
This guide sets Beacon up in Local mode, shows how to check what it captured, and covers the two other jobs it does well: exact session replay and sending agent activity to a SIEM.
Before you start: Local vs Beacon Cloud
Interactive setup signs in through beacon.sh and preselects Beacon Cloud, with an explicit Local opt-out. Signing in forwards nothing. Confirming Beacon Cloud installs Beacon and starts forwarding your history to Asymptote Labs, and the confirm screen says so before you accept.
Beacon records prompts, responses, commands and file edits. If you ever paste an API key into an agent, it can end up in a trace. If you want everything to stay on your machine, pick Local. You can disconnect a cloud endpoint any time with beacon endpoint disconnect.
Install
The fastest path is to let your coding agent do it. Paste this into Claude Code, Codex or Cursor:
Read https://beacon.sh/start.md then set me up on Beacon
Or install by hand on macOS:
brew update
brew trust asymptote-labs/tap
brew tap asymptote-labs/tap
brew install beacon
beacon endpoint install
On Linux (Debian, Ubuntu, Fedora, RHEL, Rocky, Alma) the installer picks the .deb or .rpm for your architecture and verifies it against the release checksums.txt:
curl -fsSL https://github.com/asymptote-labs/agent-beacon/releases/latest/download/install.sh | bash
If you prefer not to pipe a script into your shell, download it, read it with less install.sh, then run bash install.sh. On Windows, download the x64 MSI from the latest release and run msiexec /i BeaconEndpointAgent-<version>-x64.msi.
When beacon endpoint install asks for a destination, choose Local.
Install the Beacon Skills
Whichever destination you pick, the wizard installs the Beacon Skills into ~/.agents/skills and ~/.claude/skills unless you turn them off. These are the Agent Skills that recall and distill project memory from your traces. To redo or undo that later:
beacon skills install
beacon skills uninstall
In Claude Code you can also install the plugin from the repo's marketplace with /plugin marketplace add asymptote-labs/agent-beacon, or use the skills CLI with npx skills add asymptote-labs/agent-beacon.
Use your agents normally
That is the whole step. Open Claude Code, Cursor, Codex or any supported harness and work as usual. Beacon captures session history in the background.
Check what Beacon captured
beacon traces
This opens a local terminal browser for traces, event timelines, token usage and retained content. Nothing is sent anywhere. For a local web view:
beacon endpoint dashboard
Or read the raw event stream directly at ~/.beacon/endpoint/logs/runtime.jsonl. It is plain JSONL, so you are never dependent on the UI.
Recall memory from another agent
Beacon's loop is: run agents, capture history, evaluate what worked, extract useful knowledge, review and approve, reuse across future agents. That review step matters. Expect to curate what Beacon extracts rather than get perfect memory on day one.
To expose memory over MCP:
- Locally:
beacon mcp serveruns the localbeaconMCP server, which never touches the network. - With Beacon Cloud:
beacon mcp connectregisters thebeacon-managedMCP server in Claude Code, Codex CLI, Cursor, VS Code, Gemini CLI and OpenCode. Each harness signs in with OAuth the first time, no token is written, andbeacon mcp disconnectremoves exactly what it added.
A good first test prompt, run in a second harness after a session in the first:
Recall what Beacon learned about <project task> in this repo and tell me which past session it came from.
Bonus 1: replay exactly what an agent did
Each session becomes one trace with prompts, tool calls, commands, edits, approvals, MCP activity and tokens. In the dashboard, session pages show lenses, such as files changed with their diffs, an itemized token bill, a security review grouped by risk, or the approval timeline. The README warns to install only lenses you trust with your traces.
Coverage differs by harness. In the support table, Codex CLI does not report file activity and Cursor does not report tokens, while Claude Code reports every column.
Bonus 2: send agent activity to your SIEM
Beacon writes local JSONL by default and can forward the same normalized history to Splunk HEC or CrowdStrike Falcon LogScale HEC during install or repair. Microsoft Sentinel, Sumo Logic, Wazuh and Rapid7 InsightIDR use Beacon content packs, Datadog and Elastic collect the local JSONL with their own agents, and S3 or GCS work through Vector. The per-SIEM steps live at docs.beacon.sh. Forwarding sends prompts and commands off the machine, so tell developers what is captured.
Use cases with copy-paste prompts
- Share memory between Claude Code, Codex and Cursor
- Replay exactly what your coding agent did
- Send coding agent activity to your SIEM
Get one email every Monday with the week's hottest AI repos and exactly how to use them: subscribe free at dedupedai.com
來源:DEV Community · dev.to