Frago - AI-driven multi-runtime automation framework with Chrome CDP, Python, and Shell support
Project description
Frago - Multi-Runtime Automation Infrastructure
Multi-runtime automation infrastructure designed for AI agents, providing persistent context management and reusable Recipe system.
Docs: Installation · User Guide · Recipes · Architecture · Use Cases · Development
What Problems Does Frago Solve
AI agents face three core pain points when executing automation tasks:
1. No Working Memory
Every task starts from scratch, unable to remember previous work:
- Repeated reasoning of same operation flows (browser DOM structure, system commands, API calls)
- Validated scripts and methods cannot accumulate
- Similar tasks require re-exploration, wasting tokens and time
2. Tool Discovery Difficulty
Unaware of available automation capabilities:
- No standardized tool catalog and capability descriptions
- Validated automation scripts scattered in conversation history
- AI cannot automatically discover and invoke existing tools
3. Requires Continuous Manual Intervention
Unable to autonomously complete complex multi-step tasks:
- Lack of task context management, difficult to handle interruptions and recovery
- Lack of standardized execution logs, unable to trace and audit
- Complex tasks require continuous human participation in every step
Solutions
Frago provides three core systems to solve the above problems:
🧠 Run System - AI's Working Memory
Persistent task context, recording complete exploration process:
# Create task instance
uv run frago run init "Research YouTube subtitle extraction methods"
# All subsequent operations automatically link to this instance
uv run frago navigate https://youtube.com/watch?v=...
uv run frago screenshot step1.png
uv run frago run log --step "Locate subtitle button" --data '{"selector": "..."}'
# Persistent storage
projects/youtube-transcript-research/
├── logs/execution.jsonl # Structured logs
├── screenshots/ # Screenshot archive
├── scripts/ # Validated scripts
└── outputs/ # Output files
Value: Avoid repeated exploration, accumulate auditable execution history.
📚 Recipe System - AI's "Muscle Memory"
Metadata-driven reusable automation scripts, AI can automatically discover and use:
# examples/atomic/chrome/youtube_extract_video_transcript.md
---
name: youtube_extract_video_transcript
type: atomic
runtime: chrome-js
description: "Extract complete transcript text from YouTube videos"
use_cases:
- "Batch extract video subtitle content for text analysis"
- "Create indexes or summaries for videos"
output_targets: [stdout, file]
---
# AI discovers available Recipes
uv run frago recipe list --format json
# Execute Recipe
uv run frago recipe run youtube_extract_video_transcript \
--params '{"url": "..."}' \
--output-file transcript.txt
# Use environment variables
uv run frago recipe run openai_chat \
--params '{"prompt": "Hello"}' \
-e OPENAI_API_KEY=sk-xxx
Value: Solidify high-frequency operations, avoid repeated AI reasoning, support three-tier priority management (Project > User > Example) and environment variable configuration.
⚡ Native CDP - Lightweight Execution Engine
Direct connection to Chrome DevTools Protocol, no Playwright/Selenium dependencies:
# Navigate
uv run frago navigate https://github.com
# Click element
uv run frago click 'button[type="submit"]'
# Execute JavaScript
uv run frago exec-js 'document.title' --return-value
# Screenshot
uv run frago screenshot output.png
Architecture Comparison:
Playwright: Python → Node.js relay → CDP → Chrome (~100MB)
Frago: Python → CDP → Chrome (~2MB)
Value: Lightweight deployment, persistent browser sessions, direct connection without relay latency.
Core Features
| Feature | Description |
|---|---|
| 🧠 Run Command System | Topic-based task management, persistent context and JSONL logs |
| 📚 Recipe Metadata | Reusable scripts, AI-discoverable, three-tier priority support |
| 🔐 Environment Variables | Three-level config priority, Workflow context sharing |
| ⚡ Native CDP | ~2MB lightweight, direct Chrome connection, no Node.js deps |
| 🔄 Multi-Runtime | Chrome JS, Python, Shell three runtime support |
| 📊 Structured Logs | JSONL format, 100% programmatically parseable and auditable |
| 🤖 AI-Driven Tasks | Claude Code slash command integration (/frago.run) |
Quick Start
Installation
# Basic installation (core features)
pip install frago-cli
# Or use uv (recommended)
uv tool install frago-cli
# Initialize environment (check dependencies, configure auth, install resources)
frago init
What frago init Does
The init command sets up your environment in one step:
- Checks dependencies: Node.js ≥18.0.0, Claude Code CLI
- Auto-installs missing deps: Node.js via nvm, Claude Code via npm
- Configures authentication: Default (Claude Code built-in) or custom API endpoint (DeepSeek, Aliyun, Kimi, MiniMax)
- Installs resources: Slash commands to
~/.claude/commands/, example recipes to~/.frago/recipes/
# View current config and resources
frago init --show-config
# Reset and re-initialize
frago init --reset
See Installation Guide for details
Basic Usage
1. Create and Manage Run Instances
# Create task instance
uv run frago run init "Search for Python jobs on Upwork"
# Set current working context
uv run frago run set-context <run_id>
# Execute operations and log
uv run frago navigate https://upwork.com/search
uv run frago run log \
--step "Navigate to search page" \
--status "success" \
--action-type "navigation" \
--execution-method "command"
# View instance details
uv run frago run info <run_id>
2. Use Recipes
# List available Recipes
uv run frago recipe list
# View Recipe details
uv run frago recipe info youtube_extract_video_transcript
# Execute Recipe
uv run frago recipe run youtube_extract_video_transcript \
--params '{"url": "https://youtube.com/watch?v=..."}' \
--output-file transcript.txt
3. Claude Code Integration (AI-Driven Tasks)
Use slash commands in Claude Code:
/frago.run Search for Python jobs on Upwork and analyze skill requirements
AI will automatically:
- Discover or create Run instance
- Invoke CDP commands and Recipes
- Log all operations to structured logs
- Generate execution reports and output files
Comparison with Other Tools
Frago vs Playwright/Selenium
| Dimension | Playwright/Selenium | Frago |
|---|---|---|
| Design Goal | Test automation framework | AI-driven multi-runtime automation infra |
| Core Scenarios | E2E testing, UI testing | Data collection, workflow orchestration, AI |
| Browser Management | Complete lifecycle (launch→test→close) | Connect to existing CDP instance (persistent) |
| Deployment Size | ~100MB + Node.js | ~2MB (pure Python WebSocket) |
| Architecture | Double RPC (Python→Node.js→Browser) | Direct CDP (Python→Browser) |
| Knowledge Base | None | Recipe metadata-driven system |
Use Case Selection:
- Need quality assurance, regression testing → Playwright/Selenium
- Need data collection, AI automation, knowledge accumulation → Frago
See Architecture Comparison for details
Documentation Navigation
- Use Cases - Complete workflow from Recipe creation to Workflow orchestration
- Architecture - Core differences, technology choices, system design
- Installation - Installation methods, dependencies, optional features
- User Guide - CDP commands, Recipe management, Run system
- Recipe System - AI-First design, metadata-driven, Workflow orchestration
- Development - Project structure, development standards, testing methods
- Roadmap - Completed features, todos, version planning
Project Status
📍 Current Stage: Run command system completed, multi-runtime automation infrastructure ready
Completed (Feature 005):
- ✅ Run command system - Topic-based task management and context accumulation
- ✅ Structured logs - JSONL format execution records
- ✅ AI-driven task execution -
/frago.runslash command integration - ✅ Run instance auto-discovery - RapidFuzz-based fuzzy matching
- ✅ Complete test coverage - unit tests, integration tests, contract tests
Core Infrastructure:
- ✅ Native CDP protocol layer (direct Chrome control)
- ✅ Recipe metadata-driven architecture (multi-runtime support)
- ✅ CLI tools and command system
- ✅ Three-tier Recipe management system
See Roadmap and Run Command System Spec for details
License
MIT License - see LICENSE file
Author
Jamey Tsai - caijia@frago.ai
Project founder and primary maintainer
Contributing
Issues and Pull Requests are welcome!
- Project issues: Submit Issue
- Technical discussion: Discussions
Created with Claude Code | 2025-11
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file frago_cli-0.2.0.tar.gz.
File metadata
- Download URL: frago_cli-0.2.0.tar.gz
- Upload date:
- Size: 893.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3fd0db983b865c22ff6a0630d32fb538dafd0a7129635d0d576ea7f0fea24cd
|
|
| MD5 |
83ef7907747570c63eb48d640834ad86
|
|
| BLAKE2b-256 |
7d1fbee8d00827098b40521a94b4a58313059d4e00a2c42bebad21235fc80b93
|
File details
Details for the file frago_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: frago_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 226.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bedf75f7d912141e7ba464537b41ac117391df6c8bec3f998834685d02fa595
|
|
| MD5 |
c05539119f9f7aa845e8966ebcbd5c90
|
|
| BLAKE2b-256 |
fa8f34798985baff3fd58c0374835e2989b7f53e7f35ef0abd23508b442ae0c5
|