Agent Link Entrypoints (Early Access)

This feature is in the Early Access stage and under active development. Configuration schemas and behavior are subject to change. We recommend that you do not use this feature in production environments.

An Agent Link Entrypoint lets an agent that you build outside Solace Agent Mesh join Agent Mesh as one of its agents. You can build the agent with a framework such as LangChain, LangGraph, the OpenAI Agents SDK, Google Agent Development Kit (ADK), CrewAI, Strands Agents, or Microsoft Agent Framework. The agent uses the Agent Mesh Link SDK (sam-link-sdk), a Python software development kit (SDK), to open one WebSocket connection to the entrypoint. It never connects to the event broker, which stays internal to your deployment. After the agent connects:

  • Users chat with it like any other agent.

  • The built-in Orchestrator and other agents can delegate tasks to it.

  • Its model calls and tool calls appear on the Activities page.

This page covers how the entrypoint works and how to connect an agent to it. The following pages cover the rest:

Agent Link Entrypoint Architecture

The Agent Link Entrypoint runs in the Entrypoint Executor and takes a third-party agent's place on the event broker. It consumes the agent's request queue, delivers each task to the agent over the WebSocket, and publishes the agent's answers back to whoever sent the task as Agent-to-Agent (A2A) messages. An agent that connects this way is a link agent.

The following diagram shows how a link agent, the Agent Link Entrypoint, and the event broker exchange messages.

Diagram: Agent Link Entrypoint Architecture

The agent reports each step of its work to the entrypoint:

  • the start and end of each model call, with the tokens it used

  • the start and end of each tool call

  • a request for the user's approval, or a question for the user to answer

  • the final answer

The entrypoint builds every A2A message from those reports itself, so the event broker carries the same messages that an agent running in the Agent-Workflow Executor publishes for the same step.

Agent Mesh treats the connected agent as authenticated but untrusted. The entrypoint applies the following checks to everything that passes through it:

  • Identity — The entrypoint applies these identity checks:
    • Each agent authenticates with its own token.

    • When the Trust Manager is enabled, the entrypoint verifies each user's task token itself. For more information, see Enable the Trust Manager.

  • Tasks — An agent can report on, prompt for, and answer only the tasks the entrypoint delivered to it.

  • Messages — The entrypoint publishes the agent card, status events, approval requests, final answers, and token usage records under the authenticated agent's name.

  • Redaction — The entrypoint redacts values that look like credentials, such as fields named like passwords, tokens, or keys and bearer values, in tool arguments, tool results, approval text, and failure messages.

  • Size — The entrypoint truncates each tool argument, tool result, and approval text string to 16 KiB, and each failure message to 2 KiB.

  • Peers — A link agent can delegate only to the agents named in its peers, and only when the task's user is allowed to invoke them.

The agent never receives users' tokens, their full set of scopes, or the event broker address. It learns only which of its own tools' scopes the user holds. Each task carries the user's ID, and the agent receives the user's profile only when you set share_user_profile. For more information, see Agent Fields.

Agent Mesh lists a link agent when it shows the agent in the agent list and offers it to users and other agents.

A link agent runs in one of two ways:

  • A long-running agent stays connected, and Agent Mesh lists it while it is connected. Agent Mesh removes it from the list in one of the following ways:
    • When the agent stops, for example when you press Ctrl+C, the Link SDK tells the entrypoint that the agent is leaving, and Agent Mesh removes the agent.

    • When the connection drops without that message, Agent Mesh removes the agent when its card expires.

  • A request-driven agent runs on a runtime, such as Azure AI Foundry hosted agents or Amazon Bedrock AgentCore Runtime, that starts the agent only when something calls its invocation endpoint. You configure a wake block for the agent, and the entrypoint calls the runtime when a task arrives. For more information, see Waking Request-Driven Agents.

Use Cases

Use the Agent Link Entrypoint when your team builds an agent in Python with an agent framework and wants it to appear in Agent Mesh with its steps, token usage, approvals, and peer delegation visible, without giving it access to the event broker. The agent opens the connection, so it can run anywhere that reaches the Entrypoint Executor over HTTPS, including behind a firewall that allows no inbound traffic.

Connect an external agent instead when the agent already implements the A2A protocol over HTTPS and Agent Mesh calls it. For more information about how a link agent compares with an external agent and with an agent that runs in the Agent-Workflow Executor, see Connecting External Agents.

Choosing Where to Configure the Entrypoint

You configure an Agent Link Entrypoint and its agents either on the Platform service or in a runtime configuration file. The following table compares the two paths.

