|
| 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 | +## Use Cases |
| 35 | + |
| 36 | +### File Management |
| 37 | +Access and organize files across your development workspace: |
| 38 | +- Browse directory structures |
| 39 | +- Search file contents |
| 40 | +- Read and analyze code files |
| 41 | + |
| 42 | +### Note Taking |
| 43 | +Create and manage markdown notes: |
| 44 | +- Meeting notes with timestamps |
| 45 | +- Project documentation |
| 46 | +- Code review findings |
| 47 | + |
| 48 | +### Task Management |
| 49 | +Track development tasks: |
| 50 | +- Add tasks with priorities and due dates |
| 51 | +- Mark tasks as complete |
| 52 | +- View task lists and status |
| 53 | + |
| 54 | +## Configuration |
| 55 | + |
| 56 | +The assistant creates the following structure: |
| 57 | + |
| 58 | +``` |
| 59 | +~/Documents/ |
| 60 | +├── notes/ # Markdown notes |
| 61 | +└── tasks.json # Task list |
| 62 | +
|
| 63 | +~/projects/ # Development projects |
| 64 | +├── project1/ |
| 65 | +└── project2/ |
| 66 | +``` |
| 67 | + |
| 68 | +## Security |
| 69 | + |
| 70 | +- File access restricted to home directory |
| 71 | +- Safe mathematical expression evaluation |
| 72 | +- Path validation for all file operations |
| 73 | +- Read-only git operations |
| 74 | + |
| 75 | +## Available Resources |
| 76 | + |
| 77 | +### File System |
| 78 | +- `fs://{path}` - Read files in home directory |
| 79 | +- `fs://dir/{path}` - List directory contents |
| 80 | + |
| 81 | +### Git Integration |
| 82 | +- `git://repo/{repo_name}` - Repository status and commits |
| 83 | + |
| 84 | +### System Monitoring |
| 85 | +- `system://processes` - Running processes |
| 86 | +- `system://stats` - System statistics |
| 87 | + |
| 88 | +## Available Tools |
| 89 | + |
| 90 | +- `create_note(title, content, tags)` - Create markdown notes |
| 91 | +- `add_task(task, priority, due_date)` - Add tasks |
| 92 | +- `complete_task(task_id)` - Mark tasks complete |
| 93 | +- `search_files(query, directory)` - Search file contents |
| 94 | +- `fetch_url_content(url, max_length)` - Download web content |
| 95 | + |
| 96 | +## Available Prompts |
| 97 | + |
| 98 | +- `analyze_file_structure(directory)` - Generate project analysis |
| 99 | +- `code_review_request(file_path, focus_area)` - Create code reviews |
| 100 | +- `task_prioritization(context)` - Organize and prioritize work |
| 101 | + |
| 102 | +## Dependencies |
| 103 | + |
| 104 | +Optional enhanced functionality: |
| 105 | + |
| 106 | +```bash |
| 107 | +pip install psutil # Enhanced system monitoring |
| 108 | +``` |
| 109 | + |
| 110 | +## Implementation Examples |
| 111 | + |
| 112 | +### Development Workflow |
| 113 | +"Analyze my projects directory and help prioritize work based on recent activity" |
| 114 | + |
| 115 | +### Project Analysis |
| 116 | +"Review my web-app project structure and suggest improvements" |
| 117 | + |
| 118 | +### Meeting Notes |
| 119 | +"Create a note about today's architecture review with key decisions" |
| 120 | + |
| 121 | +### Code Search |
| 122 | +"Find all files mentioning 'authentication' and summarize approaches" |
| 123 | + |
| 124 | +### Task Management |
| 125 | +"Add high-priority task to refactor user service, due Friday" |
| 126 | + |
| 127 | +## Integration Benefits |
| 128 | + |
| 129 | +Connecting AI assistants to your development environment enables: |
| 130 | +- Native file system browsing |
| 131 | +- Context-aware project conversations |
| 132 | +- Personalized code suggestions |
| 133 | +- Real-time task management |
| 134 | +- Workspace-specific code reviews |
| 135 | + |
| 136 | +## Advanced Features |
| 137 | + |
| 138 | +The MCP implementation includes: |
| 139 | +- URI templates with parameter extraction |
| 140 | +- Auto-generated schemas from type hints |
| 141 | +- Async/sync operation handlers |
| 142 | +- MCP-compliant error handling |
| 143 | +- Type-safe parameter passing |
| 144 | + |
| 145 | +Extend easily with custom resources, tools, and prompts for your specific workflow. |
0 commit comments