<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Concepts on SAM</title><link>https://sam-mesh.dev/docs/concepts/</link><description>Recent content in Concepts on SAM</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://sam-mesh.dev/docs/concepts/index.xml" rel="self" type="application/rss+xml"/><item><title>Architecture</title><link>https://sam-mesh.dev/docs/concepts/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sam-mesh.dev/docs/concepts/architecture/</guid><description>&lt;p>An agent mesh has a small control plane, one or more routers, and any number
of nodes. The control plane decides who is in the mesh and what they may do.
Routers make the nodes reachable. Nodes do the work: they publish services
and call each other&amp;rsquo;s services on behalf of the agents next to them.&lt;/p>
&lt;pre class="mermaid">flowchart LR
 subgraph cp[&amp;#34;control plane&amp;#34;]
 CP[&amp;#34;sam-control-plane&amp;lt;br/&amp;gt;identity · policy · signing key&amp;#34;]
 DB[(&amp;#34;database&amp;#34;)]
 CP --- DB
 end
 IDP[&amp;#34;identity provider&amp;lt;br/&amp;gt;(OIDC)&amp;#34;]
 R[&amp;#34;sam-router&amp;lt;br/&amp;gt;bootstrap · relay · DHT&amp;#34;]
 A[&amp;#34;sam-node A&amp;#34;]
 B[&amp;#34;sam-node B&amp;#34;]
 AG[&amp;#34;agent&amp;#34;]
 SVC[&amp;#34;your tool or model&amp;#34;]

 CP -. verifies tokens .-&amp;gt; IDP
 R -- lease --&amp;gt; CP
 A -- enroll / refresh --&amp;gt; CP
 B -- enroll / refresh --&amp;gt; CP
 A &amp;lt;--&amp;gt; R
 B &amp;lt;--&amp;gt; R
 A &amp;lt;-. direct when possible .-&amp;gt; B
 AG -- &amp;#34;MCP · OpenAI API&amp;lt;br/&amp;gt;(local)&amp;#34; --&amp;gt; A
 B --- SVC&lt;/pre>
&lt;h2 id="the-control-plane">The control plane&lt;/h2>
&lt;p>&lt;code>sam-control-plane&lt;/code> is an HTTP service backed by SQLite or PostgreSQL. It is
the only component that has to be trusted. It is not on the data path: tool
calls and model requests never pass through it.&lt;/p></description></item><item><title>Identity and enrollment</title><link>https://sam-mesh.dev/docs/concepts/identity/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sam-mesh.dev/docs/concepts/identity/</guid><description>&lt;p>Every participant in a mesh, node or router, has a key that it generated
itself and a credential that the control plane issued for that key. This page
follows the credential from enrollment to expiry: how a node gets it, what it
contains, how it is renewed, and how it is revoked.&lt;/p>
&lt;h2 id="keys-and-peer-ids">Keys and peer IDs&lt;/h2>
&lt;p>The first thing a node does is generate an Ed25519 key pair and store it in
its data directory (&lt;code>~/.config/sam-mesh/agent.db&lt;/code> by default). Its &lt;strong>peer
ID&lt;/strong>, the &lt;code>12D3KooW...&lt;/code> string that appears in logs, discovery results and
proxy URLs, is derived from the public key. The key never leaves the machine.
The credential is bound to the key, so a copied credential is useless without
it, and every peer-to-peer connection proves possession of the key as part
of the libp2p handshake.&lt;/p></description></item><item><title>Authorization</title><link>https://sam-mesh.dev/docs/concepts/authorization/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sam-mesh.dev/docs/concepts/authorization/</guid><description>&lt;p>Authorization in SAM answers one question: may this caller use this service
on this node? Three sources contribute to the answer, and the node that hosts
the service combines them: the caller&amp;rsquo;s credential, the mesh policy, and the
node&amp;rsquo;s own configuration. Each source can only narrow what the others allow.
If none of them grants access, the answer is no.&lt;/p>
&lt;h2 id="services-are-the-unit-of-authorization">Services are the unit of authorization&lt;/h2>
&lt;p>A node publishes services, each with a type and a name: &lt;code>mcp://calculator&lt;/code>,
&lt;code>inference://vllm-eu&lt;/code>, &lt;code>a2a://triage&lt;/code>, and the built-in
&lt;code>system://sam.catalog&lt;/code> that answers discovery queries. Policy grants access
to services by these names. It does not look inside a service: a grant on
&lt;code>mcp://db&lt;/code> offers every tool that the MCP server exposes. To offer different
privilege levels, publish different services (&lt;code>mcp://db-reader&lt;/code>,
&lt;code>mcp://db-writer&lt;/code>) and grant them separately. Choosing which tools a backend
exposes is the job of the backend, or of a small MCP server placed in front
of it.&lt;/p></description></item><item><title>Networking and the node API</title><link>https://sam-mesh.dev/docs/concepts/networking/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sam-mesh.dev/docs/concepts/networking/</guid><description>&lt;p>This page follows a request from an agent to a service on another node:
how the calling node finds the provider, how the two connect, and what the
agent sees at each end.&lt;/p>
&lt;h2 id="the-nodes-local-api">The node&amp;rsquo;s local API&lt;/h2>
&lt;p>An agent does not speak to the mesh directly. It speaks to the &lt;code>sam-node&lt;/code> on
its own machine, through one of two listeners:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>TCP&lt;/strong>, &lt;code>127.0.0.1:8080&lt;/code> by default (&lt;code>--bind-addr&lt;/code>). Every request must
carry the node&amp;rsquo;s API token as &lt;code>X-Sam-Authentication: Bearer &amp;lt;token&amp;gt;&lt;/code>.&lt;/li>
&lt;li>&lt;strong>A Unix socket&lt;/strong>, &lt;code>&amp;lt;data-dir&amp;gt;/sam.sock&lt;/code> by default (&lt;code>--socket-path&lt;/code>),
created with mode &lt;code>0600&lt;/code>. No token is needed, because only the user who
owns the socket can open it. &lt;code>docker.sock&lt;/code> works the same way.&lt;/li>
&lt;/ul>
&lt;p>You can turn either listener off by passing an empty value. With
&lt;code>--bind-addr=&lt;/code>, the node has no listening port and no secret to manage. This
is a good setup when everything that uses the node runs as the same user.&lt;/p></description></item><item><title>Control and data boundaries</title><link>https://sam-mesh.dev/docs/concepts/boundaries/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sam-mesh.dev/docs/concepts/boundaries/</guid><description>&lt;p>When you run your own control plane, you decide everything about the mesh.
On the public testnets, someone else decides who joins and what the policy
says. This page lists the decisions that become yours in a dedicated
deployment and the mechanism that enforces each of them.&lt;/p>
&lt;h2 id="what-you-control-in-a-dedicated-deployment">What you control in a dedicated deployment&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Membership.&lt;/strong> Enrollment goes through your identity provider or through
bootstrap tokens that you mint. The bindings in the control plane decide
which identities receive which roles. An identity without a binding cannot
enroll a node.&lt;/li>
&lt;li>&lt;strong>The signing key.&lt;/strong> The control plane generates its Ed25519 signing keys
and stores them in its database. Every credential in the mesh is signed by
one of these keys, and nobody outside the deployment can mint or extend a
credential. The keys rotate on the schedule you set.&lt;/li>
&lt;li>&lt;strong>The policy.&lt;/strong> What each role may call, on which nodes and with which
labels, is stored in your database. It can only be changed with your admin
token or through your console.&lt;/li>
&lt;li>&lt;strong>Revocation.&lt;/strong> A ban takes effect on the next credential refresh (within
the credential TTL, 24 hours by default) and, through the mesh event
channel, immediately on every connected node.&lt;/li>
&lt;li>&lt;strong>Where the software runs.&lt;/strong> SAM is Apache-2.0, sends no telemetry, and
does not depend on any hosted service. The control plane, routers and
nodes run wherever you put them: a laptop, a private cluster, an
air-gapped network.&lt;/li>
&lt;/ul>
&lt;p>The public testnets give you none of this. They are useful for trying the
software. Do not put anything there that you would not publish.&lt;/p></description></item></channel></rss>