FastClaw is a lightweight Python AI Agent assistant built on the FastMind framework. This guide will take you from zero to hero in 5 minutes, covering installation, configuration, and your first task.
Prerequisites
- Python 3.10+
- pip package manager
- An OpenAI-compatible API Key (DeepSeek recommended)
Step 1: Install FastClaw
Method 1: Clone from GitHub (Recommended)
# Clone the project
git clone https://github.com/kandada/fastclaw.git
cd fastclaw
# Create virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# or .venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
Method 2: Quick Install Script
# One-line installation script
curl -sSL https://raw.githubusercontent.com/kandada/fastclaw/main/install.sh | bash
Step 2: Configure LLM API
FastClaw supports all OpenAI-compatible APIs. We'll use DeepSeek as an example:
Get API Key
- Visit DeepSeek website
- Register and log in
- Create a new API Key in the API Keys page
Configure FastClaw
Edit the configuration file:
vim workspace/data/agents/main_agent/metadata.json
Modify the content to:
{
"llm": {
"api_key": "your_deepseek_api_key_here",
"base_url": "https://api.deepseek.com/v1",
"model": "deepseek-chat"
}
}
Other Supported LLMs
FastClaw supports all OpenAI-compatible interfaces:
-
Kimi:
base_url: "https://api.moonshot.cn/v1",model: "kimi-k2.5" -
Minimax:
base_url: "https://api.minimax.chat/v1",model: "MiniMax-M2.7" -
OpenAI:
base_url: "https://api.openai.com/v1",model: "gpt-5.4" - Local models: Any locally deployed model supporting OpenAI format
Step 3: Start FastClaw
Start Web Service
# Start service (default port 8765)
python main.py start
# Or run in background
nohup python main.py start > fastclaw.log 2>&1 &
Verify Service
# Check service status
curl http://localhost:8765/health
# View logs
tail -f fastclaw.log
After service starts, open http://localhost:8765 to access the Web UI.
Step 4: Using Web UI
Interface Overview
FastClaw Web UI has three main tabs:
- Chat: Interactive chat interface
- Cron: Scheduled task management
- Settings: System settings
First Conversation
- Open http://localhost:8765
- Type a message in the Chat page input box
- Press Enter to send, Shift+Enter for new line
Example Conversation:
You: Hello, FastClaw!
FastClaw: Hello! I'm FastClaw, your AI assistant. I can help you execute commands, manage files, and automate tasks. How can I assist you today?
You: Show files in current directory
FastClaw: Executing run_shell("ls -la")
(Shows current directory file list)
Step 5: Basic Functionality Experience
1. File Operations
You: Show README.md file content
FastClaw: Executing run_shell("cat README.md")
You: Create test.txt file in current directory
FastClaw: Executing run_shell("echo 'Test content' > test.txt")
2. System Information
You: Check system memory usage
FastClaw: Executing run_shell("free -h")
You: Check disk space
FastClaw: Executing run_shell("df -h")
3. Network Requests
You: Get current time
FastClaw: Executing run_shell("date")
You: Query weather (requires network)
FastClaw: Executing run_shell("curl wttr.in/London?format=3")
Step 6: Using Skills System
View Available Skills
You: What skills are available?
FastClaw: Executing run_skills("__list__")
Use Built-in Skills
You: Get current time
FastClaw: Executing run_skills("current_time")
You: Send Feishu message
FastClaw: Executing run_skills("feishu", {"message": "Test message"})
Step 7: Create Scheduled Tasks
Create via Web UI
- Switch to Cron tab
- Click "New Task"
- Fill task information:
- Name: Daily Report
- Cron Expression:
0 9 * * *(9 AM daily) - Agent: main_agent
- Command: Generate today's work report
- Click Save
Create via Configuration File
Edit workspace/data/cron/tasks.json:
{
"tasks": [
{
"name": "Daily Report",
"cron": "0 9 * * *",
"agent": "main_agent",
"session_id": "daily_report",
"command": "Generate today's work report and save to file",
"enabled": true
}
]
}
Cron Expression Examples
| Expression | Meaning |
|---|---|
*/5 * * * * |
Every 5 minutes |
0 * * * * |
Every hour |
0 9 * * * |
Daily at 9 AM |
0 9 * * 1-5 |
Weekdays at 9 AM |
0 9,18 * * * |
Daily at 9 AM and 6 PM |
Step 8: Advanced Features Exploration
1. Session Management
# List all sessions
python main.py session list
# Export session history
python main.py session export default
2. Command Line Interface
# Start CLI interaction
python main.py chat
# New session
python main.py chat --new
# Specific session
python main.py chat --session-id my_session
3. Skill Development
Create custom skills:
# Create skill directory
mkdir -p workspace/skills/user/my_skill
# Create skill description
cat > workspace/skills/user/my_skill/SKILL.md << EOF
# My Skill
## Description
My custom skill example
## Parameters
- param1: Parameter 1 description
- param2: Parameter 2 description
EOF
# Create skill implementation
cat > workspace/skills/user/my_skill/main.py << EOF
async def execute(param1: str = "", param2: str = "") -> str:
return f"Skill executed with params: {param1}, {param2}"
EOF
Step 9: Troubleshooting
Common Issues
1. Service Startup Failure
# Check port usage
lsof -i:8765
# Check dependencies
pip list | grep fastmind
# View detailed logs
python main.py start --verbose
2. API Connection Failure
- Check if API Key is correct
- Check network connection
- Try other LLM providers
3. Permission Issues
# Check file permissions
ls -la workspace/
# Fix permissions
chmod -R 755 workspace/
Debug Mode
# Enable debug logging
export FASTCLAW_LOG_LEVEL=DEBUG
python main.py start
Step 10: Production Deployment
Using systemd (Linux)
# Create service file
sudo cat > /etc/systemd/system/fastclaw.service << EOF
[Unit]
Description=FastClaw AI Assistant
After=network.target
[Service]
Type=simple
User=fastclaw
WorkingDirectory=/opt/fastclaw
ExecStart=/opt/fastclaw/.venv/bin/python main.py start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Start service
sudo systemctl daemon-reload
sudo systemctl enable fastclaw
sudo systemctl start fastclaw
Using Docker
FROM python:3.9-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
EXPOSE 8765
CMD ["python", "main.py", "start"]
Best Practices
1. Security Configuration
- Use environment variables for API Keys
- Limit accessible directories
- Regularly update dependencies
2. Performance Optimization
- Use lightweight LLM models
- Set appropriate context length
- Enable automatic context unloading
3. Backup Strategy
# Backup configuration and data
tar -czf fastclaw_backup_$(date +%Y%m%d).tar.gz workspace/
Next Steps
Learning Resources
- Official Documentation: Project README.md
-
Code Examples: Core implementation in
core/app.py - Community Support: GitHub Issues and Discussions
Advanced Topics
- Custom Agents: Create agents with specific personalities
- Third-party Integrations: Connect to databases, message queues, etc.
- Performance Monitoring: Add monitoring and alerts
- Cluster Deployment: Multi-node high-availability deployment
Contribution Guide
- Report Issues: GitHub Issues
- Submit PRs: Follow code standards
- Write Documentation: Help improve documentation
- Share Use Cases: Share your experience
Summary
Through this tutorial, you have completed:
- ✅ FastClaw installation and configuration
- ✅ LLM API setup
- ✅ Basic functionality usage
- ✅ Scheduled task creation
- ✅ Troubleshooting methods
FastClaw's design philosophy is "simple yet powerful." With minimal configuration and intuitive interface, it makes AI Agent technology accessible to everyone. Whether you're a developer, operations engineer, or regular user, you can quickly get started and leverage its value.
Start your AI Agent journey today!
Related Links
- GitHub: https://github.com/kandada/fastclaw
- FastMind Framework: https://github.com/kandada/fastmind
- Issue Reporting: https://github.com/kandada/fastclaw/issues
- Community Discussion: GitHub Discussions
If you encounter any issues during use, feel free to submit Issues on GitHub or participate in community discussions. FastClaw is an open-source project, and your feedback and contributions will help make it better!
Top comments (0)