Skip to main content

Overview

The sam add command creates configuration templates for new agents, gateways, or proxies in your Solace Agent Mesh project.

Syntax

sam add <COMPONENT_TYPE> <NAME> [OPTIONS]

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
Each component type generates appropriate configuration files and source code scaffolding.

Subcommands

sam add agent

Creates a new agent configuration via CLI or Web UI.

Syntax

sam add agent [NAME] [OPTIONS]

Arguments

NAME
string
required
Name of the agent component to create (e.g., my-new-agent). Required unless using --gui.

Options

--gui
boolean
default:"false"
Launch the web UI to configure the agent interactively.
--skip
boolean
default:"false"
Skip interactive prompts and use defaults (CLI mode only).
--namespace
string
Namespace for the agent (e.g., myorg/dev). Defaults to ${NAMESPACE}.
--supports-streaming
boolean
Enable streaming support for the agent.
--model-type
choice
Model type for the agent. Options: planning, general, image_gen, report_gen, multimodal, gemini_pro
--instruction
string
Custom instruction for the agent.
--session-service-type
choice
Session service type. Options: sql, memory, vertex_rag
--session-service-behavior
choice
Session service behavior. Options: PERSISTENT, RUN_BASED
--database-url
string
Database URL for session service (if type is sql).
--artifact-service-type
choice
Artifact service type. Options: memory, filesystem, gcs, s3
--artifact-service-base-path
string
Base path for filesystem artifact service.
--artifact-service-bucket-name
string
S3 bucket name (for s3 artifact service type).
--artifact-service-endpoint-url
string
S3 endpoint URL (for s3 artifact service type, optional for AWS S3).
--artifact-service-region
string
S3 region (for s3 artifact service type).
--artifact-service-scope
choice
Artifact service scope. Options: namespace, app, custom
--artifact-handling-mode
choice
Artifact handling mode. Options: ignore, embed, reference
--enable-embed-resolution
boolean
Enable embed resolution for artifacts.
--enable-artifact-content-instruction
boolean
Enable artifact content instruction.
--enable-builtin-artifact-tools
boolean
Enable built-in artifact tools.
--enable-builtin-data-tools
boolean
Enable built-in data tools.
--agent-card-description
string
Description for the agent card.
--agent-card-default-input-modes-str
string
Comma-separated default input modes for agent card.
--agent-card-default-output-modes-str
string
Comma-separated default output modes for agent card.
--agent-card-publishing-interval
integer
Agent card publishing interval in seconds.
--agent-discovery-enabled
boolean
Enable agent discovery.
--inter-agent-communication-allow-list-str
string
Comma-separated allow list for inter-agent communication.
--inter-agent-communication-deny-list-str
string
Comma-separated deny list for inter-agent communication.
--inter-agent-communication-timeout
integer
Timeout in seconds for inter-agent communication.

Examples

Interactive agent creation:
sam add agent my-analytics-agent
Using GUI:
sam add agent --gui
Non-interactive with custom settings:
sam add agent data-processor \
  --skip \
  --namespace mycompany/prod \
  --model-type planning \
  --supports-streaming \
  --artifact-service-type s3 \
  --artifact-service-bucket-name my-artifacts

Output

Creates configs/agents/{agent_name}_agent.yaml and potentially updates .env with database URL.
Agent configuration created: configs/agents/my_analytics_agent_agent.yaml

sam add gateway

Creates a new gateway skeleton structure via CLI or Web UI.

Syntax

sam add gateway [NAME] [OPTIONS]

Arguments

NAME
string
required
Name of the gateway component to create (e.g., my-new-gateway). Required unless using --gui.

Options

--gui
boolean
default:"false"
Launch the web UI to configure the gateway.
--skip
boolean
default:"false"
Skip interactive prompts and use defaults (CLI mode only).
--namespace
string
Namespace for the gateway (e.g., myorg/dev).
--gateway-id
string
Custom Gateway ID for the gateway.
--artifact-service-type
choice
Artifact service type. Options: use_default_shared_artifact_service, memory, filesystem, gcs
--artifact-service-base-path
string
Base path for filesystem artifact service (if type is filesystem).
--artifact-service-scope
choice
Artifact service scope. Options: namespace, app, custom
--system-purpose
string
System purpose for the gateway (can be multi-line).
--response-format
string
Response format for the gateway (can be multi-line).

Examples

Interactive gateway creation:
sam add gateway api-gateway
Non-interactive:
sam add gateway custom-gateway \
  --skip \
  --namespace myorg/prod \
  --gateway-id custom-gw-001 \
  --artifact-service-type filesystem

Output

Creates multiple files:
Gateway 'api_gateway' skeleton created successfully.
Generated files:
  - configs/gateways/api_gateway_config.yaml
  - src/api_gateway/app.py
  - src/api_gateway/component.py
  - src/api_gateway/__init__.py

Next steps:
1. Review and customize the specific parameters in 'configs/gateways/api_gateway_config.yaml'.
2. Define your gateway's specific schema in 'src/api_gateway/component.py'.
3. Implement the core logic in 'src/api_gateway/component.py'.

sam add proxy

Creates a new agent-to-agent (A2A) proxy configuration.

Syntax

sam add proxy <NAME> [OPTIONS]

Arguments

NAME
string
required
Name of the proxy component to create (e.g., my-proxy).

Options

--skip
boolean
default:"false"
Skip interactive prompts (creates proxy with default template).

Examples

Create proxy:
sam add proxy api-proxy
Non-interactive:
sam add proxy api-proxy --skip

Output

Creates configs/agents/{proxy_name}_proxy.yaml.
Proxy configuration created: configs/agents/api_proxy_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

Build docs developers (and LLMs) love