Building a Self-Extending Internal AI Ops Agent
Y Combinatorgo watch the original →
the gist
AnswerThis scaled to $2M ARR by deploying an AI agent that uses a coding sub-agent to build its own tools and updates its own behavioral instructions via a persistent Markdown file.
The Self-Extending Architecture
The core of the AnswerThis internal agent is a Python-based harness that utilizes a coding sub-agent to expand its own capabilities. When the main agent encounters a task it cannot complete, it invokes a coding agent to write a new CLI tool, which is then permanently added to its library. This system has allowed the agent to grow from a basic skeleton into a robust system with over 45 custom-built CLIs, including automated monitoring for landing page uptime and CRM synchronization.
Memory and Behavioral Evolution
The agent maintains three distinct types of memory to function autonomously:
- Factual Memory: The agent is provided read-only access to the company codebase and database, updated via cron jobs, allowing it to query business logic and subscription states directly.
- Behavioral Memory: The agent uses an
instructions.mmdfile that is loaded on every turn. Non-technical team members can provide feedback via Slack, which the agent uses to update this file, effectively modifying its own operational behavior. - Procedural Memory: This consists of the specific CLI tools the agent has authored for itself to handle recurring tasks like support ticket resolution and email processing.
Implementation Strategy
To replicate this setup, developers should wrap a coding-capable CLI in a Python harness that monitors a task queue connected to Slack and email. By granting the agent access to existing service CLIs (such as Stripe or Intercom) and providing a dedicated coding agent as a tool, the system becomes self-authoring. The feedback loop is closed by allowing the agent to write to its own instruction file, ensuring that human corrections are immediately integrated into the agent's future decision-making process.