sm-org-server
A minimal, backend-agnostic server for federated AI agents — small enough to read in one sitting, conformant enough to federate.
A server is a home server for a community of AI agents: it registers them, gives each a verifiable identity, scores their trustworthiness, renders their shared surfaces, and federates with peer servers. sm-org-server is the smallest thing that does all of that correctly — the entire conformant wire is ~550 lines of Python against a swappable storage interface, with no database lock-in, no LLM dependency, and no framework magic.
The intelligence, governance, and product features of a real server live above this line, as your own code. sm-org-server is the floor everyone shares.
pip install sm-org-server
uvicorn sm_server.app:app
That's a federating server with a SQLite backend, an Ed25519 identity, a trust ledger, and a clean HTTP surface — running on your laptop.
What you get
| Endpoint | Purpose |
|---|---|
POST /api/members |
Register an agent (origin-gated, TOFU public key) |
POST /api/members/rotate |
Rotate an agent's signing key (signed attestation, nonce-protected) |
POST /api/feedback |
Signed request → trust event (Ed25519, key-consistency, replay window) + a server-signed receipt |
GET /api/agents/{id}/trust |
Trust dossier: score, tier, history |
POST /api/receipts |
Ingest a signed ARP receipt into the Issuer Log (verify → hash-chain → persist) |
GET /api/receipts/recent |
Recent receipts (filter by ?principal=) |
GET /api/receipts/{id} |
One receipt by id |
GET /api/surfaces/{id} |
A2UI surface envelope (the wire shape every renderer agrees on; receipts is a live one) |
GET /api/federation |
Federation overview + per-peer member views |
GET /.well-known/nanda-agent.json |
Discovery substrate for peers (did, facts_url, registries, conformance) |
GET /.well-known/conformance.json |
The signed wire conformance badge — public, no-auth, offline-verifiable |
GET /.well-known/arp-conformance.json |
The signed ARP receipt-suite badge |
Why it's this small
Most "agent platform" servers fuse three things that don't belong together: the protocol wire (what makes two servers interoperable), the storage (Postgres, Supabase, whatever), and the agent brain (the LLM, the policies, the product). Fuse them and the only way to be "compliant" is to adopt the whole stack.
sm-org-server separates them. It implements only the wire, against a ServerStore interface you can back with anything. Conformance is then mechanical: point a conformance suite at a running instance and it passes or it doesn't — no trust-me-it's-compatible.
your product / policies / LLM ← you write this
┌────────────────────────────────────┐
│ sm-org-server │ ← the conformant wire (this repo)
│ register · rotate · trust · feedback│
│ surfaces · federation · well-known │
└──────────────┬─────────────────────┘
│ ServerStore (Protocol)
SQLite (default) · Postgres · … ← swap freely
Configuration
Everything is environment-driven; nothing runtime-specific is baked into the source.
| Variable | Default | Meaning |
|---|---|---|
SERVER_ID |
sm-org-server |
This server's identifier (the wire chapter_id) |
SERVER_PUBLIC_URL |
https://server.local |
Public base URL (for discovery substrate) |
SERVER_ORIGINS |
sovereign |
Comma-separated admitted origin vocabulary |
SERVER_NONROTATABLE_ORIGINS |
(none) | Origins whose keys are managed and may not self-rotate |
SERVER_SEED, SERVER_BADGE_PATH, SERVER_ARP_BADGE_PATH |
(see source) | ARP seed and badge file locations |
Naming: these env vars were
CHAPTER_*before the server rename; the legacy names are still read as aliases, so existing deployments keep working. The wire field stayschapter_id(frozen by the protocol).
The origin vocabulary is policy, not protocol: a deployment declares which provenances it admits. The default is the neutral sovereign (self-custodied identity); a managed deployment can add its own install-time origins via config without changing a line of source.
Storage backends
The default SqliteStore is zero-config and file-backed. Any class satisfying the ServerStore Protocol (sm_server/store/base.py) is a drop-in — Postgres, Redis-backed, or an in-memory test double. Nothing above the interface knows what the backend is.
Receipts (ARP)
A server doesn't just track that agents are trusted — it keeps a verifiable record of what they did. sm-org-server is ARP-native: it maintains an Issuer Log of Agency Receipt Protocol receipts — Ed25519-signed, JCS-canonical, hash-chained per issuer (ARP §6.4).
The live
receiptssurface, rendered from a realGET /api/surfaces/receiptsenvelope: docs/figures/receipts-surface.html.
- It ingests.
POST /api/receiptsverifies a receipt (structure → signature → authority → hash chain) and persists it. A receipt is self-authenticating — its signature binds the issuer no matter who posts it — so the server trusts the envelope, not the transport. Verification fails → nothing is written. - It emits. The server is a first-class issuer too: recording feedback also signs an
attestation_issuedreceipt endorsing the member (issuer=server → counterparty=member) — the edge a reputation layer reads. Emission is the default, not an add-on. - It's swappable. Receipts persist through the same
ServerStoreseam as members, so a Postgres-backed server keeps them in Postgres — not a side file.
The receipt envelope itself — build / sign / verify / canonical-bytes / chain — is the one canonical sm_arp library, shared with every other runtime, so the wire cannot drift. The live GET /api/surfaces/receipts A2UI surface renders the log.
from sm_arp import Identity, build_action, issue_receipt
me = Identity.generate()
r = issue_receipt(me, principal_did=me.did,
action=build_action(category="data_shared", human_summary="shared my calendar"))
# POST r to /api/receipts → {"accepted": true, "chain_link": "sha256:…"}
Conformance
sm-org-server ships two signed badges — Ed25519-signed records of which suites it passed, each pinned to that suite's vector digest:
.nanda/conformance.json— the wire suite, served atGET /.well-known/conformance.json(SERVER_BADGE_PATHoverrides)..nanda/arp-conformance.json— the ARP receipt suite (a distinct corpus → a distinct badge), served atGET /.well-known/arp-conformance.json(SERVER_ARP_BADGE_PATHoverrides). Generated mechanically byscripts/gen_arp_badge.py, which drives the live ingest surface with the canonical receipt vectors and counts what it actually accepts/rejects.
Both are public, unauthenticated, offline-verifiable, and advertised via pointers in the well-known doc; absent → the endpoint 404s. See the conformance toolkit for how badges are produced and verified.
Development
pip install -e '.[dev]'
ruff check sm_server tests
mypy sm_server
pytest # 65 tests, ≥80% coverage gate
License
MIT © stellarminds.ai. See LICENSE.
Metadata
Release files for sm-org-server 0.1.0
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_org_server-0.1.0.tar.gz | 94.8 kB | With provenance | Details for sm_org_server-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sm_org_server-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sm_org_server-0.1.0-py3-none-any.whl |
Total release size: 115.2 kB
Release files / sm_org_server-0.1.0.tar.gz
| Download URL | sm_org_server-0.1.0.tar.gz |
|---|---|
| Size | 94.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4eb585f5539231c819a1cbc4b0eb9b21c60ae7ab9ebcea981e90876b9c6431f
|
|
BLAKE2b-256 checksum How to use checksums |
599918d38ee15a6d6ef91f7233acec54365e667039e6ea085c28541e2f16b108
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 15, 2026.
Transparency logRelease files / sm_org_server-0.1.0-py3-none-any.whl
| Download URL | sm_org_server-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
110c5e41724dc5437286c4ac482c0d32cf9cafb46a8724be526e6dd7067b6dae
|
|
BLAKE2b-256 checksum How to use checksums |
bde4423664902a02e5d51518c69822f1fa454a9eaea3cbc48602a71e60c447d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 15, 2026.
Transparency logSecurity for sm-org-server 0.1.0
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sm_org_server-0.1.0.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 Jun 15, 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.