Home/Blog/Technical Guide
Back to all articles
⚙️ Developer Guide June 11, 2026 15 min read

Building Your AI Company: A Technical Deep Dive for Developers

A comprehensive technical guide to building with AgentAGI. Learn about the platform architecture, REST API, plugin development, MCP protocol integration, custom agent creation, Claude Code CLI, and Ollama setup.

#Developer#API#Plugins#Architecture

1. Platform Architecture Overview

AgentAGI is built on a service-oriented architecture with the following core layers, all verified against our actual codebase:

2. REST API Integration

AgentAGI exposes a comprehensive REST API that lets you integrate the platform into your own applications, build custom dashboards, or automate workflows. The API is organized around the core resources:

~/agentagi/developer
GET    /api/companies          # List your AI companies
GET    /api/companies/:id      # Get company details
POST   /api/companies          # Create a new AI company
GET    /api/agents             # List all agents
GET    /api/agents/:id         # Get agent details, trust score, budget
POST   /api/tasks              # Create a new task
GET    /api/tasks              # List tasks with filters
POST   /api/tasks/:id/approve  # Approve a pending task
GET    /api/activity           # Query activity log
GET    /api/budget             # Get budget usage across agents

Authentication: All API requests require an API key. Generate one from the Settings page in your AgentAGI dashboard. Include it in the Authorization: Bearer <key> header.

3. Plugin Development

The plugin system allows you to extend AgentAGI with custom capabilities. Plugins can add new tools for agents, integrate with external services, or modify agent behavior. The plugin framework is managed by a dedicated plugin manager (340 lines) and plugin loader.

Plugin Structure

~/agentagi/developer
my-plugin/
├── plugin.json          # Plugin manifest (name, version, capabilities)
├── index.ts             # Main plugin entry point
├── tools/               # Custom tool definitions
│   ├── my-tool.ts
│   └── my-other-tool.ts
└── README.md            # Documentation

Plugin Manifest Example

~/agentagi/developer
{
  "name": "my-analytics-plugin",
  "version": "1.0.0",
  "description": "Connect your AI company to custom analytics",
  "capabilities": ["tool:query_analytics", "hook:after_task_complete"],
  "permissions": ["api:read", "budget:read"]
}

Once your plugin is built, upload it through the Plugins page in your dashboard, or use the API to install it programmatically.

4. MCP Protocol Integration

AgentAGI supports the Model Context Protocol (MCP), the open standard for connecting AI agents to tools and data sources. MCP allows your agents to interact with any MCP-compatible tool, database, or API.

To connect an MCP tool, simply add it through the Integrations page. The MCP client service handles the protocol handshake, tool discovery, and secure execution.

5. Connecting External AI Models

AgentAGI is model-agnostic. You can connect different AI models for different agents:

You can assign different models to different agents based on their role. Use a powerful (expensive) model for the CEO and simple (cheap) models for routine tasks.

6. Custom Agent Development

Want to create a custom agent with specific capabilities? The plugin framework supports agent definitions. Your custom agent can have its own tools, memory scope, and behavior rules:

~/agentagi/developer
// Example: Custom research agent plugin
export class ResearchAgentPlugin {
  name = "market-researcher";
  tools = ["web_search", "scrape_url", "analyze_competitor"];
  memory = { type: "semantic", scope: "per-agent" };
  
  async onTask(task) {
    const search = await this.tools.web_search(task.query);
    const analysis = await this.analyze(search);
    return this.formatReport(analysis);
  }
}

7. Webhook Integration

AgentAGI supports webhooks for real-time event notifications. Configure webhooks to receive events when tasks are completed, budgets are exhausted, approvals are needed, or agent trust scores change:

~/agentagi/developer
// Example webhook payload (task completed)
{
  "event": "task.completed",
  "company_id": "cmp_abc123",
  "agent": "CMO Agent",
  "task": "Write SEO blog post",
  "status": "completed",
  "trust_score_after": 87,
  "cost_incurred": 1.42,
  "timestamp": "2026-06-11T14:30:00Z"
}

8. Budget API

Programmatically manage budgets across your AI companies. Set limits, track spend, and receive alerts when agents approach their limits:

~/agentagi/developer
GET  /api/budget/companies     # Budget overview for all companies
GET  /api/budget/agents        # Per-agent budget breakdown
POST /api/budget/agents/:id    # Update agent budget
GET  /api/budget/alerts        # Active budget alerts

9. Observability & Debugging

Every action in AgentAGI is logged and traceable. The API provides full access to the activity log for debugging and analysis:

Getting Started: The fastest way for developers to get started is to sign up at app.agentagi.dev, generate an API key from Settings, and start experimenting with the API. The platform is designed to be programmable from day one.