{"slug": "i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates", "title": "I built a desktop AI agent that writes its own tools — behind verification gates", "summary": "A developer built AMA-teras, an open-source desktop AI agent that writes its own tool plugins when it encounters missing capabilities. The agent runs locally with swappable models and enforces a verification gate for all code, including self-written tools and community plugins, to prevent malicious or unsafe execution. The project is available on GitHub under the AGPL license.", "body_md": "*A desktop AI agent that writes its own tools — and why every line passes a gate before it runs.*\n\nAgent capability is quietly becoming synonymous with a specific vendor's pricing plan. I wanted the opposite: an agent that runs on my machine, where models are swappable parts (Anthropic / OpenAI / Moonshot, or free-tier OpenAI-compatible APIs), and where the tools it writes stay on my PC as my assets.\n\nSo I built **AMA-teras** (AGPL, Electron + TypeScript): a desktop agent that, when it hits a capability it lacks, writes a new tool plugin for itself.\n\n\"Self-evolving\" sounds like a horror story, so the pipeline is the product:\n\nNothing ships unreviewed — including code it wrote for itself, and anything imported from the community registry (shared plugins carry a verification-evidence record; audits elsewhere report 12–20% of marketplace skills are malicious, so evidence-or-nothing felt right).\n\nA large part of this app was built by the agent itself, under the same gates. The failure stories are documented in the repo — including the night it deleted its own work branch and we had to rebuild two tools from scratch (that incident is why nightly work now auto-backs-up to a private remote).\n\nRepo: [https://github.com/moriwo-dev-ai/ama-teras](https://github.com/moriwo-dev-ai/ama-teras)\n\nFeedback very welcome, especially on the safety model.", "url": "https://wpnews.pro/news/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates", "canonical_source": "https://dev.to/moriwodevai/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates-2jfl", "published_at": "2026-07-23 10:02:47+00:00", "updated_at": "2026-07-23 10:31:59.058350+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "developer-tools", "ai-products"], "entities": ["AMA-teras", "Anthropic", "OpenAI", "Moonshot", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates", "markdown": "https://wpnews.pro/news/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates.md", "text": "https://wpnews.pro/news/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates.txt", "jsonld": "https://wpnews.pro/news/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates.jsonld"}}