Integration Guide
Hybrid Devin-Station Flow (NHA-21)
For complex tasks, use Devin for planning and Mac Studio for implementation to save costs.
Plan Phase (Devin):
- Add the
!planlabel to a Linear issue. - Devin will analyze the task and post an implementation plan as a comment.
- Devin will also push the plan to
docs/plans/{ISSUE_ID}.mdand open a draft PR.
- Add the
Implement Phase (Mac Studio):
- Review Devin's plan.
- Add the
implementlabel to the Linear issue. - The local pipeline will trigger, read the plan from the comment/file, and execute the Coder/Reviewer/Healer agents.
Configuration
The pipeline identifies a Devin-generated plan by:
- The
Generated by Devinmarker in the plan text. - The existence of a
docs/plans/{ISSUE_ID}.mdfile. - Structured sections like
## Files to Change.
Cost Optimization
- Devin handles the high-level reasoning (Plan).
- Local models (Qwen, Llama) handle the heavy lifting (Implement).
- The Architect agent is automatically skipped if a high-quality plan is detected.
LLM providers
This station supports 3 LLM providers with automatic fallback:
| Provider | Type | Cost | When used |
|---|---|---|---|
| Studio Ollama | Local (free) | Free | Primary — always preferred |
| DeepSeek Chat | Cloud API | $0.14/M input | Fallback when Studio offline |
| Claude Sonnet 4.5 | Cloud API | $3/M input | Last resort |
Adding a new provider
Edit pipeline.py LLM_CONFIG dict and fallback_llm() function. Add the API key to .env.
Extending the pipeline
The pipeline at pipeline.py is a single file with clear sections:
Git Operations— clone, branch, commit, push, PRLLM— provider selection + fallbackTelegram— notification sendingPipeline Flow— the main CrewAI flow
To add a new stage, insert it in run_pipeline().
Adding a new node
- Install Tailscale on the new machine
- Add its Tailscale IP to all
.envfiles - If it's a worker: install Docker + Ollama, add a compose profile
- If it's a client: install OpenCode, point to Studio's Ollama URL
Reusable agents
See AGENTS.md for agent definitions, prompt templates, and skill configurations that work with any AI model (CrewAI, OpenCode, Claude, DeepSeek, etc.).