Skip to content

Commit

Permalink
docs: add MetaGPT integration documentation
Browse files Browse the repository at this point in the history
- Add MetaGPT integration guide with example
- Include session tracking screenshots and examples
- Update navigation in mint.json
- Link to #544

Co-Authored-By: Alex Reibman <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and areibman committed Dec 12, 2024
1 parent 232dc20 commit 415ee06
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"anchors": {
"from": "#D1E5F7",
"to": "#a9bed4"

}
},
"topbarCtaButton": {
Expand Down Expand Up @@ -96,6 +96,7 @@
"v1/integrations/langchain",
"v1/integrations/llama_stack",
"v1/integrations/litellm",
"v1/integrations/metagpt",
"v1/integrations/mistral",
"v1/integrations/multion",
"v1/integrations/ollama",
Expand Down
Binary file added docs/v1/img/metagpt/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions docs/v1/integrations/metagpt.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: "MetaGPT"
description: "Track your MetaGPT software company simulations"
---

import { Callout } from 'nextra/components'
import { Tab, Tabs } from 'nextra/components'

# MetaGPT Integration

[MetaGPT](https://github.com/geekan/MetaGPT) is a multi-agent framework that simulates a software company, where different roles (Product Manager, Architect, Engineer) collaborate to build software from a simple prompt.

## Installation

```bash
pip install metagpt agentops
```

## Configuration

Add your AgentOps API key to MetaGPT's configuration file (`~/.metagpt/config2.yaml`):

```yaml
agentops_api_key: "YOUR_AGENTOPS_API_KEY" # get key from https://app.agentops.ai/settings/projects
```
## Example: Software Company Simulation
Here's how to run a MetaGPT software company simulation with AgentOps tracking:
```python
from metagpt.software_company import generate_repo

# AgentOps tracking is automatically enabled if agentops_api_key is configured
repo = generate_repo("Create a simple calculator app")
```

## Viewing Results

After running your simulation:

1. Visit [app.agentops.ai](https://app.agentops.ai)
2. Sign in with GitHub to access your dashboard
3. Find your session tagged with "software_company"

![AgentOps Login](/v1/img/metagpt/login.png)

Here's an example of a MetaGPT software company simulation tracked by AgentOps:

```text
=== MetaGPT with AgentOps Integration Example ===
Session Overview:
Duration: 1m 0.2s | Cost: $0.164820 | LLMs: 3 | Tools: 0 | Actions: 0 | Errors: 0
Session URL: https://app.agentops.ai/drilldown?session_id=ac0ea6a2-3f50-4f4b-994f-117d829a0116
Agent Interactions:
1. Product Manager (Alice) - Prepared requirements and PRD
2. Architect (Bob) - Created system design with MVC pattern
3. Project Manager (Eve) - Generated task list and dependencies
Project Outcome:
Generated calculator app with:
- main.py - Application entry point
- model.py - Calculation logic and history management
- view.py - User interface components
- controller.py - Input handling and coordination
```

The example above demonstrates how AgentOps tracks:
- Session metrics (duration, cost, LLM usage)
- Agent interactions and role assignments
- Project outcomes and deliverables

## How it Works

MetaGPT automatically integrates with AgentOps to track your software company simulations. When you run `generate_repo()`, AgentOps:

1. Initializes a new session with the "software_company" tag
2. Tracks all agent interactions throughout the simulation
3. Records the final outcome when the simulation completes

## Advanced Configuration

You can customize the AgentOps integration by modifying the tags:

```python
import agentops
from metagpt.software_company import generate_repo

# Initialize with custom tags
agentops.init(tags=["software_company", "calculator_project"])

repo = generate_repo("Create a simple calculator app")
```

0 comments on commit 415ee06

Please sign in to comment.