Solace Agent Mesh Link SDK
Status: Early Access, version 0.1.0. The API can change in any release, and CHANGELOG.md lists each change. Apache 2.0, part of the Solace Agent Mesh (SAM) project.
sam-link-sdk lets an agent you wrote in Python join a running Solace Agent Mesh as a first-class agent. Write a handler,
or use LangChain, LangGraph, the OpenAI Agents SDK, Google ADK, CrewAI, Strands Agents, Microsoft Agent Framework, Hermes
Agent, or any framework that emits OpenTelemetry GenAI spans. The agent connects to SAM over one WebSocket, the link. It
then appears in SAM's agent list, can be chatted with from the web UI, shows its model and tool steps in the Activity
Monitor, reports token usage to SAM's analytics, and is governed by SAM: required scopes, tool approvals and the audit
trail. The SDK does not run a mesh of its own.
Install
Python 3.11 or later. The base install is the core and the link and needs only websockets; each framework has an extra
(pick your framework).
pip install sam-link-sdk
pip install "sam-link-sdk[langchain]"
Quick start
You need a SAM with the agent_link app enabled and its URL (what that is; on a
shared SAM it is the administrator's step), and SAM's sam command line client to try the agent.
Agent Mesh Desktop gives you both on
your own computer.
-
Issue the agent's token. The command writes it to the file and prints its SHA-256 digest:
sam-link-sdk link-token --out claims-triage.link-token
-
Register the agent in SAM: add
claims-triageand the digest to theagent_linkapp's configuration and restart SAM (the configuration). -
Point the agent at SAM:
export SAM_LINK_URL=wss://<sam-host>/gw/<gateway_id>/v1/connect export SAM_LINK_TOKEN_FILE=$PWD/claims-triage.link-token
Use
ws://localhost:8800/gw/agent-link/v1/connectfor a SAM on your own machine over plain HTTP (8800 is the port of SAM's web UI). -
Save this as
agent.pyand runpython agent.py. It needs no model:
import asyncio
import logging
from sam_link_sdk import AgentConfig, MeshAgent, TaskContext
async def handle(ctx: TaskContext) -> str:
await ctx.progress("Looking the claim up")
return f"Received: {ctx.text}"
async def main() -> None:
logging.basicConfig(level=logging.INFO)
config = AgentConfig(name="claims-triage", description="Triages insurance claims")
await MeshAgent(config, handle).run_forever()
if __name__ == "__main__":
asyncio.run(main())
The log shows agent link open agent=claims-triage ... protocol=2 and agent started. Check that SAM lists the agent,
then send it a task:
curl -s https://<sam-host>/api/v1/agentCards | jq '.data[].name'
sam task send "Triage claim P-1182" --agent claims-triage --url https://<sam-host>
The reply is Received: Triage claim P-1182. Or pick the agent in the web UI's chat. If it does not join,
docs/agent-link.md lists what the log says and what to change.
Pick your framework
Each page starts with a short agent you can run, and every adapter shares the same names
(docs/frameworks/README.md). The LangChain agent, for example, is this handler in place of
the one above (pip install "sam-link-sdk[openai]", and set
OPENAI_API_KEY):
async def handle(ctx: TaskContext) -> str:
return await run_agent(ctx, model, [lookup_policy], system_prompt="You triage insurance claims.")
with model = ChatOpenAI(model="gpt-4o-mini", stream_usage=True). On an OpenAI-compatible endpoint (a LiteLLM proxy, a
local server), stream_usage=True is what makes SAM's token analytics show real counts instead of zero. The full
runnable file is docs/frameworks/langchain.md.
| Framework | Extra | Minimum version |
|---|---|---|
| LangChain | langchain (openai adds langchain-openai) |
langchain-core 1.6.9 |
| LangGraph | langgraph |
langgraph 1.2.14 |
| OpenAI Agents SDK | openai-agents |
openai-agents 0.20.0 |
| Google ADK | adk |
google-adk 2.14.1 |
| CrewAI | crewai |
crewai 1.15.27 |
| Strands Agents | strands |
strands-agents 1.61.1 |
| Microsoft Agent Framework | agent-framework |
agent-framework-core 1.22.0 |
| OpenTelemetry GenAI spans, for any other framework | otel |
opentelemetry-sdk 1.45.2 |
| Hermes Agent (experimental, no extra) | a checkout, Python 3.14 |
The extras foundry and agentcore are for request-driven runtimes (docs/serverless.md).
Documentation
docs/README.md has a list of tasks ("I want to add tools, ask the user, call another agent, limit cost, deploy serverless") and a short glossary. Working on the SDK itself: CONTRIBUTING.md.
Getting help
- Bugs: email support@solace.com.
- Feature requests, questions and discussion: Solace Community.
- Security vulnerabilities: email support@solace.com (SECURITY.md).
Licence
Apache License 2.0, in LICENSE.
Metadata
Release files for sam-link-sdk 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 |
|---|---|---|---|---|
| sam_link_sdk-0.1.0.tar.gz | 213.8 kB | With provenance | Details for sam_link_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sam_link_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sam_link_sdk-0.1.0-py3-none-any.whl |
Total release size: 473.1 kB
Release files / sam_link_sdk-0.1.0.tar.gz
| Download URL | sam_link_sdk-0.1.0.tar.gz |
|---|---|
| Size | 213.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cc25aef5c71963cbec2d2b4e2a81dafe0c6ac65249d968339f7dd31073250d9
|
|
BLAKE2b-256 checksum How to use checksums |
7fe2838707eb028eb72020decddcf281276702fa0ab5c3ccedc333291e3ea3ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logRelease files / sam_link_sdk-0.1.0-py3-none-any.whl
| Download URL | sam_link_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 259.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
896075b3eb74ee99f99a5ef51f347d5a734c5b37baa6682703a9b8729d88939b
|
|
BLAKE2b-256 checksum How to use checksums |
7cfdd19d58f0cf7cc6c22fd78bd96e6aea2550f33840f8cd60f8d156adbeb5da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logSecurity for sam-link-sdk 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
Both files in this release have been uploaded with provenance metadata.
Attestation for sam_link_sdk-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 Nov 25, 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.