# MetaGPT | FoundationAgents | Knowledge Base | Instagit

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

GitHub Stars: 64.8k

Repository: https://github.com/FoundationAgents/MetaGPT

---

## Articles

### [Optimizing Token Usage and Reducing LLM Operational Costs with MetaGPT](/FoundationAgents/MetaGPT/optimizing-token-usage-and-reducing-llm-operational-costs)

Optimize token use and cut LLM operational costs with MetaGPT. Leverage built-in token counting, message compression, and cost tracking for efficient AI.

- Tags: best-practices
- Published: 2026-03-04

### [Handling Inter-Agent Message Passing and Communication in MetaGPT](/FoundationAgents/MetaGPT/handling-inter-agent-message-passing-and-communication-within-the-environment)

Learn how MetaGPT handles inter-agent message passing and communication using a publish/subscribe pattern and address-based routing. Discover broadcast and self-routing capabilities.

- Tags: internals
- Published: 2026-03-04

### [Configuring Role-Specific LLM Parameters and Prompts in MetaGPT](/FoundationAgents/MetaGPT/configuring-role-specific-llm-parameters-and-prompts-for-tailored-agent-behavior)

Customize MetaGPT agent behavior by configuring role-specific LLM parameters and prompts. Tailor assignments and define profiles for dynamic system prompts.

- Tags: how-to-guide
- Published: 2026-03-04

### [Advanced Usage Patterns for MetaGPT Action Classes: WritePRD and WriteCode Deep Dive](/FoundationAgents/MetaGPT/advanced-usage-patterns-for-metagpt-action-classes-like-writeprd-or-writecode)

Explore advanced MetaGPT action classes like WritePRD and WriteCode. Learn how to build structured, autonomous software development pipelines using ActionNode and ProjectRepo for efficient code and PRD generation.

- Tags: deep-dive
- Published: 2026-03-04

### [Managing Incremental Development Cycles and State Updates in MetaGPT](/FoundationAgents/MetaGPT/managing-incremental-development-cycles-and-state-updates-in-metagpt)

Master incremental development cycles and state updates in MetaGPT. Learn how the --inc flag and rc.state mechanism enable seamless AI agent resumption and persistent action sequences for efficient software development.

- Tags: best-practices
- Published: 2026-03-04

### [How to Choose and Configure Optimal Embedding Models for RAG Implementations in MetaGPT](/FoundationAgents/MetaGPT/choosing-and-configuring-optimal-embedding-models-for-rag-implementations)

Master optimal embedding models for RAG in MetaGPT. Learn how MetaGPT's factory pattern configures LlamaIndex embedding classes for efficient retrieval.

- Tags: best-practices
- Published: 2026-03-04

### [How to Use the MetaGPT Research Agent for Automated Web Scraping and Report Generation](/FoundationAgents/MetaGPT/utilizing-the-research-agent-for-effective-web-scraping-and-information-gathering)

Learn how to use the MetaGPT Research agent for automated web scraping and report generation. Transform topics into structured markdown reports with APA references.

- Tags: how-to-guide
- Published: 2026-03-04

### [Automating the Code Review Process Using the WriteCodeReview Action in MetaGPT](/FoundationAgents/MetaGPT/automating-the-code-review-process-using-the-writecodereview-action)

Automate code reviews with MetaGPTs WriteCodeReview action. Use an LLM to analyze code against design docs, get structured feedback, and auto-rewrite code for better quality.

- Tags: how-to-guide
- Published: 2026-03-04

### [Implementing Cost Management and Budget Monitoring for LLM Usage in MetaGPT](/FoundationAgents/MetaGPT/implementing-cost-management-and-budget-monitoring-for-llm-usage)

Effectively manage LLM costs with MetaGPTs cost management subsystem. Track token usage, monitor expenses, and set budgets across LLM providers using the CostManager class. Control your spending now.

- Tags: how-to-guide
- Published: 2026-03-04

### [How to Add and Utilize Custom Tools in MetaGPT Agent Actions: A Complete Guide](/FoundationAgents/MetaGPT/adding-and-utilizing-custom-tools-within-metagpt-agent-actions)

Easily add and utilize custom Python tools in MetaGPT agents. Learn how to register tools with @register_tool and pass them to roles for enhanced agent capabilities. Full guide available.

- Tags: how-to-guide
- Published: 2026-03-04

### [Configuring and Controlling Browser Automation with Playwright and Selenium in MetaGPT](/FoundationAgents/MetaGPT/configuring-and-controlling-browser-automation-tools-like-playwright-or-selenium)

Configure and control browser automation with Playwright or Selenium using MetaGPT. Switch engines easily with a unified async run API for efficient web page fetching and parsing.

