Puenteo

io.github.mano7onamv0.9.1更新於 Oct 6, 2026

Let coding agents talk: search every agent session's history and message live sessions.

概覽

AI 產生的概覽

讓編碼代理共用同一份本機記憶並互相通訊:檢索所有代理工作階段的歷史,並與執行中的工作階段對話。

功能
Puenteo 將本機編碼代理(Claude Code、Codex、Gemini、Cursor、Copilot 等)的工作階段紀錄索引到本機 SQLite 全文索引,助理可以列出工作階段、執行排序檢索、查看工作階段大綱、拉取有預算限制的交接摘要,或顯示指定訊息(R5、R56、R59)。它也提供本機訊息匯流排:查看哪些工作階段正在執行、向另一個工作階段提問並等待回覆、向專案或頻道廣播,以及占用檔案或目錄,避免平行代理修改同一份程式碼(R6、R7、R18)。MCP 伺服器為 stdio 模式,每個代理工作階段一個行程,提供歷史類工具以及 send、reply、inbox、wait、claim、release 等即時工具(R54、R55、R56、R57)。
適用情境
當同一台機器上同時執行多個編碼代理、你不斷在視窗之間複製貼上上下文時適用;也適用於一個代理需要向另一個代理詢問結構描述變更、分支或正在編輯的檔案(R3、R10)。適合在同一倉庫上平行工作、需要避免代理改動同一批檔案的場景(R7)。
執行需求
以本機行程方式透過 uvx 執行 PyPI 套件 puenteo;需要 Python 3.9 或更新版本,無執行期相依套件(R14)。未宣告任何帳號、API 金鑰、標頭或環境變數。可透過 fast 附加項目啟用選用的 Rust 核心(R49)。選用的 HTTP 模式使用 bearer token(R41)。
安裝前請注意
訊息與占用宣告僅屬建議性質,且被標記為不可信的同伴資料,代理會被告知同伴訊息不構成使用者指令或核准(R26)。選用的 HTTP 服務需要 bearer token,存放於權限 0600 的檔案中,且只綁定 127.0.0.1(R41)。安裝會修改各代理的設定檔,但會先備份並可回復(R16)。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Puenteo,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

puenteo

Let your coding agents talk to each other.

When you run Claude Code in one terminal, Codex in another and Gemini or Cursor in the IDE, they can't see each other. One renames a column, another breaks on it, and you end up copy-pasting context between windows. puenteo gives every session on your machine:

  • 🔎 Shared memory: ranked full-text search over the history of every local agent (Claude Code, Codex, Gemini/Antigravity, Cursor, Copilot, OpenCode, Grok, Pi, Qwen, Continue, Aider, OpenHands, Goose), plus structured handoffs: goal, state, files, commits, failures.
  • 💬 Live messaging: see who's running (puenteo ps), ask another session a question and wait for its answer, broadcast to the project, share #channels.
  • 🔒 Coordination: claim files or dirs so parallel agents don't edit the same code. Optional git pre-commit guard.
  • 🔌 Every interface: CLI, MCP (stdio + HTTP), hooks, instant watch, HTTP/SSE, an A2A v1.0 facade, a web dashboard and Python, set up by one puenteo install.

[puenteo dashboard: four agents from different vendors coordinating a schema change]

Codex asks Claude about a schema change and gets the answer two seconds later. Claude claims src/db, Cursor reports its frontend fix and Gemini checks a number for the release notes. All of it runs locally: one SQLite file, no daemon, no network.

Puenteo comes from Spanish puente (bridge).

No runtime dependencies · Python ≥ 3.9 · macOS · Linux · Windows · optional Rust core

[PyPI] [CI] [MCP Registry] [License: MIT]

Install

bash
uv tool install puenteo        # or: pipx install puenteo / pip install puenteouv tool install 'puenteo[fast]'  # + optional Rust core: 3–8x faster parsing and indexingpuenteo install                # skills + MCP server into every detected agentpuenteo install --hooks        # optional: deliver messages through Claude Code / Codex hookspuenteo install --dry-run      # show the plan without changing anything

install is idempotent. It edits only its own puenteo entry in each config, backs up every file it touches (*.puenteo-bak), and puenteo uninstall reverts it.

Claude Code plugin (skills + MCP + hooks + /peers, /ask, /handoff):

bash
claude plugin marketplace add mano7onam/puenteoclaude plugin install puenteo@puenteo

Talk to running sessions

