[KongchangAI]
· 2 min read· 1,210 words

Trace Canvas: Giving All AI Agents a Shared Cross-Device Memory Map

Trace Canvas: Giving All AI Agents a Shared Cross-Device Memory Map

Open-source project Trace Canvas provides a shared memory canvas for multi-Agent, multi-device use, with built-in human confirmation for risky operations.

Trace Canvas is a locally running open-source memory layer designed to solve context fragmentation between AI Agents like Claude Code, Codex, and Gemini CLI, as well as across multiple devices. Through a visual canvas readable by both humans and machines, it aggregates operation records from different Agents onto the same map, achieving memory continuity across sessions and devices—so users can still look up previous installation and configuration information after switching Agents or computers. The project also includes a human confirmation mechanism for risky operations, stopping to explain reasons and wait for user decisions when encountering risky installations. Open source and local operation ensure data stays on the user's devices, but shared memory also brings potential risks of record contamination and convergent judgment.

Why Does Your AI Agent Always "Forget"?

You write a script with Claude Code, then switch to Codex to continue debugging—and it has no idea what dependencies the previous Agent installed. Switch to another computer and ask Gemini CLI, and it can't even find the environment you configured yesterday. This isn't a model capability problem; it's a lack of shared context between Agents and across devices.

The open-source project Trace Canvas attempts to solve this pain point: it provides a "canvas" that both humans and Agents can understand, aggregating operation records from multiple computers onto the same map. Whether you switch Agents or switch devices, the memory is there.

AI Agent refers to AI programs capable of perceiving their environment, autonomously planning, and invoking tools to execute tasks, such as Claude Code, Codex, and Gemini CLI. Unlike ordinary chatbots, Agents typically have file read/write and command execution capabilities, but their context window is limited, and state is not preserved after a session ends, causing "amnesia" across sessions and devices. A memory layer is an external component that provides persistent context storage and retrieval for Agents; common approaches include vector databases, knowledge graphs, or structured logs. Trace Canvas belongs to the latter category, achieving lightweight shared memory through a visual canvas.

Trace Canvas's Core Design: One Map, Read by Many

According to the introduction on Bilibili, Trace Canvas positions itself as a locally running open-source memory layer compatible with mainstream Agent tools such as Claude Code, Codex, and Gemini CLI. Its core mechanism can be broken down into three layers:

  • Unified canvas: Operations from different Agents are recorded on the same visual canvas, rather than scattered across their respective chat histories.
  • Cross-device sync: Records from several computers all point to this map, and an Agent on any device can read the traces left by other devices.
  • Human-machine co-reading: The canvas serves both Agent context retrieval and direct human inspection of "what was installed on that machine yesterday and how it was configured."

The cleverness of this design is that it doesn't try to modify the Agents themselves, but instead builds an external readable memory plane. As long as an Agent can read the canvas, it gains continuity across sessions and devices.

Records from several computers are all on the same map

Visual canvas is technically usually implemented as an interactive node-edge graph, where each node represents an operation (such as installing a dependency or modifying a configuration) and edges represent temporal or causal relationships between operations. This structure is easy for humans to understand intuitively, and also easy for Agents to retrieve relevant history through graph traversal APIs. Cross-device sync relies on local-first synchronization mechanisms, such as CRDTs (Conflict-free Replicated Data Types) or Git-style version control, ensuring that offline operations from multiple devices can be merged onto the same canvas. OpenAI's Assistants API and LangChain's Memory module also provide similar memory features, but they are mostly cloud-hosted and bound to a single Agent ecosystem. Trace Canvas's difference lies in local operation and cross-Agent universality.

Real-World Use Cases: From "Digging Through Chat History" to "Just Ask the Agent"

The material describes a very typical scenario: you switch to another computer and can't remember the name of what you installed yesterday on the other one. The traditional approach is to dig through chat history, scroll through terminal history, or just reinstall everything.

The Trace Canvas workflow is to directly ask the Agent on the current computer. It first reads the canvas—records from several computers are all on the same map—so "what the Agent on that computer installed yesterday, how it was configured, and what it was called" can all be found at once.

Behind this is actually a supplement to Agent workflow continuity. Many Agent tools are very capable within a single machine and a single session, but their memory is fragmented. Trace Canvas stitches fragmented memory together with a shared canvas.

What was installed and how it was configured, all found at once

Risk Interception: The Agent Stops First for Risky Installations

Another noteworthy design of Trace Canvas is the human confirmation mechanism for risky operations. When encountering a risky installation, the Agent does not execute it directly but stops to explain the reasons clearly and waits for your decision—only after you nod does it install.

This detail shows that beyond "shared memory," the project also considers shared decision-making. If cross-device memory merely records and replays indiscriminately, risk is amplified—a dangerous installation automatically reproduced by Agents on multiple machines could have more serious consequences. Stopping to explain the reasons clearly is essentially putting humans back into the decision loop.

After installation is complete, the result is also sent back along this line and recorded on the canvas. That way, when the next computer asks, it can still be found.

It stops when encountering a risky installation

Human confirmation mechanism (human-in-the-loop) is a key design pattern in the Agent safety field, referring to inserting a human approval node before an Agent executes a high-risk operation. Common implementations include: rule-based risk classification (such as triggering when sudo, rm -rf, or installation from unknown sources is detected), LLM-based intent assessment, and display of operation previews and rollback plans. Trace Canvas writes confirmation records onto the canvas as well, forming an audit trail, similar to change management processes in DevOps. It is worth noting that this mechanism only covers the installation phase; whether configuration modifications, data deletion, and other operations are similarly intercepted is not specified in the original text, so its rule coverage should be noted in actual use.

The Significance of Open Source and Local Operation

Trace Canvas's choice of open source and local operation is crucial for this type of tool. Agent memory often contains configuration details, installation commands, and even paths and credential clues. Hosting this data on a third-party cloud brings additional trust costs. Local operation means canvas data stays on your own devices, and the boundaries of cross-device sync are controlled by you.

Open source allows the recording format and reading logic of this memory layer to be audited and extended. For developers who need to switch between multiple Agents, this is more controllable than a closed black-box memory service.

After installation, it's also sent back along this line

A Little Critical Thinking

Trace Canvas solves the real pain point of "memory continuity," but it also brings a new problem: the more memory is shared, the larger the contamination surface. If a canvas contains incorrect configurations or outdated installation records, all Agents may read and follow them. The risk interception mechanism alleviates problems in the installation phase, but the accuracy and timeliness of the records themselves still need to be maintained by users.

In addition, multiple Agents sharing one canvas and reading the same context also means their judgments may converge. Shared memory improves efficiency, but it does not automatically bring more diverse perspectives.

Who It's For

If you frequently switch between Claude Code, Codex, and Gemini CLI, or have multiple development machines that need to maintain consistent environmental awareness, Trace Canvas's approach is worth trying. It doesn't aim to replace any Agent, but to be the shared foundation beneath the Agents—switch Agents or switch computers, and the memory follows.

#Trace Canvas#AI Agent shared memory#cross-device memory#Claude Code#Gemini CLI#open-source memory layer#human-in-the-loop
Share:

Related articles