- Tags: how-to-guide
- Published: 2026-03-04

### [Integrating Various Search Engine Providers (Google, Bing, Serper) for Agent Research in MetaGPT](/FoundationAgents/MetaGPT/integrating-various-search-engine-providers-google-bing-serper-for-agent-research)

Integrate Google Bing and Serper search providers in MetaGPT using a unified async interface and plugin architecture for efficient agent research. Simplify search logic.

- Tags: how-to-guide
- Published: 2026-03-04

### [Serializing and Deserializing Agent Team State in MetaGPT: A Complete Guide to Persistence and Recovery](/FoundationAgents/MetaGPT/serializing-and-deserializing-agent-team-state-for-persistence-and-recovery)

Learn to serialize and deserialize agent team state in MetaGPT for robust persistence and recovery. This guide details saving and restoring entire team states via JSON for fault tolerance.

- Tags: how-to-guide
- Published: 2026-03-04

### [Configuring and Optimizing the MetaGPT Experience Pool (exp_pool) for Agent Performance](/FoundationAgents/MetaGPT/configuring-and-optimizing-the-experience-pool-exp_pool-for-agent-performance)

Optimize agent performance by configuring and enabling the MetaGPT exp_pool. Learn how to set up lexical or semantic caching for faster, high-quality responses.

- Tags: performance
- Published: 2026-03-04

### [Debugging and Troubleshooting Errors During Agent Actions in MetaGPT](/FoundationAgents/MetaGPT/strategies-for-debugging-and-troubleshooting-errors-during-agent-actions)

Troubleshoot MetaGPT agent action errors with automated detection, LLM output parsing, and centralized logging. Resolve failures efficiently during agent execution.

- Tags: how-to-guide
- Published: 2026-03-04

### [Setting Up Retrieval Augmented Generation (RAG) with Custom Embedding Models in MetaGPT](/FoundationAgents/MetaGPT/setting-up-retrieval-augmented-generation-rag-with-custom-embedding-models)

Learn to set up Retrieval Augmented Generation RAG with custom embedding models in MetaGPT. Easily swap embedding models via configyaml for enhanced AI applications.

- Tags: how-to-guide
- Published: 2026-03-04

### [Implementing and Managing Long-Term Memory for Agents Using RoleZero in MetaGPT](/FoundationAgents/MetaGPT/implementing-and-managing-long-term-memory-for-agents-using-role_zero)

Learn how to implement and manage long-term memory for agents with RoleZero in MetaGPT. Explore its hybrid memory architecture for persistent recall and fast access to interactions.

- Tags: how-to-guide
- Published: 2026-03-04

### [How to Customize Standard Operating Procedures (SOP) for Agent Workflows in MetaGPT](/FoundationAgents/MetaGPT/customizing-the-standard-operating-procedures-sop-for-agent-workflows)

Learn how to customize Standard Operating Procedures SOP for agent workflows in MetaGPT. Switch between dynamic LLM-driven planning and static pipelines to optimize your agents.

- Tags: how-to-guide
- Published: 2026-03-04

### [Orchestrating Multi-Agent Collaboration and Communication Patterns in MetaGPT](/FoundationAgents/MetaGPT/orchestrating-multi-agent-collaboration-and-communication-patterns-in-metagpt)

Master multi-agent collaboration in MetaGPT. Learn how the plug-and-play framework orchestrates roles, environments, and communication patterns for complex workflows.

- Tags: deep-dive
- Published: 2026-03-04

### [Leveraging the Data Interpreter for Advanced Data Analysis Tasks in MetaGPT](/FoundationAgents/MetaGPT/leveraging-the-data-interpreter-for-advanced-data-analysis-tasks-within-metagpt)

Master advanced data analysis with MetaGPT Data Interpreter. This tool autonomously generates and refines Python code using a REACT loop for powerful insights.

- Tags: how-to-guide
- Published: 2026-03-04

### [How to Integrate Multiple LLM Providers (Azure, Ollama, Anthropic) with MetaGPT](/FoundationAgents/MetaGPT/integrating-multiple-llm-providers-like-azure-ollama-or-anthropic-with-metagpt)

Easily integrate Azure, Ollama, and Anthropic LLM providers with MetaGPT by updating a YAML file. Switch providers without code changes and enhance your AI agent development.

- Tags: how-to-guide
- Published: 2026-03-04

### [How to Define Custom Agents and Their Capabilities in MetaGPT: A Complete Guide](/FoundationAgents/MetaGPT/how-to-define-custom-agents-and-their-capabilities-in-metagpt)

Learn to define custom agents and their capabilities in MetaGPT. Subclass Role, implement async Action methods, and register them to build bespoke AI agents.

- Tags: how-to-guide
- Published: 2026-03-04

