Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sm_federation-0.3.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sm_federation-0.3.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file sm_federation-0.3.0.tar.gz.

File metadata

  • Download URL: sm_federation-0.3.0.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sm_federation-0.3.0.tar.gz
Algorithm Hash digest
SHA256 feae6f4198baa099ed122ae110c188f1a209ba70ea3ebf1a9e40964d63aff69d
MD5 93085ef2f5655ef82e5d65da92ad04e7
BLAKE2b-256 0b2d007289e26a5064846c79a9610921a286276b7645e41b263181a03b82b764

See more details on using hashes here.

Provenance

The following attestation bundles were made for sm_federation-0.3.0.tar.gz:

Publisher: release.yml on Sharathvc23/sm-federation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sm_federation-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sm_federation-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sm_federation-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b385a373bfebf9e33d5807e2bc888bac769f9a264846a11939c58d5e35b9b489
MD5 1ce3f8a7d6ca1f63b04b41f4d9377e15
BLAKE2b-256 e6bf2fee72a0170d48284b25d6a1cbd21fa72d3a29c4b535a193640b285bb120

See more details on using hashes here.

Provenance

The following attestation bundles were made for sm_federation-0.3.0-py3-none-any.whl:

Publisher: release.yml on Sharathvc23/sm-federation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page