Contributing to Station
This section covers Station’s internal architecture, development setup, and testing for contributors.Architecture Overview
Station is a modular, service-oriented AI agent orchestration platform built in Go.Four-Layer Architecture
Unified Execution Engine
All entry points converge at the AgentExecutionEngine:| Entry Point | Path | Handler |
|---|---|---|
| CLI | stn agent run | cmd/main/handlers/agent/ |
| API | POST /api/v1/agents/:id/execute | internal/api/v1/ |
| MCP | call_agent tool | internal/mcp/ |
| Scheduler | Cron trigger | internal/services/scheduler.go |
Core Services
| Category | Services |
|---|---|
| Execution | AgentService, AgentExecutionEngine, GenKitProvider |
| MCP | MCPConnectionManager, MCPToolDiscovery, ToolDiscoveryService |
| Config | DeclarativeSync, EnvironmentManagementService, AgentFileSync |
| Scheduling | SchedulerService |
| Telemetry | TelemetryService, DeploymentContextService |
Repository Structure
Key Files
| Component | Location |
|---|---|
| Agent execution | internal/services/agent_execution_engine.go |
| MCP management | internal/services/mcp_*.go |
| Sync service | internal/services/declarative_sync.go |
| API handlers | internal/api/v1/*.go |
| CLI handlers | cmd/main/handlers/ |
| Database schema | internal/db/schema.sql |
| MCP server | internal/mcp/server.go |
| Config loading | internal/config/config.go |
Next Steps
Development Setup
Set up your local development environment
Architecture Deep Dive
Detailed diagrams and component analysis
Testing Guide
Running and writing tests
Code Style
Conventions and best practices

