|
| 1 | +export const description = |
| 2 | + 'Robyn AI Agents provide intelligent functionality for building AI-powered applications using MCP (Model Context Protocol) implementation with file system access, task management, and context-aware capabilities.' |
| 3 | + |
| 4 | +# Agents |
| 5 | + |
| 6 | +This guide demonstrates how to build AI-powered agents using Robyn's MCP (Model Context Protocol) implementation. |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +The agent system connects AI assistants like Claude Desktop to your development environment, providing seamless access to: |
| 11 | + |
| 12 | +- File system operations (read, search, organize) |
| 13 | +- Task and note management |
| 14 | +- System monitoring and git integration |
| 15 | +- Web content fetching and analysis |
| 16 | +- Context-aware code analysis |
| 17 | + |
| 18 | +## Quick Start |
| 19 | + |
| 20 | +1. Run the MCP server: |
| 21 | + ```bash |
| 22 | + python examples/agents.py |
| 23 | + ``` |
| 24 | + |
| 25 | +2. Connect your AI assistant to `http://localhost:8080/mcp` |
| 26 | + |
| 27 | +3. Start using natural language commands: |
| 28 | + - "What files are in my projects directory?" |
| 29 | + - "Show me my recent git commits" |
| 30 | + - "Create a note about today's standup meeting" |
| 31 | + - "What processes are using the most CPU?" |
| 32 | + - "Add a task to review the quarterly report" |
| 33 | + |
| 34 | +## Configuration |
| 35 | + |
| 36 | +The assistant creates the following structure: |
| 37 | + |
| 38 | +``` |
| 39 | +~/Documents/ |
| 40 | +├── notes/ # Markdown notes |
| 41 | +└── tasks.json # Task list |
| 42 | +
|
| 43 | +~/projects/ # Development projects |
| 44 | +├── project1/ |
| 45 | +└── project2/ |
| 46 | +``` |
| 47 | + |
| 48 | +## Security |
| 49 | + |
| 50 | +- File access restricted to home directory |
| 51 | +- Safe mathematical expression evaluation |
| 52 | +- Path validation for all file operations |
| 53 | +- Read-only git operations |
| 54 | + |
| 55 | +## Available Resources |
| 56 | + |
| 57 | +### File System |
| 58 | +- `fs://{path}` - Read files in home directory |
| 59 | +- `fs://dir/{path}` - List directory contents |
| 60 | + |
| 61 | +### Git Integration |
| 62 | +- `git://repo/{repo_name}` - Repository status and commits |
| 63 | + |
| 64 | +### System Monitoring |
| 65 | +- `system://processes` - Running processes |
| 66 | +- `system://stats` - System statistics |
| 67 | + |
| 68 | +## Available Tools |
| 69 | + |
| 70 | +- `create_note(title, content, tags)` - Create markdown notes |
| 71 | +- `add_task(task, priority, due_date)` - Add tasks |
| 72 | +- `complete_task(task_id)` - Mark tasks complete |
| 73 | +- `search_files(query, directory)` - Search file contents |
| 74 | +- `fetch_url_content(url, max_length)` - Download web content |
| 75 | + |
| 76 | +## Available Prompts |
| 77 | + |
| 78 | +- `analyze_file_structure(directory)` - Generate project analysis |
| 79 | +- `code_review_request(file_path, focus_area)` - Create code reviews |
| 80 | +- `task_prioritization(context)` - Organize and prioritize work |
| 81 | + |
| 82 | +## Dependencies |
| 83 | + |
| 84 | +Optional enhanced functionality: |
| 85 | + |
| 86 | +```bash |
| 87 | +pip install psutil # Enhanced system monitoring |
| 88 | +``` |
| 89 | + |
| 90 | +## Implementation Examples |
| 91 | + |
| 92 | +### Development Workflow |
| 93 | +"Analyze my projects directory and help prioritize work based on recent activity" |
| 94 | + |
| 95 | +### Project Analysis |
| 96 | +"Review my web-app project structure and suggest improvements" |
| 97 | + |
| 98 | +### Meeting Notes |
| 99 | +"Create a note about today's architecture review with key decisions" |
| 100 | + |
| 101 | +### Code Search |
| 102 | +"Find all files mentioning 'authentication' and summarize approaches" |
| 103 | + |
| 104 | +### Task Management |
| 105 | +"Add high-priority task to refactor user service, due Friday" |
| 106 | + |
| 107 | +## Integration Benefits |
| 108 | + |
| 109 | +Connecting AI assistants to your development environment enables: |
| 110 | +- Native file system browsing |
| 111 | +- Context-aware project conversations |
| 112 | +- Personalized code suggestions |
| 113 | +- Real-time task management |
| 114 | +- Workspace-specific code reviews |
| 115 | + |
| 116 | +## Advanced Features |
| 117 | + |
| 118 | +The MCP implementation includes: |
| 119 | +- URI templates with parameter extraction |
| 120 | +- Auto-generated schemas from type hints |
| 121 | +- Async/sync operation handlers |
| 122 | +- MCP-compliant error handling |
| 123 | +- Type-safe parameter passing |
| 124 | + |
| 125 | +Extend easily with custom resources, tools, and prompts for your specific workflow. |
0 commit comments