🏗️
MetaGPT+Stompy

Software company simulation with corporate memory

A software company that remembers its history

The Problem

MetaGPT is remarkable: it simulates an entire software company. Product managers write requirements documents. Architects create system designs. Engineers implement code. QA reviews for bugs. Each role follows established software engineering practices—PRDs, design docs, code reviews. It's software development by committee, fully automated.

But real companies have institutional memory. MetaGPT sessions don't.

Here's what happens: You ask MetaGPT to build a user authentication system. The PM writes a detailed PRD. The architect designs an elegant OAuth flow. The engineers implement it beautifully. A complete, working system emerges from your AI software company.

Next month, you need a payment integration. You spin up MetaGPT again. The PM writes a new PRD—but doesn't reference the auth system that already exists. The architect designs a payment flow that duplicates user management logic. The engineers implement patterns that contradict what was built before. Your AI company has collective amnesia.

The problem is fundamental to how software companies work. Real engineering teams have: wikis documenting past decisions, shared codebases showing established patterns, institutional knowledge about what approaches work for their domain. Junior engineers learn from senior ones. Past projects inform current ones. The company gets smarter over time.

MetaGPT captures the structure of a software company. But structure without memory is just process without learning. Your AI team builds brilliantly in isolation, then forgets everything.

Simulated companies need simulated institutional memory.

How Stompy Helps

Stompy gives MetaGPT the institutional memory that makes real engineering teams effective.

Your AI software company gains true corporate knowledge: - **Architectural decision records**: Every design choice is documented with rationale. When the architect designs a new system, they can reference why previous decisions were made. - **Codebase patterns**: The engineering team remembers patterns that work. A new feature builds on established conventions, not parallel universe implementations. - **Cross-project learning**: The payment system knows the auth system exists. The architect designs for integration, not isolation. - **Role-specific expertise**: Your PM learns what requirements formats work best. Your architect learns your company's architectural style. Each role builds domain expertise.

MetaGPT provides the organizational structure. Stompy provides the institutional memory. Together: an AI software company that actually learns and improves over time.

Build institutional memory, not just institutional structure.

Integration Walkthrough

1

Create shared company memory for all roles

Set up Stompy as the institutional knowledge base accessible to every role in your AI software company.

from metagpt.roles import ProductManager, Architect, Engineer, QaEngineer
from metagpt.team import Team
import httpx
import os
class CompanyMemory:
"""Institutional memory for the AI software company."""
def __init__(self):
self.url = "https://mcp.stompy.ai/sse"
self.headers = {"Authorization": f"Bearer {os.environ['STOMPY_TOKEN']}"}
async def recall_decisions(self, domain: str) -> str:
"""Recall architectural decisions for a domain."""
async with httpx.AsyncClient() as client:
response = await client.post(self.url, headers=self.headers,
json={"tool": "context_search", "query": f"architecture {domain}", "limit": 5})
results = response.json().get("results", [])
return "\n---\n".join([r["content"] for r in results])
async def recall_patterns(self, pattern_type: str) -> str:
"""Recall established code patterns."""
async with httpx.AsyncClient() as client:
response = await client.post(self.url, headers=self.headers,
json={"tool": "recall_context", "topic": f"patterns_{pattern_type}"})
return response.json().get("content", "")
async def save_decision(self, topic: str, content: str, priority: str = "important"):
"""Save an architectural decision for future reference."""
async with httpx.AsyncClient() as client:
await client.post(self.url, headers=self.headers,
json={"tool": "lock_context", "topic": topic,
"content": content, "priority": priority})
company_memory = CompanyMemory()
2

Enhance roles with institutional knowledge

Configure each role to leverage and contribute to company memory.

class MemoryEnabledArchitect(Architect):
"""Architect role with access to institutional memory."""
async def _think(self):
# Recall relevant past decisions before designing
past_decisions = await company_memory.recall_decisions(self.current_task.domain)
existing_patterns = await company_memory.recall_patterns("architecture")
self.context += f"""
INSTITUTIONAL KNOWLEDGE:
Past architectural decisions:
{past_decisions}
Established patterns:
{existing_patterns}
Design should be consistent with existing systems unless there's good reason to deviate.
"""
return await super()._think()
async def _act(self):
result = await super()._act()
# Save new architectural decisions
if result.design_doc:
await company_memory.save_decision(
topic=f"adr_{self.current_task.name}",
content=f"Design: {result.design_doc}\nRationale: {result.rationale}",
priority="important"
)
return result
# Similarly for other roles
class MemoryEnabledPM(ProductManager):
async def _think(self):
past_prds = await company_memory.recall_decisions("requirements")
self.context += f"\nPREVIOUS SUCCESSFUL PRDs:\n{past_prds}"
return await super()._think()
3

Build cumulative company intelligence

Track project outcomes and learnings to make the company smarter over time.

async def run_project_with_memory(requirement: str, project_name: str):
"""Run a MetaGPT project with full institutional memory."""
# Recall what the company knows about similar projects
similar_projects = await company_memory.recall_decisions(f"project similar to {requirement}")
team = Team(
roles=[
MemoryEnabledPM(),
MemoryEnabledArchitect(),
MemoryEnabledEngineer(),
MemoryEnabledQA()
]
)
# Run the project
result = await team.run(requirement)
# Save project outcome for future learning
await company_memory.save_decision(
topic=f"project_{project_name}_outcome",
content=f"""Project: {project_name}
Requirement: {requirement}
Architecture: {result.architecture_summary}
Key patterns used: {result.patterns}
Lessons learned: {result.retrospective}
Status: {result.status}""",
priority="important"
)
return result
# Each project makes the company smarter
await run_project_with_memory("Build user authentication with OAuth", "auth_v1")
await run_project_with_memory("Add Stripe payment integration", "payments_v1")
# Second project now knows about the first!

What You Get

  • Architectural decision records: Every design choice is documented with rationale, preventing repeated debates and contradictory implementations
  • Cross-project coherence: New projects know about existing systems, enabling genuine integration rather than isolated parallel development
  • Role expertise accumulation: Your PM learns effective requirement formats, your architect learns your style—each role improves over time
  • Codebase pattern memory: Established patterns are remembered and reused, creating consistent, maintainable code across projects
  • Project retrospectives: Lessons from each project inform future work, creating genuine organizational learning

Ready to give MetaGPT a memory?

Join the waitlist and be the first to know when Stompy is ready. Your MetaGPT projects will never forget again.