Skip to content

Integration Guide ​

Hybrid Devin-Station Flow (NHA-21) ​

For complex tasks, use Devin for planning and Mac Studio for implementation to save costs.

  1. Plan Phase (Devin):

    • Add the !plan label 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}.md and open a draft PR.
  2. Implement Phase (Mac Studio):

    • Review Devin's plan.
    • Add the implement label 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 Devin marker in the plan text.
  • The existence of a docs/plans/{ISSUE_ID}.md file.
  • 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:

ProviderTypeCostWhen used
Studio OllamaLocal (free)FreePrimary — always preferred
DeepSeek ChatCloud API$0.14/M inputFallback when Studio offline
Claude Sonnet 4.5Cloud API$3/M inputLast 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, PR
  • LLM — provider selection + fallback
  • Telegram — notification sending
  • Pipeline Flow — the main CrewAI flow

To add a new stage, insert it in run_pipeline().

Adding a new node ​

  1. Install Tailscale on the new machine
  2. Add its Tailscale IP to all .env files
  3. If it's a worker: install Docker + Ollama, add a compose profile
  4. 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.).

MIT Licensed | Built with AI Dev Station