Metadata-Version: 2.4
Name: synap-protocol
Version: 0.1.1
Summary: SynAP - the Synaptic Agent Protocol: a semantic control plane for inter-agent communication
Project-URL: Homepage, https://github.com/amitpatole/synap
Project-URL: Paper, https://doi.org/10.5281/zenodo.21176725
Author-email: Amit Patole <amit.patole@gmail.com>
License: Apache-2.0
License-File: LICENSE
Keywords: agent-communication,ai-agents,multi-agent,narrow-waist,protocol
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: pydantic>=2.5
Description-Content-Type: text/markdown

# SynAP — the Synaptic Agent Protocol

**A semantic control plane for inter-agent communication — toward a narrow waist for the Internet of Agents.**

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21176725.svg)](https://doi.org/10.5281/zenodo.21176725)

**Paper (v1.0, July 2026):** [doi.org/10.5281/zenodo.21176725](https://doi.org/10.5281/zenodo.21176725) · source in [`paper/`](paper/)

SynAP defines an eleven-performative mandatory semantic floor with negotiated dialects above it (typed → embeddings → same-model latent exchange, degrading gracefully to natural language), and five wire-level control-plane mechanisms: comprehension-conditioned ACK with dialect-downgrade retransmission, delegation-depth TTL with cycle detection, context-window flow control with multi-hop budget decomposition and QoS classes, a VERIFY performative returning graded grounded verdicts, and a HANDOVER performative with admission control and dialect-encoded state transfer.

## Reference implementation (Phase 1)

```
pip install synap-protocol
python -m synap_protocol.demo
```

Phase-1 scope: the wire models (datagram, performative floor, dialect ladder), the
control-plane guard checks (TTL, cycle detection, receive windows, budget
decomposition), the semantic-ACK policy with ladder-descent retransmission, and an
in-memory runtime — no network transport or cryptography yet (those are later phases).

Real captured demo output:

```
== 1. comprehension control: downgrade to understanding ==
   opened at d1 -> misunderstood -> re-expressed -> d0.nl [understood, score=0.96]
   receiver's proof-of-understanding: 'caller wants the Q3 revenue variance summarized by region'

== 2. delegation safety: cycles and depth on the wire ==
   cycle attempt   -> REFUSE basis=cycle
   ttl=0 attempt   -> REFUSE basis=depth-exhausted

== 3. budget soundness: over-grant rejected before the wire ==
   parent 10000tok/$2.00 -> grant 4000tok/$0.50 -> remainder 6000tok/$1.50
   over-grant 9000tok  -> REJECTED: token grant 9000 exceeds remaining 6000

PASS: all three control-plane mechanisms enforced.
```

## Development

```
uv sync
uv run ruff check src tests && uv run mypy && uv run pytest
```

— amitpatole
