Local AI Agent Workflow Using OpenCode, FastMCP, and DeepSeek-r1

✍️ OpenClawRadar📅 Published: March 25, 2026🔗 Source
Local AI Agent Workflow Using OpenCode, FastMCP, and DeepSeek-r1
Ad

A developer on r/LocalLLaMA describes moving beyond using LLMs as "glorified autocomplete" by implementing a local agentic workflow with OpenCode, FastMCP, and the DeepSeek-r1 model.

AGENTS.md Standard for Deterministic Prompts

The developer uses an AGENTS.md file as a deterministic manual that injects strict rules into the AI's system prompt. Examples include "Use Python 3.9, format with Ruff, absolutely no global variables." This approach aims to eliminate hallucinations from the start.

Local Subagents with DeepSeek-r1

Instead of using cloud APIs like Claude or GPT-4o for trivial tasks, they set up Ollama with the free deepseek-r1 model. They created specific subagents, such as one for testing defined in a pytest.md file. Key configurations include:

  • Temperature set to 0.1
  • Tools restricted: "pytest": true and "bash": false

This allows the AI to autonomously run test suites, read tracebacks, and fix syntax errors while being blocked from potentially dangerous commands like rm -rf.

Ad

FastMCP for Standardized Local Function Exposure

FastMCP is described as "the 'USB-C' of AI"—similar to FastAPI but for AI agents. With about 5 lines of Python, you can spin up a local server to expose secure local functions (like querying a development database) in a standardized way that any OpenCode agent can consume.

A critical implementation tip: route all Python logs to stderr because the MCP protocol runs over stdio. Leaving a standard print() statement can corrupt the JSON-RPC packet and drop the connection.

The developer notes they recorded a video coding this entire architecture from scratch and setting up the local environment in about 15 minutes.

📖 Read the full source: r/LocalLLaMA

Ad

👀 See Also

Open-source tool automates Meta ad competitor analysis with Claude Code
Tools

Open-source tool automates Meta ad competitor analysis with Claude Code

Ads Machine is an open-source system built with Claude Code that scrapes competitor ads from Meta's Ad Library, transcribes videos, extracts hooks and angles, and grades ads based on how long they've been running. It can generate variations from successful ads and push campaigns to Meta.

OpenClawRadar
ClawCodex /advisor Mode: Pair Cheap Worker with Expensive Reviewer to Cut Costs Without Losing Quality
Tools

ClawCodex /advisor Mode: Pair Cheap Worker with Expensive Reviewer to Cut Costs Without Losing Quality

Open-source Python coding agent ClawCodex adds an /advisor mode that pairs a cheap worker model (e.g., Haiku) with an expensive reviewer (e.g., Opus) at decision points, cutting costs several-fold without sacrificing architectural judgment.

OpenClawRadar
Claude Agent Teams UI: Desktop App for Visualizing Claude Code Agent Workflows
Tools

Claude Agent Teams UI: Desktop App for Visualizing Claude Code Agent Workflows

A developer built a free, open-source desktop app that adds a visual layer to Claude Code's experimental Agent Teams feature. The app provides a real-time kanban board where tasks move automatically as agents work, plus cross-team communication, built-in review workflows, and per-task code review.

OpenClawRadar
ApexClaw: Open-Source Telegram AI Agent with 85+ Tools for Web Automation, Voice, and Email
Tools

ApexClaw: Open-Source Telegram AI Agent with 85+ Tools for Web Automation, Voice, and Email

ApexClaw is an open-source Telegram AI agent written in Go that provides 85+ built-in tools including web browsing with headless Chrome, voice note processing, Gmail integration, and shell script execution. It's self-hosted and uses the z.ai engine for reasoning.

OpenClawRadar