Portal Community

Installation

pnpm add @edge-stream/ancp

What is ANCP?

ANCP is a protocol layer that sits below the domain plugins. While workflow.* and agent.* messages carry business domain content, ANCP messages carry infrastructure-level communication between agent nodes:

Topic Namespace

ancp.heartbeat          // keep-alive between agent and node
ancp.capability.*       // capability advertisement and negotiation
ancp.flow.control       // backpressure and flow control signals
ancp.route.*            // routing table updates and directives
ancp.ack                // delivery acknowledgment
ancp.error              // protocol-level error

Key Exports

import {
  AncpPlugin,              // IMessagePlugin implementation
  AncpTopics,              // topic constants
  AncpHeartbeatHook,       // handles heartbeat / keep-alive
  AncpFlowControlHook,     // implements backpressure

  // TypeScript interfaces
  type AncpHeartbeatMessage,
  type AncpCapabilityMessage,
  type AncpFlowControlMessage,
  type AncpAckMessage,
  type AncpErrorMessage,
} from '@edge-stream/ancp';

When to Use ANCP

ScenarioUse ANCP?
Building or consuming workflow eventsNo — use @edge-stream/workflow-events
Building an Octopus chat UINo — use @edge-stream/agent-messages
Building a new agent node implementationYes — ANCP for protocol-level communication
Implementing agent-to-node backpressureYes — AncpFlowControlHook
Building infrastructure monitoring for agent networksYes — subscribe to ancp.* topics

ANCP in the DevTools

The EdgeStream DevTools app includes an ANCP view that shows the live protocol message exchange between agent nodes — heartbeat timing, capability negotiations in progress, and any flow control events. This is useful for debugging agent network topology issues.

// In DevTools, subscribe to ANCP topics to monitor protocol health
stream.subscribe('chat', 'ancp.*', (envelope) => {
  ancpMonitor.recordEvent(envelope.meta.topic, envelope.body);
});
Next: Dev Tools See how to use the EdgeStream DevTools app — including the ANCP protocol view, Node Explorer, and Action Invoker. See Guide 11: DevTools.