Overview
Thesam add command creates configuration templates for new agents, gateways, or proxies in your Solace Agent Mesh project.
Syntax
Description
Creates new component configurations based on templates. The command supports three component types:- agent: Create a new AI agent configuration
- gateway: Create a new gateway component with skeleton code
- proxy: Create a new agent-to-agent (A2A) proxy configuration
Subcommands
sam add agent
Creates a new agent configuration via CLI or Web UI.Syntax
Arguments
Name of the agent component to create (e.g.,
my-new-agent). Required unless using --gui.Options
Launch the web UI to configure the agent interactively.
Skip interactive prompts and use defaults (CLI mode only).
Namespace for the agent (e.g.,
myorg/dev). Defaults to ${NAMESPACE}.Enable streaming support for the agent.
Model type for the agent. Options:
planning, general, image_gen, report_gen, multimodal, gemini_proCustom instruction for the agent.
Session service type. Options:
sql, memory, vertex_ragSession service behavior. Options:
PERSISTENT, RUN_BASEDDatabase URL for session service (if type is
sql).Artifact service type. Options:
memory, filesystem, gcs, s3Base path for filesystem artifact service.
S3 bucket name (for s3 artifact service type).
S3 endpoint URL (for s3 artifact service type, optional for AWS S3).
S3 region (for s3 artifact service type).
Artifact service scope. Options:
namespace, app, customArtifact handling mode. Options:
ignore, embed, referenceEnable embed resolution for artifacts.
Enable artifact content instruction.
Enable built-in artifact tools.
Enable built-in data tools.
Description for the agent card.
Comma-separated default input modes for agent card.
Comma-separated default output modes for agent card.
Agent card publishing interval in seconds.
Enable agent discovery.
Comma-separated allow list for inter-agent communication.
Comma-separated deny list for inter-agent communication.
Timeout in seconds for inter-agent communication.
Examples
Interactive agent creation:Output
Createsconfigs/agents/{agent_name}_agent.yaml and potentially updates .env with database URL.
sam add gateway
Creates a new gateway skeleton structure via CLI or Web UI.Syntax
Arguments
Name of the gateway component to create (e.g.,
my-new-gateway). Required unless using --gui.Options
Launch the web UI to configure the gateway.
Skip interactive prompts and use defaults (CLI mode only).
Namespace for the gateway (e.g.,
myorg/dev).Custom Gateway ID for the gateway.
Artifact service type. Options:
use_default_shared_artifact_service, memory, filesystem, gcsBase path for filesystem artifact service (if type is
filesystem).Artifact service scope. Options:
namespace, app, customSystem purpose for the gateway (can be multi-line).
Response format for the gateway (can be multi-line).
Examples
Interactive gateway creation:Output
Creates multiple files:sam add proxy
Creates a new agent-to-agent (A2A) proxy configuration.Syntax
Arguments
Name of the proxy component to create (e.g.,
my-proxy).Options
Skip interactive prompts (creates proxy with default template).
Examples
Create proxy:Output
Createsconfigs/agents/{proxy_name}_proxy.yaml.
Implementation Details
Implemented in:- Agent:
/home/daytona/workspace/source/cli/commands/add_cmd/agent_cmd.py - Gateway:
/home/daytona/workspace/source/cli/commands/add_cmd/gateway_cmd.py - Proxy:
/home/daytona/workspace/source/cli/commands/add_cmd/proxy_cmd.py
See Also
- sam init - Initialize a new project
- sam plugin add - Add components from plugins
- sam run - Run your application