text
$ puenteo ps  AGENT    SESSION        STATUS SEEN  MAIL  NAME                         CWD  claude   500a1d65       busy   2m          ultimate-agent-4-72          ~/dev/ultimate-agent-4* claude   87652461       busy   0s          puenteo-57                   ~/dev/puenteo  codex    01a11123       -      4m          Finish performance tests     ~/dev/ultimate-agent-4
bash
puenteo whoami                                    # your own address, e.g. claude:87652461-…puenteo send codex:01a11123 "Which branch has the perf tests?" --wait 300puenteo send @reviewer "PR ready: feat/x"          # peers can pick a name: puenteo join --name reviewerpuenteo send cwd:. "Refactoring src/db, keep out for 30 min"   # everyone in this projectpuenteo send '#release' "v0.7 tagged"             # channels (posting joins)puenteo send agent:codex "…"   |   puenteo send '*' "…"puenteo inbox                                     # read your messagespuenteo reply <msg-id> "answer"                   # routes back to the sender or channelpuenteo wait -t 120                               # block until a message arrivespuenteo watch                                     # stream incoming messages (for an agent's monitor)puenteo log -f                                    # watch all bus trafficpuenteo claim src/db --note "migration 0042"      # advisory lock; conflicts with overlapping claimspuenteo claims --check src/db/schema.sql          # exit 1 if a peer holds it

Addresses: agent:session-id (a unique prefix works) · @name · #channel · agent:<vendor> · cwd:<path> · *

How messages reach a session:

AgentWoken while idleWhile working
Codexyes, pushed via codex queuehooks / MCP inbox
Claude Codeyes, when the session runs puenteo watch under its Monitor toolhooks (install --hooks) / MCP inbox
Gemini, Cursor, OpenCode, Copilot, Qwen, …no; the message waits in the inboxMCP inbox / wait

All messages live in one local SQLite file (puenteo state dir) and nothing leaves the machine. Bodies are wrapped as untrusted peer data: agents are told that peer messages never count as user instructions or approval. A hop limit, a rate limit and a size cap keep agents from looping.

Ways in: pick what fits your agent or tool

