Skip to content

Commit ad4e1ad

Browse files
committed
feat: ai
1 parent 0a7781d commit ad4e1ad

10 files changed

Lines changed: 1993 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ python --version
131131
- Dependency Injection
132132
- Hot Reloading
133133
- Direct Rust Integration
134+
- **🤖 AI Agent Support** - Built-in agent routing and execution
135+
- **🔌 MCP (Model Context Protocol)** - Connect to AI applications as a server
134136
- Community First and truly FOSS!
135137

136138
## 🗒️ How to contribute

docs_src/src/components/documentation/Navigation.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,18 @@ export const navigation = [
316316
href: '/documentation/en/api_reference/dependency_injection',
317317
title: 'Dependency Injection',
318318
},
319+
{
320+
href: '/documentation/en/api_reference/mcps',
321+
title: 'MCPs',
322+
},
323+
{
324+
href: '/documentation/en/api_reference/ai',
325+
title: 'AI',
326+
},
327+
{
328+
href: '/documentation/en/api_reference/agents',
329+
title: 'AI Agents',
330+
},
319331
],
320332
},
321333
{
@@ -446,6 +458,8 @@ const translations = {
446458
'Direct Rust Usage': 'Direct Rust Usage',
447459
'GraphQL Support': 'GraphQL Support',
448460
'Dependency Injection': 'Dependency Injection',
461+
'AI': 'AI',
462+
'AI Agents': 'AI Agents',
449463
Talks: 'Talks',
450464
Blogs: 'Blogs',
451465
Introduction: 'Introduction',
@@ -488,6 +502,8 @@ const translations = {
488502
'Direct Rust Usage': '直接使用 Rust',
489503
'GraphQL Support': 'GraphQL 支持',
490504
'Dependency Injection': '依赖注入',
505+
'AI': 'AI',
506+
'AI Agents': 'AI 代理',
491507
'Talks': '演讲',
492508
'Blogs': '博客',
493509
'Introduction': '引入',
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
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

Comments
 (0)