convez.ai
MCP ServerAutomaçãoAvançado
DylPorter

PACL — Camada de Coordenação Proativa para Agentes

DylPorter/pacl

Coordenação automática e invisível para times de agentes IA

Ver no GitHub
InicialPluginScore · de 0 a 100

Um servidor MCP que funciona como intermediário central para coordenar times de agentes IA. Os agentes reportam suas ações e intenções através de ferramentas MCP, e o PACL detecta automaticamente sobreposições, escalações e passa contexto entre agentes — tudo sem que eles peçam coordenação explicitamente.

Instalação

$npx convez-ai DylPorter/pacl

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 3 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Evitar que múltiplos agentes façam o mesmo trabalho simultaneamente
  • Passar contexto e decisões entre agentes de forma estruturada
  • Escalar problemas como tickets estruturados automaticamente
  • Rastrear o que cada agente está fazendo em tempo real

Veredito

PACL resolve um problema real em orquestração de agentes IA: a perda de contexto entre handoffs. A implementação é sólida (Gemini + Arize Phoenix), mas exige arquitetura de agentes bem definida para extrair valor máximo. Ideal para times que já rodam múltiplos agentes e precisam de visibilidade compartilhada.

README

A tradução para o português deste README ainda está na fila.

PACL — Proactive Agent Coordination Layer

A coordination layer for teams of AI agents. They report what they're working on over MCP, and a central intermediary pushes back coordination they never asked for — flagging overlap, turning an escalation into a ticket, and handing a new agent the context an earlier one produced.

Python MCP Gemini Arize Phoenix License: AGPL-3.0

Built for the Google Cloud Rapid Agent Hackathon · Arize track

A coordination layer for teams of AI agents. Agents connect over MCP and report what they're working on; a central intermediary reasons over the whole picture and pushes back coordination they never asked for — flagging when two agents are about to do the same work, turning an escalation into a structured ticket for whoever can act on it, and handing a newly-started agent the context an earlier one produced.

Built for the Google Cloud Rapid Agent Hackathon (Arize track): Gemini for the intermediary's reasoning, Arize Phoenix for tracing and an online self-evaluation loop.

The problem

Everyone on a team now runs their own AI agent, and the richest part of each person's work — what they're actually doing, and why — lives inside that agent and dies at every handoff. Your coding agent knows your piece, a teammate's knows theirs, whoever delegated the work holds a third picture in their head. None of it crosses the boundary. PACL is the layer that makes it visible and acts on it, without being asked.

How it works

Agents talk to PACL through four MCP tools:

ToolWhen to call it
update_intent(intent, domain)the user states a new goal or changes direction
share_context(content)something substantive was discussed, decided, or found
report_activity(action, target)you're about to act on a file or resource
query(question)you want to know what the rest of the team is doing

Each call lands in a shared markdown substrate. A central intermediary — itself a Gemini agent — reads the combined state, decides whether anything needs coordinating, and acts: it pushes a natural-language alert to the affected agents or writes a structured ticket.

Coordination comes back piggybacked on the next tool response. Every call returns an alerts list; when it's non-empty, those are messages PACL has for you. There's no separate push channel and no "check for messages" tool — an agent receives coordination simply by continuing to talk to PACL. (No MCP client today acts on server-initiated push, and the 2026-07-28 spec keeps server-to-client interaction request-scoped, so the response itself is the canonical channel.)

Here's the overlap case end to end — two agents touch the same file, and the second one finds out without ever asking a human:

sequenceDiagram
    participant A as dev-alice
    participant P as PACL intermediary
    participant B as dev-bob
    A->>P: update_intent('refactor the checkout payment flow')
    Note over P: reasons over the whole team's state
    B->>P: report_activity('edit', 'src/checkout.py')
    Note over P: detects the overlap with dev-alice
    B->>P: query('anyone else touching this?')
    P-->>B: alerts: ⚡ dev-alice is also working on<br/>src/checkout.py — coordinate before you edit
    Note over B: coordination arrives piggybacked on the<br/>next tool response, not a separate channel

Agnostic by design

The intermediary runs in one of two modes (PACL_MODE):

  • agnostic — no hardcoded behaviors. The model gets one objective ("keep the team coherent") plus a few example situations and generalizes from there. Overlap detection, escalation routing, and context handoff all fall out of the same prompt, so a new coordination pattern needs no new code.
  • scaffolded — Python pre-detects scope overlap and guarantees the alert. Narrower, but a deterministic floor for weaker models.

Observability and self-evaluation (Arize Phoenix)

Every Gemini call and tool call is auto-instrumented to Phoenix via OpenInference, so the reasoning behind any coordination decision is a trace you can open and inspect.

Beyond tracing, the intermediary grades its own past alerts, online: each cycle it reads its own Phoenix traces, checks whether an agent it alerted actually acted, and writes the verdict straight back as an agent_judge annotation. A deterministic Python floor guarantees that annotation lands every cycle, whether or not the model remembered to do it — the same belt-and-suspenders idea as the alert path.

Architecture

LayerChoice
Agent interfaceMCP (Streamable HTTP), mounted at /mcp
ReasoningGemini via the Google Agent Development Kit
ObservabilityArize Phoenix Cloud + OpenInference
Egressa per-agent in-memory queue, drained onto tool responses (piggyback)
Substratelocal-disk markdown (durable, shared storage is future work)
HostingCloud Run

Identity is set per connection with an X-PACL-Agent header. The server stamps every event with it, so an agent never has to self-report its id on each call.

Quickstart (local)

uv sync --extra dev
cp .env.example .env          # add your Gemini AI Studio + Phoenix Cloud keys
uv run uvicorn pacl.server:app --reload --port 8080

Point any MCP client at the server with one line of config:

{
  "mcpServers": {
    "pacl": {
      "url": "http://localhost:8080/mcp",
      "headers": { "X-PACL-Agent": "your-agent-id" }
    }
  }
}

Now two agents on the same PACL — say both editing src/auth.py — each get a heads-up about the other on their next tool call.

Try the two-agent demo

The repo ships a no-login sandbox where two browser panes are two real Gemini agents, each connected to PACL as an ordinary MCP client (this is what's pictured at the top). Work on the same thing in both and the overlap warning surfaces in an agent's own reply:

PACL_MODE=agnostic uv run uvicorn demo.app:app --port 8090
# open http://127.0.0.1:8090/demo

The demo only adds routes onto the pure-MCP server; rm -rf demo/ restores pristine PACL. See demo/README.md for the scripted overlap + handoff walkthrough.

Run the behavioral eval suite against live Gemini:

PACL_MODE=agnostic uv run python -m pacl.evals.harness

Configuration

VariableDefaultPurpose
GEMINI_API_KEY—Gemini AI Studio key
GEMINI_MODELgemini-2.5-prothe intermediary's model
PHOENIX_API_KEY—Arize Phoenix Cloud key
PHOENIX_PROJECTpacl-devPhoenix project name
PACL_MODEscaffoldedscaffolded or agnostic
PACL_INTENT_TTL3600seconds before a stale intent ages out of overlap detection
SUBSTRATE_LOCAL_ROOT./substratesubstrate directory

Tests

uv run python -m pytest

License

AGPL-3.0-or-later — Copyright (C) 2026 Dylan Porter. See LICENSE.

Ver o original no GitHub

Bom para

Relacionados