Skip to content

Specification

This specification defines the authoritative protocol requirements for the Signal Gating Protocol (SGP): agent-native signal orchestration for autonomous AI systems, expressed as four primitives: Signal, Gate, Agent, and Mesh.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC 2119] [RFC 8174] when, and only when, they appear in all capitals.

Draft

This specification is currently in draft status. The reference implementation is the Python SDK; where this document and the SDK disagree, the SDK is authoritative for now.

Purpose and Goals

  1. Define the four protocol primitives (Signal, Gate, Agent, Mesh) and their composition rules.
  2. Describe signal structure and immutability.
  3. Define gate algebra semantics and built-in gate behavior.
  4. Define agent lifecycle and mesh coordination patterns.

Terminology

TermDefinition
SignalA typed, immutable event carrying a priority and metadata.
GateA composable predicate that admits, drops, or shapes signals on the way to an agent.
AgentAn autonomous processor that handles signals and emits, replies, or requests in turn.
MeshA directed graph of agents and their gated connections.

Architecture

SGP has no central actor. Agents emit and consume signals; gates and the mesh are the substrate between them.

  1. An agent emits a signal.
  2. The mesh routes it along connections to other agents.
  3. A gate on each connection decides whether the signal reaches that agent.
  4. The receiving agent handles it and may emit, reply, or request.

Primitives

Signal

A Signal MUST be immutable once created. It MUST carry a priority and MAY carry arbitrary metadata. Derivations (evolve, with_metadata) MUST return a new Signal rather than mutating the original.

Gate

A Gate is a predicate over a signal that produces a decision: admit, drop, or transform. Gates MUST be deterministic with respect to their inputs and internal state. The gate algebra:

  • a >> b: chain; a signal passes only if every gate admits it.
  • a | b: or; a signal passes if at least one gate admits it.
  • a & b: and; a signal passes only if both gates admit it.
  • ~a: invert; a signal passes if a rejects it.

Built-in gates SHOULD include by_priority, by_type, filter, transform, deduplicate, throttle, ttl, when, and circuit_breaker. A Gate MUST NOT mutate a signal; a transform gate MUST emit a derived signal instead.

Agent

An Agent MUST process signals asynchronously. It SHOULD support typed handlers keyed by signal type, MAY declare gates that apply to its inbound signals, and MAY expose tools for discovery and invocation across the mesh. An Agent under supervision SHOULD restart on failure with backoff, preserving its handlers.

Mesh

A Mesh MUST connect agents into a directed topology, optionally with a gate per connection. It SHOULD support the coordination patterns scatter/gather, map/reduce, sequential workflow, branching workflow, and race, and MAY support rewiring connections at runtime.

Error Handling

  • Retry behavior and idempotency guarantees MUST be defined per gate.
  • circuit_breaker state transitions MUST be observable to operators.
  • Mesh-level failure modes (fail-fast vs. continue-on-error) MUST be explicitly configured.

Versioning

  • Version negotiation between participants.
  • Backwards-compatibility policy for the gate algebra.
  • Deprecation process for built-in gates.

Learn More

Released under open governance.