Skip to main content

What Are Station Agents?

Station agents are AI-powered automation tools that:
  • Execute multi-step tasks autonomously
  • Access tools and APIs through MCP servers
  • Run on your infrastructure with your credentials
Unlike ChatGPT or Claude, Station agents have direct access to your tools (AWS, databases, filesystems) and can execute complex workflows without copy-pasting commands.

Dotprompt Format

Every agent is a .prompt file with YAML frontmatter and a template body:
---
metadata:
  name: "Cost Analyzer"
  description: "Analyzes AWS costs and finds savings"
  tags: ["finops", "aws"]
model: gpt-4o-mini
max_steps: 8
tools:
  - "__get_cost_and_usage"
  - "__list_cost_allocation_tags"
---

{{role "system"}}
You are a FinOps analyst specializing in AWS cost analysis.

Your process:
1. Query AWS Cost Explorer for the past 30 days
2. Identify cost spikes exceeding 20% baseline
3. Break down costs by service
4. Provide actionable recommendations

{{role "user"}}
{{userInput}}

Frontmatter Reference

FieldTypeRequiredDescription
metadata.namestringYesAgent display name
metadata.descriptionstringYesWhat the agent does
metadata.tagsarrayNoCategories for search
modelstringYesAI model to use
max_stepsintegerYesMaximum tool calls (5-15 typical)
toolsarrayYesMCP tools the agent can use

Model Selection

ModelUse CaseSpeedCost
gpt-4o-miniSimple tasks, file opsFastLow
gpt-4oComplex reasoningMediumMedium
claude-3-5-sonnet-latestCode analysis, securityMediumMedium

Creating Agents

# Interactive creation
stn agent create

# With flags
stn agent create --name "my-agent" --model gpt-4o-mini

Running Agents

# Run an agent
stn agent run "Cost Analyzer" "Analyze last month's AWS spending"

# With real-time output
stn agent run "Cost Analyzer" "Find cost savings" --tail

Discovering Tools

List available MCP tools for your agents:
# All tools in current environment
stn mcp tools

# Search for specific tools
stn mcp tools | grep aws

Coding Backends

Agents can be enhanced with coding capabilities that allow them to read, write, and modify files.

OpenCode Backend

Enable AI coding with filesystem access via OpenCode:
---
metadata:
  name: "Code Assistant"
  description: "AI coding assistant"
model: openai/gpt-4o
coding:
  enabled: true
---

You are an expert software engineer. Use coding tools to implement features.
This gives the agent these tools:
ToolDescription
coding_openStart a coding session in a directory
codeExecute coding tasks (read/write/refactor)
coding_closeEnd the session
coding_commitCommit changes to git
coding_pushPush to remote repository
The transport mechanism (HTTP or NATS) is configured at the Station level, not per-agent. This makes agent definitions portable across different deployments. See OpenCode Backend for backend configuration.

Coding Frontmatter Options

FieldTypeRequiredDescription
coding.enabledbooleanYesEnable coding tools for this agent
coding.workspace_pathstringNoDefault workspace directory

OpenCode Backend

Full guide to OpenCode integration, HTTP vs NATS backends, and container mode

Sandbox Backend

For isolated code execution in containers (different from OpenCode), use the sandbox backend:
---
model: openai/gpt-4o
sandbox:
  mode: code
  session: workflow
---

Sandbox Execution

Run code safely in isolated Docker containers

Notifications

Enable agents to send webhook notifications (ntfy, Slack, or any webhook endpoint):
---
model: anthropic/claude-sonnet-4-20250514
notify: true
---
You are a monitoring agent. Send notifications when tasks complete or issues arise.
This gives the agent the notify tool with parameters:
ParameterDescription
messageNotification content (required)
titleSubject line (optional)
prioritymin, low, default, high, urgent
tagsEmoji tags like ["warning", "white_check_mark"]

Notifications

Full guide to webhook configuration and formats

Next Steps