InterfaceUse it forCommand / endpoint
CLIany agent with a shell, scriptspuenteo send/inbox/ps/search … (--json everywhere)
MCP (stdio)Claude Code, Codex, Gemini, Cursor, OpenCode, Copilot, Qwenpuenteo mcp (installed by puenteo install)
Hooksmessages show up in context with no tool callpuenteo install --hooks (Claude Code, Codex)
Monitor / streamwake an idle Claude session the moment mail arrivespuenteo watch (instant; Unix-socket doorbell)
Exec triggerglue for anything: notify-send, Slack, scriptspuenteo watch --exec 'cmd' (message JSON on stdin)
HTTP REST + SSEdashboards, editors, other languagespuenteo serve → /api/*, /api/events
MCP over HTTPMCP clients that prefer HTTPPOST /mcp on puenteo serve
A2A v1.0standard agent-to-agent clients/.well-known/agent-card.json, POST /a2a
Web dashboardwatching and talking to all sessions in a browserpuenteo serve --open
Pythonyour own orchestratorspuenteo.send(), for m in puenteo.listen(): …, puenteo.Bus
Git guardstop commits that touch a file a peer claimedpuenteo guard install

puenteo serve binds only to 127.0.0.1 and needs a bearer token, stored in a 0600 file (puenteo serve --print-token). It rejects any non-localhost Host or Origin header, which blocks DNS rebinding, as the MCP spec recommends for local HTTP servers.

Speed

pure Pythonwith puenteo[fast] (Rust core)
parse transcripts (25 largest, 3.3 GB)~300 MB/s0.8–2.7 GB/s, all cores
cold index rebuild (807 Codex + Claude sessions, ~4 GB)14.8 s4.3 s
global search after new activity~14 s~2 s
warm list (4.5k sessions) / warm search0.3 s / 0.25 ssame
message delivery (send → woken reader)0.8 ms mediansame

The Rust core (native/, PyO3 abi3 wheels) is optional. Without it, puenteo stays pure Python with no dependencies. A test checks that both parsers produce byte-identical output on real logs. Set PUENTEO_NATIVE=0 to force pure Python.

MCP server

puenteo mcp is a stdio MCP server with no dependencies, one process per agent session. It detects which session it serves from the parent-process chain, registers on the bus, and exposes these tools:

  • history: sessions, search, outline, pull, show
  • live: whoami, peers, send, reply, inbox, wait, thread, channels, subscribe, set_name, claim, release, claims

puenteo install registers it for Claude Code (claude mcp add -s user), Codex (codex mcp add), Gemini, Qwen, Cursor, OpenCode, Copilot and Antigravity.

Search and pull history

bash
puenteo search "gatekeeper dmg" --exclude-self       # ranked over ALL sessions (FTS5 index), ~0.2 spuenteo search "topic" --cwd . --since 2026-09-01puenteo list --cwd . -n 20                            # git-style unique id prefixespuenteo outline <ref>                                 # milestones with message #indexpuenteo pull <ref> --mode handoff                     # goal + decisions + latest state, budgetedpuenteo pull <ref> --query "topic" --mode query       # relevant messages + neighbourspuenteo pull <ref> --around 500 --radius 5puenteo show <ref> --range 100:120puenteo export <ref> -f md|html|pdf|json|zip|csv|xml|yaml|all -o outpuenteo index --stats                                 # the index refreshes itself; --clear to reset

<ref> can be a unique id prefix, provider:id, @self, @last, @last:codex, a path, or a title substring. An ambiguous prefix fails with exit code 4 and prints the candidates; puenteo never picks one silently.

Library

python
import puenteo
for s in puenteo.list_sessions(limit=10, cwd="~/dev/myapp"):    print(s.provider, s.session_id, s.title)
hits = puenteo.search("gatekeeper dmg", exclude_session="my-current-id")msgs = puenteo.pull(hits[0].session.session_id, query="dmg", mode="query")puenteo.export_session("019f7a24", fmt="md", output="chat.md")
from puenteo.bus import Buswith Bus() as bus:    bus.send("claude:8765…", "@reviewer", "PR ready")    for m in bus.inbox("codex:01a1…"):        print(m.sender, m.body)

Providers

ProviderStore
Claude Code~/.claude/projects/**/*.jsonl (meta entries skipped, streamed fragments merged)
Codex~/.codex/sessions/**/rollout-*.jsonl + state_*.sqlite titles; subagents keep their own ids
Gemini CLI~/.gemini/tmp/**
Antigravity~/.gemini/antigravity/brain/*/…/transcript*.jsonl
Grok~/.grok/sessions/**/chat_history.jsonl
Pi~/.pi/agent/sessions/**/*.jsonl
Qwen Code~/.qwen/projects/**/chats/*
CursormacOS ~/Library/Application Support/Cursor · Linux ~/.config/Cursor · Windows %APPDATA%\Cursor
Continue~/.continue/sessions/**
Aider.aider.chat.history.md (scan with --cwd or PUENTEO_AIDER_ROOTS)
OpenHands~/.openhands/openhands.db
Goose~/.config/goose · Windows %APPDATA%\goose

Live detection (ps) covers Claude Code (~/.claude/sessions), Codex (thread locks), Grok, Junie, and any agent that runs the puenteo MCP server or hooks.

Where things live

WhatPath (macOS / Linux / Windows)Override
Search index + metadata cache~/Library/Caches/puenteo · ~/.cache/puenteo · %LOCALAPPDATA%\puenteo\CachePUENTEO_HOME, PUENTEO_NO_INDEX=1, PUENTEO_NO_CACHE=1
Message bus~/Library/Application Support/puenteo/bus.db · ~/.local/state/puenteo · %LOCALAPPDATA%\puenteo\StatePUENTEO_BUS
Identitydetected automaticallyPUENTEO_SESSION=agent:id, --as

Extend it

New agent store, MCP tool, delivery channel (Slack, IDE…) or live detector? Write a plugin. It's an ordinary package with entry points, and you don't have to fork anything. See docs/PLUGINS.md and the template in examples/puenteo-example-plugin. Run puenteo plugins to see what's loaded.

Contributions to the core, from individuals, companies and AI agents, go through the same gates: CI on 3 OSes, a zero-dependency check, a security scan, DCO sign-off and code-owner review. See CONTRIBUTING.md and GOVERNANCE.md.

Development

bash
python3 -m venv .venv && .venv/bin/pip install -e '.[dev]'.venv/bin/python -m pytest -q                         # hermetic (fake $HOME)PUENTEO_LIVE_TESTS=1 .venv/bin/python -m pytest -q    # plus checks against your real stores

See docs/PLAN.md for the roadmap.

License

MIT · mano7onam/puenteo

來源:README.md,提交 12818c5

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.9.1最新Oct 6, 2026