Consideration Platform Service Runtime Configuration File
Where you create the entrypoint On the Entrypoints page, or with sam config apply In a YAML file that the Entrypoint Executor loads at startup
How you add a third-party agent Register it as a link agent, a resource with its own deployment, with sam config apply Add an entry to the entrypoint's agents list
When a change to one agent takes effect When you deploy the link agent again. The other link agents stay connected. After a restart, which disconnects every link agent
Deployments it applies to Any deployment that runs the Platform service Only deployments that you run with sam run --embedded from a configs directory

We recommend the Platform service path. The Agent Mesh Helm chart has no setting for an additional Entrypoint Executor configuration file, so the runtime configuration file path does not apply to Helm deployments.

In a deployment that you run with sam run --embedded, the Entrypoint Executor runs inside the sam run --embedded process, so you restart the Entrypoint Executor by restarting sam run --embedded.

Prerequisites

You need the following before you connect a link agent:

  • An Agent Mesh deployment that is not used in production.

  • The feature flag SAM_FEATURE_AGENT_LINK_ENTRYPOINT left at its default, true. When it is false, the Entrypoints page does not offer the Agent Link type, and an Agent Link Entrypoint refuses to start.

  • Python 3.11 or later where the agent runs, and network access from there to the Entrypoint Executor over HTTPS.

  • If your deployment enforces role-based access control (RBAC), a role that grants users the invoke scope for each link agent. For more information, see Controlling Which Agents Can Delegate to a Link Agent.

For the Platform service path, you also need the following:

For the runtime configuration file path, you also need the following:

  • A deployment that you run with sam run --embedded and that already loads its configuration from the configs directory in the directory where you run it.

  • Access to that configs directory and to the .env file beside it.

  • An agent name for each link agent, which follows the rules for name in Agent Fields.

A deployment on the built-in defaults has no configs directory. When you add one, sam run --embedded loads only the files in it and no longer loads the built-in defaults, so use the Platform service path for such a deployment.

In a runtime configuration file, a link agent's name must not be the name of an agent or workflow in the same namespace. The link agent and the other agent or workflow consume the same request queue and publish agent cards under the same name, so tasks for one reach the other. The entrypoint cannot check names when it starts. At runtime, it logs a warning when it receives another agent card under the same name. For more information, see Tasks for a Link Agent Reach Another Agent.

Issuing a Token for the Agent

Each link agent authenticates with its own token. Agent Mesh stores only the token's SHA-256 digest, never the token.

To issue a token with the Link SDK, run the following commands where the agent runs:

pip install "sam-link-sdk[openai]"
sam-link-sdk link-token --out claims-assistant.link-token

The openai extra installs the Link SDK with LangChain and its OpenAI model integration. The Link SDK is on PyPI.

The sam-link-sdk link-token command writes a new random token to claims-assistant.link-token, readable only by you, and prints the token's SHA-256 digest as 64 hexadecimal characters. The command never overwrites an existing file. Keep the token file as a secret, and keep the digest for the entrypoint configuration.

To issue a token without the Link SDK, generate a random value and compute the digest of the exact string that the agent sends:

TOKEN="$(openssl rand -base64 32)"
printf %s "$TOKEN" | sha256sum

Consider the following when you compute the digest this way:

  • Use only the first field of the output, the 64 hexadecimal characters, as the digest.

  • On macOS, use shasum -a 256 in place of sha256sum.

  • Compute the digest with printf %s, not echo. The echo command adds a newline, and the digest of the token plus a newline never matches, so the entrypoint refuses every connection with HTTP 401.

The agent reads its token from one of the following environment variables:

  • SAM_LINK_TOKEN_FILE holds the path of a file that contains the token, such as the file that sam-link-sdk link-token writes.

  • SAM_LINK_TOKEN holds the token itself.

Set only one of them, because the Link SDK refuses to start when both are set.

Configuring the Entrypoint on the Platform Service

To connect a third-party agent through the Platform service, perform these steps:

  1. Create an entrypoint of the Agent Link type and deploy it. Use the Entrypoints page, or declare an entrypoint resource with type: agent_link and run sam config apply. For more information, see Creating an Entrypoint.

    The entrypoint's only settings are the limits that Entrypoint Fields describes, and each takes its default when you leave it empty. Link agents are not part of the entrypoint's settings.

  2. Declare a linkAgent resource for the agent, with the entrypoint's name, the token digest, and the agents it can call. List the link agent under linkAgents in manifest.yaml. If you declared the entrypoint as a resource in step 1, also list it under entrypoints. Then run sam config apply, which creates the link agent and deploys it to the entrypoint. For more information about the fields of the resource and the rules for its wake block, see Link Agents with the CLI (Early Access).

  3. Read the link agent's instanceName and connectUrl from the Platform service. For more information about the command that reads them, see Connecting the Agent.

    The agent connects as its instanceName, which has the form agent_<id>, where <id> is the link agent's ID with underscores in place of dashes. Agent Mesh shows the agent under the name in the resource file.

  4. Start the agent with the instanceName as its name and the connectUrl as its connect URL. For more information, see Starting the Agent.

