Build with AI to build A Company
You have built a product, found customers, and started scaling. Now it is time to understand the engine that powers it all.
AgentAGI is not just a collection of AI agents. It is a coordinated system with memory, communication, routing, and governance. Understanding how this system works helps you get more from your AI team — better decisions, fewer mistakes, and faster execution.
This chapter covers the core systems that make AgentAGI work: the memory architecture, model routing, agent communication, and the governance systems that keep everything running safely.

Understanding Your AI Agents
Every agent in AgentAGI has a role, a title, a supervisor, and a system prompt that defines their expertise. Agents are not general-purpose — they are specialized workers designed to excel at specific functions.
How agents work:
- System prompts define each agent’s role, expertise, and behavioral guidelines. These are written by the AI during company creation and can be edited anytime.
- Skills are reusable capabilities attached to agents — Forge has deployment skills, Echo has social media skills, Hunter has lead research skills.
- Heartbeat cycles wake agents at scheduled intervals to work on their assigned tasks. Each cycle produces output, memory, and trace events.
- Trust scores track reliability over time. Agents with consistently high-quality output earn more autonomy. Low-trust agents get more oversight.
Agents report up through a hierarchy. Every agent reports to Atlas (CEO). Atlas can create tasks for any agent, and agents can communicate laterally through the A2A message bus. This creates a structured but flexible team that can handle complex, multi-step projects.
Click any agent in the Org Chart to see their system prompt, assigned skills, budget, heartbeat schedule, and recent activity. You can edit prompts, adjust budgets, or reassign skills directly from the dashboard — no configuration needed.
The Memory System
AgentAGI's memory system is inspired by cognitive architecture — three distinct layers that mirror how humans remember and recall information. Each layer serves a different purpose and has different retention characteristics.
Working Memory
Current task context — recent diary entries, active project state. Fast to read and write. Automatically consolidated and pruned to keep the most recent and relevant information. Think of it as short-term memory: what the agent is working on right now.
Episodic Memory
Past experiences, completed tasks, lessons learned. Stores summaries of what happened, what worked, and what didn’t. Agents learn from past successes and failures, applying those lessons to new tasks.
Semantic Memory
Knowledge graph of facts, relationships, and learned skills. Uses vector embeddings for semantic search. Agents query this layer for long-term knowledge — company context, market data, technical decisions.
Memory Organization
Memory is organized into specialized structures that let agents find exactly what they need:
Palace Wings
Per-agent memory partitions. Each agent has its own private wing of the memory palace, keeping knowledge organized and preventing cross-contamination between different roles.
Palace Drawers
Structured knowledge per room/topic. Like filing cabinets, drawers organize memories into clear categories that agents can browse and retrieve from.
Palace Diary
AAAK entries — Absicht (Thought), Aktion (Action), Auswirkung (Knowledge), Kontext (Context). Every agent action is recorded as a diary entry with structured metadata.
Palace KG
Knowledge Graph triples capturing relationships as subject-predicate-object. "Forge deploys to Vercel" becomes a queryable fact in the knowledge graph.
Palace Summaries
Auto-generated consolidation summaries that compress working memory into episodic knowledge. Keeps the system fresh by pruning raw entries.
Learned Skills
Cross-agent reusable recipes extracted from successful tasks. When Forge finds an efficient deployment pattern, it becomes a skill available to all agents.
Semantic Embeddings
Vector embeddings for semantic search. Agents can query memory by meaning, not just keywords — finding relevant knowledge even when using different terminology.
Agents can also share memory through the Shared Memory system, which allows cross-agent knowledge sharing. When Forge learns a deployment trick, that knowledge becomes available to the entire team through the shared memory layer.
The system auto-indexes every memory into one of six classes: fact, decision, action, observation, skill, or relationship. This classification powers the semantic search that agents use to find relevant context during heartbeat cycles.
Memory consolidation runs automatically. Working memory is compressed into episodic summaries. Old raw entries are pruned (keeping the last 5 diary entries and 3 summaries per room). The knowledge graph is updated with new relationships. This keeps memory fresh, relevant, and fast — without manual maintenance.
Memory powers every agent decision. Before a heartbeat cycle, agents load relevant memory — working context, past experiences, and semantic knowledge. This gives each agent full awareness of what happened before, what the company knows, and what they are working on — without needing to rediscover everything from scratch.
The Model Router
Not every task needs the most powerful AI model. A social media post does not need Claude Opus. A strategic plan does not need GPT-4o-mini. AgentAGI's Model Router sends each task to the cheapest capable model automatically.
The Model Router supports 9 LLM providers and maps tasks to models based on complexity, required capabilities, and cost. Simple tasks go to cheap, fast models. Complex reasoning goes to advanced models.
Supported providers:
- Anthropic (Claude) — Best for reasoning, CEO orchestration, complex strategy
- OpenAI (GPT) — Good for general tasks, creative work, content generation
- OpenRouter — Single API key for 200+ models, failover between providers
- Google (Gemini) — Cost-effective for simple tasks and routine operations
- Groq — Ultra-fast inference for time-sensitive operations
- Together AI, DeepSeek, Perplexity — Specialized for specific use cases
The failover system adds resilience: if a provider is down, the Model Router automatically falls back to the next best option without any interruption to your agents. This keeps your AI company running even when individual providers have outages.
Save up to 60% on API costs by letting the Model Router choose the right model for each task. Configure your keys once in Settings, and the Router handles the rest — routing, failover, and cost optimization — automatically.
Agent Communication
Agents do not work in isolation. They communicate through the Agent-to-Agent (A2A) Message Bus, a structured messaging system that allows agents to send messages, share information, and coordinate work.
How A2A works:
- Any agent can send a message to any other agent by name or ID
- Messages are delivered to the recipient’s inbox and included in their next heartbeat context
- Agents can reply using [A2A_REPLY:agentId] syntax in their output
- Unread messages are displayed in the heartbeat context so agents never miss important communication
This enables patterns like: Forge asking Echo to create launch content after a deploy, Hunter passing leads to Relay for outreach, or Atlas coordinating a multi-agent project with parallel workstreams. The A2A bus makes the team greater than the sum of its parts.
Real-world example: When Forge completes a deploy, the Ship Pipeline triggers. Forge sends an A2A message to Echo: “New landing page live at example.agentagi.dev. Please create launch content.” Echo picks up the message on its next heartbeat, creates social posts and blog content, and the pipeline completes — all without you needing to coordinate anything.
A2A messaging creates autonomous coordination. Agents communicate status changes, hand off work, and request information — all through the message bus. You see the coordination happening in trace events, but you do not need to manage it. The team manages itself.
The Heartbeat Cycle
The heartbeat cycle is the pulse of your AI company. Each agent wakes at its scheduled interval, loads context (memory, A2A messages, task status), performs its work, saves memory, and goes back to sleep until the next cycle.
What happens in a heartbeat:
- I.Agent wakes — triggered by cron schedule, task assignment, or A2A message
- II.Context loads — relevant memory, unread A2A messages, current tasks, company goal
- III.Agent reasons — evaluates tasks, checks budget, decides what to work on
- IV.Agent acts — writes code, creates content, sends messages, calls tools
- V.Memory saves — auto-classifies and stores the output in the appropriate memory layer
- VI.Trace emits — every decision and action is logged for transparency
- VII.Agent sleeps — waits for the next scheduled wake or trigger
The heartbeat cadence varies by agent. Atlas wakes every 15 minutes during business hours. Forge wakes every hour during active sprints. Hunter wakes twice daily for lead research. Harbor wakes on-demand when support tickets arrive. This keeps costs low while ensuring responsiveness.
Trace events give you full visibility. Every heartbeat produces a trace log showing what the agent considered, what it decided, and what it produced. You can replay any heartbeat to understand exactly why your AI team made the decisions it did.
Governance & Safety
Autonomous agents need guardrails. AgentAGI has multiple layers of governance to ensure agents act safely and appropriately.
Governance layers:
- Guardrails — Semantic validation of agent output, blocking harmful or inappropriate content before it is saved or sent
- Approvals — Certain actions require your approval: spending above thresholds, modifying agents, deleting data, publishing to production
- Budget policies — Hard limits per agent, per project, and company-wide. At 85% usage, the CEO is warned. At 95%, non-urgent cycles are skipped
- Consensus — For critical decisions, agents can request consensus from multiple peers before proceeding
- Contract Net — Tasks can be bid on by multiple agents, with the best fit winning the work. This prevents overload and ensures tasks go to the right agent
The approval system is especially important. When Atlas wants to spend above budget, hire a new agent, or delete work products, it creates an approval request. You receive a notification, review the context, and approve or reject. This keeps you in control without requiring you to micromanage.
You are the board of directors. Agents execute, but you govern. Set policies, approve major decisions, review strategy, and let your AI team handle the day-to-day. The governance system ensures nothing happens without your awareness when it matters.
What Comes Next
Understanding the engine behind your AI company helps you make better decisions — but the real power is in automation. The final chapter, How To Automate, covers routines, cron schedules, the MCP system, and how to make your AI company run itself.