Spaces:
Runtime error
MCO Hackathon Project - Integration Documentation
Project Overview
This project implements a real-world demonstration of the MCO Protocol as the missing orchestration layer for agent frameworks. It features:
- Real AutoGPT-like Agent: Built with Modal API for genuine LLM inference and tool execution
- Genuine MCO Orchestration: Using the actual MCO MCP server (not simulated)
- Single-Page UI: Showing Claude's thinking process and MCO orchestration logs
- Visual SNLP Generator: With value/NLP editing toggle and proper syntax
Architecture
The implementation consists of three main components:
- MCO MCP Server: The orchestration layer that manages workflow state and progressive revelation
- Modal Agent: An AutoGPT-like agent that can be orchestrated by MCO
- Gradio UI: A web interface for demonstrating and interacting with the system
Integration Flow
- User inputs task requirements in the Gradio UI
- Gradio sends request to Modal endpoint
- Modal agent starts and connects to MCO MCP server
- MCO orchestrates the agent through the workflow
- Agent thinking and MCO logs are streamed back to the UI
- Results are displayed to the user
Components
1. MCO MCP Server
The MCO MCP server uses the official MCP SDK with stdio transport, ensuring compatibility with MCP Inspector and other MCP-enabled tools. Key improvements include:
- Enhanced SNLP Parser: Better cross-platform path handling and error reporting
- Robust Error Handling: Clear error messages and graceful failure modes
- Proper Initialization: Reliable startup and shutdown sequences
2. Modal Agent
The Modal implementation provides a real AutoGPT-like agent with:
- LLM Interface: Claude API for reasoning and planning
- Tool System: Code interpreter, file operations, web access
- MCP Client: Integration with MCO MCP server
- Specialized Code Review: Analysis, suggestions, and test generation
3. Gradio UI
The single-page Gradio UI features:
- Agent Demo: Run the agent with real Modal API and MCO orchestration
- Thinking Visualization: See Claude's thinking process in real-time
- MCO Logbook: Track orchestration events and progress
- SNLP Generator: Create and edit MCO workflow files with a toggle for simplified editing
Implementation Details
Modal Implementation
The Modal implementation (modal_implementation.py
) defines:
- AutoGPTAgent: Base agent class with MCO integration
- CodeReviewAgent: Specialized agent for code review tasks
- MCPClient: Client for interacting with MCO MCP server
- Modal Functions: Remote endpoints for running the agent
Gradio UI
The Gradio UI (gradio_ui.py
) provides:
- Agent Demo Tab: Run the agent and view results
- SNLP Generator Tab: Create and edit MCO workflow files
- About Tab: Information about MCO Protocol
SNLP Files
The system generates four SNLP files:
- mco.core: Core workflow configuration
- mco.sc: Success criteria
- mco.features: Feature specifications
- mco.styles: Style guidelines
Usage Instructions
Running the Demo
Start the Gradio app:
python gradio_ui.py
Navigate to the Agent Demo tab
Enter a task description, select review type and language focus
Click "Run Agent" to start the agent with MCO orchestration
Watch the agent thinking process and MCO logs in real-time
View the results when the agent completes
Creating SNLP Files
Navigate to the SNLP Generator tab
Select review type and language focus
Click "Generate SNLP Files" to create initial files
Toggle between "Values Only" and "Full Edit" modes
Edit the values and NLP content as needed
Download individual files or all files as a zip
Using MCO with Your Own Agent
Install the MCO package:
npm install @paradiselabs/mco-protocol
Add MCO to your MCP config:
{ "mcpServers": { "mco-orchestration": { "command": "node", "args": ["path/to/mco-mcp-server.js"], "env": { "MCO_CONFIG_DIR": "path/to/config" } } } }
Create SNLP files using the generator
Run your agent with MCO orchestration
Technical Notes
Real vs. Simulated Components
This implementation uses:
- Real Modal API: For genuine LLM inference with Claude
- Real MCO MCP Server: Using the official MCP SDK
- Real Tool Execution: Code interpreter, file operations, etc.
- Real-time UI Updates: Streaming thinking process and logs
Cross-Platform Compatibility
The implementation ensures compatibility across:
- Windows: Proper path handling and normalization
- Mac/Linux: Standard path handling
- Different Browsers: Responsive UI design
Error Handling
The system includes robust error handling:
- MCO Server Errors: Clear error messages and recovery
- Modal API Errors: Graceful fallbacks
- UI Errors: User-friendly error messages
Future Improvements
- Enhanced Tool System: Add more specialized tools for different tasks
- Multi-Agent Orchestration: Coordinate multiple agents with MCO
- Custom SNLP Templates: More domain-specific templates
- Performance Optimization: Faster response times and resource usage
- Advanced Visualization: More detailed orchestration visualization