Configuring the Entrypoint in a Runtime Configuration File

To connect a LangChain agent named claims-assistant through a runtime configuration file, perform these steps:

  1. Store the token's digest in the environment variable CLAIMS_ASSISTANT_TOKEN_SHA256 in the .env file of your deployment, replacing <digest> with the 64 hexadecimal characters:

    # .env
    CLAIMS_ASSISTANT_TOKEN_SHA256=<digest>
  2. Save the following configuration as a new file, for example agent_link.yaml, in the configs directory of your deployment:

    # agent_link.yaml
    apps:
      - name: agent_link_app
        broker:
          dev_mode: ${SOLACE_DEV_MODE, false}
          broker_url: ${SOLACE_BROKER_URL, ws://localhost:8008}
          broker_username: ${SOLACE_BROKER_USERNAME, default}
          broker_password: ${SOLACE_BROKER_PASSWORD, default}
          broker_vpn: ${SOLACE_BROKER_VPN, default}
        app_config:
          # Must be the namespace the rest of Agent Mesh uses, or Agent Mesh never lists the agent.
          namespace: ${NAMESPACE, solace-agent-mesh}
          # Becomes part of the connect URL: /gw/agent-link/v1/connect.
          gateway_id: agent-link
          # The same authorization the rest of the deployment runs, so peer calls are checked against the user's scopes.
          frontend_use_authorization: ${FRONTEND_USE_AUTHORIZATION, false}
          authorization_service:
            type: ${AUTHORIZATION_TYPE, none}
          gateway_adapter:
            type: agent_link
            adapter_config:
              agents:
                - name: claims-assistant
                  token_sha256: ${CLAIMS_ASSISTANT_TOKEN_SHA256}
                  # Your record of who is responsible for the agent; Agent Mesh publishes it on the agent card beside what the agent says about itself.
                  owner: claims-ops@example.com
                  team: Claims Operations
                  # The name Agent Mesh shows. Choose a display name that no agent or workflow in the namespace uses.
                  display_name: Claims Assistant
                  # The only agents this agent may delegate to. Names must match exactly.
                  peers: [policy-desk]
                  # Withhold the user's profile from this third-party agent.
                  share_user_profile: false

    Adapt the example to your deployment:

    • Change namespace to the namespace that your other Agent Mesh applications use (the namespace in their configuration, solace-agent-mesh by default).

    • Change the agent entry to your agent's name, digest, owner, and peers. In the example, policy-desk stands for an agent that already runs in your deployment. Replace it with the name of one of your agents, or remove peers if the agent delegates to no agent.

    • Use the same event broker connection and authorization settings as the Web UI Entrypoint.

    • Keep the file to the application alone. The entrypoint uses the Trust Manager setting (trust_manager) of the rest of your deployment.

    The limits under adapter_config take their defaults when you omit them. For more information about each field, see Agent Link Entrypoint Configuration Reference.

    A configuration error in this file stops sam run --embedded from starting, so no part of Agent Mesh runs, including the Agent Mesh UI. A common cause is an unset CLAIMS_ASSISTANT_TOKEN_SHA256.

  3. Restart sam run --embedded so that the Entrypoint Executor reads the new file. The restart interrupts every open chat in the Agent Mesh UI.

    The Entrypoint Executor log (the output of sam run --embedded) records agent link initialized with the gatewayID and the number of agents in its configuration. If the configuration has an error, sam run --embedded exits, and the log names the field at fault and, for an agent entry, the agent.

  4. Start the agent with claims-assistant as its name and ws://localhost:8800/gw/agent-link/v1/connect as its connect URL, or the address of your deployment. For more information, see Starting the Agent.

Starting the Agent

The following example shows a LangChain agent built with the Link SDK:

# claims_assistant.py
import asyncio

from langchain_openai import ChatOpenAI
from sam_link_sdk import AgentConfig, MeshAgent, TaskContext
from sam_link_sdk.langchain import run_agent

model = ChatOpenAI(model="gpt-4o-mini")
tools = []


async def handle(ctx: TaskContext) -> str:
    return await run_agent(ctx, model, tools, system_prompt="You help adjusters triage insurance claims.")


async def main() -> None:
    config = AgentConfig(name="claims-assistant", description="Triages insurance claims and routes them to an adjuster")
    agent = MeshAgent(config, handle)
    await agent.run_forever()


asyncio.run(main())

The name in AgentConfig is the name that the agent connects as.

The name in AgentConfig must match the name that the entrypoint expects exactly, including case. If the names differ, the entrypoint refuses the connection with HTTP 401. The entrypoint expects the following name:

  • For a link agent that the Platform service manages, its instanceName.

  • For an agent in a runtime configuration file, its name in that file.

The description is what the built-in Orchestrator reads when it decides whether to delegate to the agent, so describe what the agent does.

Start the agent with its connect URL and its token:

export OPENAI_API_KEY="${OPENAI_API_KEY}"
export SAM_LINK_URL="wss://agent-mesh.example.com/gw/agent-link/v1/connect"
export SAM_LINK_TOKEN_FILE=claims-assistant.link-token
python claims_assistant.py

For an agent on the same machine as sam run --embedded, use ws://localhost:8800/gw/<gateway_id>/v1/connect. Port 8800 is the default port of sam run --embedded. If you changed the port, use that port.

The agent connects, sends its self-description (its description, skills, and tool scopes), and starts taking tasks. Press Ctrl+C to stop the agent and disconnect it from Agent Mesh.

The Link SDK has a run_agent function for each supported framework, and run_graph for LangGraph. For more information about the other frameworks, the environment variables that the Link SDK reads, and how the Link SDK handles reconnects, approvals, questions, and peer calls, see the Agent Mesh Link SDK documentation.

Verifying the Connection

To confirm that Agent Mesh lists the agent, show the agent cards with the sam CLI:

  • For a local deployment that you run with sam run --embedded without authorization, run the following command. The --insecure flag lets sam api reach the plain http:// address:

    sam api --insecure --url http://localhost:8800 /api/v1/agentCards --jq '.data[].name'
  • For a deployment that you reach over HTTPS, log in with sam auth login first, then run the following command:

    sam api /api/v1/agentCards --jq '.data[].name'

For more information, see sam api and sam auth.

The output includes the name that the agent connects as. Under enforced RBAC, the list shows only the agents that you can invoke, so you need the link agent's invoke scope to see it.

Open the Agent Mesh UI, start a chat with the agent, and send a request. The answer appears in the chat, and the Activities page shows each model call and tool call the agent reported. For more information, see Monitoring Activity.

If the agent is not listed, see Agent Is Not Listed.

Controlling Which Agents Can Delegate to a Link Agent

A link agent's card is the same as any other agent card. An agent in the Agent-Workflow Executor that can call any peer offers the link agent to its model, along with the description that the third-party agent wrote, and can delegate a user's task to the link agent.

An agent can call any peer when its inter_agent_communication.allow_list (additionalConfigurations.interAgentCommunication.allowList in declarative configuration) is absent or is ["*"]. Consider the following agent types:

  • An agent in a runtime configuration file has no allowlist unless you set one, so it can delegate to every listed agent, including link agents.

  • An agent that the Platform service deploys has an empty allowlist unless you set additionalConfigurations.interAgentCommunication.allowList, so it delegates to no peer by default.

  • The allowlist of the built-in Orchestrator is ["*"].

Every link agent you connect is offered to the built-in Orchestrator, and to every other agent whose allowlist is absent or *, as soon as it is listed. Decide which agents can delegate to it before you connect it.

To keep an agent from delegating to a link agent, add the name that the link agent connects as to that agent's inter_agent_communication.deny_list (additionalConfigurations.interAgentCommunication.denyList in declarative configuration), then restart that agent or deploy it again. Agents read these lists when they start.

An allowlist entry matches both the name and the display name of a card. A link agent's display name is one that you choose:

  • For a link agent that the Platform service manages, the display name is its name.

  • For an agent in a runtime configuration file, the display name is its display_name, which defaults to its name.

An allowlist entry therefore matches a link agent only by a name that you chose, by *, or by a wildcard pattern that fits its name. The entrypoint ignores the display name that an agent describes for itself, so a third party cannot take the place of one of your agents by naming itself after it.

Choose a display name that no agent or workflow in the namespace uses.

A workflow's agent node can name a link agent directly. The workflow's own invoke scope governs that call, not any agent's allowlist or denylist.

Under enforced RBAC, a user needs the link agent's invoke scope to chat with it or to have another agent delegate to it:

  • For a link agent that the Platform service manages, the scope is agent:<id>:invoke, where <id> is the link agent's ID with dashes, as the Platform service reports it.

  • For an agent in a runtime configuration file, the scope is agent:<name>:invoke, where <name> is its name.

A role that grants agent:*:invoke covers every link agent you connect, including ones you add later. To control who can reach each link agent, grant its own invoke scope instead. For more information, see Runtime Agent-to-Agent (A2A) Access.

Waking Request-Driven Agents

For an agent configured with a wake block, the entrypoint also watches the agent's request topic. When a request arrives and the agent has no connection that is taking tasks, the entrypoint wakes the agent as follows:

  • It sends a POST request with the body {} to the wake URL.

  • While it waits for the agent to connect, it does not wake that agent again for 30 seconds.

  • When a wake call that a request triggered fails, the entrypoint does not retry it on its own. The request waits in the agent's queue, and the next request for the agent wakes it again immediately.

The woken agent connects, sends its self-description, takes every task waiting for it, and disconnects.

For a link agent that the Platform service manages, you set the wake block in the linkAgent resource. For more information, see Wake Fields. The following example shows an agent entry in a runtime configuration file for an agent hosted on Azure AI Foundry:

# agent_link.yaml
...
          agents:
            - name: claims-foundry
              token_sha256: ${CLAIMS_FOUNDRY_TOKEN_SHA256}
              wake:
                url: https://contoso-ai.services.ai.azure.com/api/projects/claims/agents/claims-foundry/endpoint/protocols/invocations?api-version=v1
                # The entrypoint gets a bearer token for the wake call with the OAuth client credentials grant.
                token_url: https://login.microsoftonline.com/${AZURE_TENANT_ID}/oauth2/v2.0/token
                client_id: ${AZURE_CLIENT_ID}
                client_secret: ${AZURE_CLIENT_SECRET}
                scope: https://ai.azure.com/.default

Change url to your runtime's invocation endpoint, and the token fields to the OAuth client that the runtime trusts. Omit token_url, client_id, client_secret, and scope when the runtime takes no bearer token, and use headers for any other request header it requires.

To build the agent for one of these runtimes, install the Link SDK extra that provides its integration: pip install "sam-link-sdk[foundry]" for Azure AI Foundry, or pip install "sam-link-sdk[agentcore]" for Amazon Bedrock AgentCore Runtime. For more information, see the Agent Mesh Link SDK documentation.

The entrypoint keeps a request-driven agent's self-description in memory and uses that self-description to keep the agent listed while the agent sleeps. An Entrypoint Executor restart loses that self-description, so by default the entrypoint wakes each request-driven agent when the Entrypoint Executor starts, so that the agent sends its self-description again. Until the agent describes itself, the entrypoint follows this schedule:

  • It wakes the agent immediately, then waits 30 seconds, 1 minute, 2 minutes, 4 minutes, and 8 minutes between the next five wakes.

  • If the agent is still not listed 10 minutes after the sixth wake, about 25 minutes after the first, it logs agent link could not list agent: it has not described itself, at ERROR the first time and at WARN each consecutive time after that.

  • It starts the schedule again 30 minutes later, and the wait doubles each time the schedule ends with the agent still unlisted, up to 24 hours.

The schedule stops when the agent is listed. To turn the schedule off, set on_start: false (onStart: false in a linkAgent resource). With the schedule off, consider the following:

  • After an Entrypoint Executor restart, the agent is listed again only when a request wakes it.

  • An unlisted agent is not offered to users or other agents, so it can stay unlisted until a workflow or a caller names it directly.

The wake call and the token call never follow an HTTP redirect, because a redirect would send the client secret and the configured headers to another address. A redirect response counts as a failed wake.

For a link agent that the Platform service manages, anyone who can create link agents chooses the addresses that the Entrypoint Executor calls, so the wake call and the token call have these extra restrictions:

  • The Entrypoint Executor never calls a cloud metadata, link-local, unspecified (0.0.0.0 or ::), broadcast, or multicast address, even when a hostname resolves to one.

  • It calls a private-network or loopback address, including localhost, only when SAM_AGENT_LINK_ALLOW_PRIVATE_WAKE is set to 1, true, or yes in the environment of the Entrypoint Executor. For more information, see Connectivity.

  • It ignores HTTP_PROXY and HTTPS_PROXY and connects to the wake address directly, so a deployment that reaches the internet only through a proxy cannot wake these agents.

  • When HTTP_PROXY or HTTPS_PROXY is set, the Entrypoint Executor logs a warning at startup.

The Platform service also rejects a linkAgent resource whose wake addresses or headers break the rules in Wake Fields.

Next Steps

You can now connect your own third-party agents to Agent Mesh. From here, you can: