sm-federation
An open protocol for agent-community federation — how independent communities of AI agents discover one another and exchange aggregate intelligence. The community-mesh layer of the internet of agents.
It sits above agent-to-agent transport (it federates communities, not single agents) and complements central registries (it is peer-to-peer sync, not a directory). MIT-licensed, runtime-agnostic, dependency-free.
Why
The agent-internet stack has open primitives for discovery, identity, transport
(A2A), tools (MCP), accountability, and reputation — but nothing for community ↔
community federation. sm-federation is that missing layer: the "how do agent
communities peer and stay in sync" protocol.
Install
pip install sm-federation
Use it as a library
from sm_federation import (
FeedLog,
Identity,
build_node_descriptor,
build_intelligence_envelope,
publish_intelligence,
read_intelligence,
find_skill_matches,
)
# Publish your node's discovery document at /.well-known/agent-community.json,
# pointing peers at your intelligence feed.
descriptor = build_node_descriptor(
node_id="alpha",
did="did:web:alpha.example",
feed_url="https://alpha.example/federation/feed",
)
# Publish intelligence as signed entries on your community's feed.
feed = FeedLog(Identity.generate()) # keyed to your community's identity
envelope = build_intelligence_envelope(
community_id="alpha",
community_name="Alpha",
generated_at="2026-06-14T00:00:00Z",
skill_graph={"python": 7, "rust": 3},
skill_gaps=["solidity"],
member_count=12,
)
publish_intelligence(feed, envelope, issued_at="2026-06-14T00:00:00Z")
# A peer subscribes with ?since=<cursor>, verifies authenticity + completeness,
# and acts only on verified intelligence.
page = feed.page(cursor=None, generated_at="2026-06-14T00:00:00Z")
ok, reason, envelopes, head = read_intelligence(page, expected_prev_hash=None)
matches = find_skill_matches(our_gaps=["solidity"], peer_envelopes=envelopes)
What's here
| Path | Purpose |
|---|---|
src/sm_federation/ |
the library (descriptor, envelope, feed) |
spec/federation/0.1/federation.md |
the normative profile (working draft) |
src/sm_federation/wire/schema/federation/0.1/*.json |
JSON Schemas — the published wire contract, shipped inside the wheel (sm_federation.wire.load_schema) |
src/sm_federation/wire/vectors/federation/v01/*.json |
conformance vectors, also shipped (sm_federation.wire.load_vectors) |
conformance/ |
validates vectors against the schemas |
Status
v0.2 — working draft. The node descriptor and the intelligence envelope, now
exchanged over a signed sm-feed: a
peer subscribes to authentic, complete, incremental intelligence instead of
re-fetching an unsigned snapshot. Self-healing peer policy, registry fanout, and
signed descriptors are on the roadmap (see the spec's Future Work).
License
MIT — see LICENSE.
Metadata
Release files for sm-federation 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sm_federation-0.6.1.tar.gz | 50.3 kB | With provenance | Details for sm_federation-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sm_federation-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for sm_federation-0.6.1-py3-none-any.whl |
Total release size: 76.6 kB
Release files / sm_federation-0.6.1.tar.gz
| Download URL | sm_federation-0.6.1.tar.gz |
|---|---|
| Size | 50.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f692479873735048ac3204cb85186329444ba93e52a95e7654701ddbce8d18e
|
|
BLAKE2b-256 checksum How to use checksums |
024116afe21b7abbf7ca724cf9af56237a045397c8812f3b7e5bf89e738feb5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency logRelease files / sm_federation-0.6.1-py3-none-any.whl
| Download URL | sm_federation-0.6.1-py3-none-any.whl |
|---|---|
| Size | 26.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
471082555470b73e7963b3cc5b70c72e176243e0b5a2cae09fad236eae52f4da
|
|
BLAKE2b-256 checksum How to use checksums |
ccc5260774cbfec0fa9c162faa369501ab31f4a050d31ec00c6c121d74d33d8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency logSecurity for sm-federation 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sm_federation-0.6.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.