能力标签
cuga-agent MCP工具
🛠
AI工具

cuga-agent MCP工具

基于 Python · 开源 AI 工具,GitHub 社区精选
英文名:cuga-agent
⭐ 734 Stars 🍴 131 Forks 💻 Python 📄 NOASSERTION 🏷 AI 8.2分
8.2AI 综合评分
MCP协议企业智能体代码生成计算机操作安全护栏
✦ AI Skill Hub 推荐

cuga-agent MCP工具 是 AI Skill Hub 本期精选AI工具之一。综合评分 8.2 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析
cuga-agent MCP工具 是一款基于 Python 的开源工具,在 GitHub 上收获 1k+ Star,是MCP协议、企业智能体、代码生成、计算机操作领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
cuga-agent MCP工具 依赖 Python 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 Python 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 cuga-agent MCP工具 的版本更新,及时通知重要功能变化。
📋 工具概览

cuga-agent MCP工具 是一款基于 Python 开发的开源工具,专注于 MCP协议、企业智能体、代码生成 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 734
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
正常维护,社区驱动
开源协议
NOASSERTION
AI 综合评分
8.2 分
工具类型
AI工具
Forks
131
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

cuga-agent MCP工具 是一款基于 Python 开发的开源工具,专注于 MCP协议、企业智能体、代码生成 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:pip 安装(推荐)
pip install cuga-agent

# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install cuga-agent

# 方式三:从源码安装(获取最新功能)
git clone https://github.com/cuga-project/cuga-agent
cd cuga-agent
pip install -e .

# 验证安装
python -c "import cuga_agent; print('安装成功')"
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
cuga-agent --help

# 基本用法
cuga-agent input_file -o output_file

# Python 代码中调用
import cuga_agent

# 示例
result = cuga_agent.process("input")
print(result)
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# cuga-agent 配置文件示例(config.yml)
app:
  name: "cuga-agent"
  debug: false
  log_level: "INFO"

# 运行时指定配置文件
cuga-agent --config config.yml

# 或通过环境变量配置
export CUGA_AGENT_API_KEY="your-key"
export CUGA_AGENT_OUTPUT_DIR="./output"
📑 README 深度解析 真实文档 完整度 87/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<picture> <source media="(prefers-color-scheme: dark)" srcset="/docs/images/cuga-dark.png"> <source media="(prefers-color-scheme: light)" srcset="/docs/images/cuga-light.png"> <img alt="CUGA" src="/docs/images/cuga-dark.png"> </picture>

**Tool Types Overview**

Tool TypeBest ForConfigurationRuntime Loading
**OpenAPI**REST APIs, existing servicesmcp_servers.yamlBuild
**MCP**Custom protocols, complex integrationsmcp_servers.yamlBuild
**LangChain**Python functions, rapid prototypingDirect importRuntime

Key Features & Capabilities

  • High-performing generalist agent — Benchmarked on complex web and API tasks. Combines best-of-breed agentic patterns (e.g. planner-executor, code-act) with structured planning and smart variable management to prevent hallucination and handle complexity
  • Flexible agent and tool integration — Seamlessly integrate tools via OpenAPI specs, MCP servers, and Langchain, enabling rapid connection to REST APIs, custom protocols, and Python functions
  • Integrates with Langflow — Low-code visual build experience for designing and deploying agent workflows without extensive coding
  • Open-source and composable — Built with modularity in mind, CUGA itself can be exposed as a tool to other agents, enabling nested reasoning and multi-agent collaboration. Evolving toward enterprise-grade reliability
  • Policy System — Configure agent behavior with 5 policy types (Intent Guard, Playbook, Tool Approval, Tool Guide, Output Formatter) via the Python SDK or standalone UI in demo mode. Includes human-in-the-loop approval gates for safe agent behavior in enterprise contexts. See SDK Docs and Policies Guide
  • Save-and-reuse capabilities (Experimental) — Capture and reuse successful execution paths (plans, code, and trajectories) for faster and consistent behavior across repeated tasks
  • Agent skills — Package domain workflows as SKILL.md files with frontmatter; the agent discovers them and loads full instructions on demand via the load_skill tool (see Agent skills)
  • Knowledge engine — Built-in RAG over your documents: ingest PDFs, Office files, HTML, Markdown, and images through Docling, then search and reason over them via auto-injected knowledge tools. Documents can be scoped to agent-level (permanent, shared across conversations) or session-level (per-thread, isolated to a single conversation) — so long-lived reference material and ephemeral per-user uploads can coexist (see Knowledge Base)

Key Features

  • Simple API: CugaAgent(tools=[...])await agent.invoke(message)
  • Streaming: Monitor execution in real-time with agent.stream()
  • State Isolation: Per-user sessions with thread_id
  • LangGraph Integration: Access underlying graph for advanced use cases
  • Flexible Tools: Direct tools or custom tool providers
  • Policy System: Comprehensive policy framework with 5 types:
  • Intent Guard: Block or modify specific user intents
  • Playbook: Step-by-step guidance for complex workflows
  • Tool Approval: Require human approval before executing tools
  • Tool Guide: Enhance tool descriptions with additional context
  • Output Formatter: Format agent responses based on triggers

Documentation: SDK Guide | Policies Guide

Supervisor features

  • Delegation: Supervisor hands work to sub-agents and can pass variables between them when needed.
  • Internal + external: Combine local CugaAgent instances with external agents via A2A, task-only or variables in metadata if enabled.
  • Variable passing: Use variables=["var_name"] to pass previous agent outputs or context to the next agent (for internal agents, or A2A when pass_variables_a2a is enabled in settings).
  • Agent cards: For A2A agents, capabilities and description are taken from the agent card and shown in the supervisor prompt.

You can also load agents from YAML with CugaSupervisor.from_yaml("path/to/config.yaml"). Enable the supervisor in settings.toml under [supervisor] when using the server.

---

2. Install dependencies

uv sync

Prerequisites:

1. Get an E2B API key: - Sign up at e2b.dev - Create an API key from your dashboard

2. Set up the E2B template:

   # Install E2B CLI
   npm install -g @e2b/cli

   # Login with your API key
   e2b auth login

   # Create a template (one-time setup)
   # This creates a 'cuga-langchain' template that CUGA uses
   e2b template build --name cuga-langchain
   

3. Install E2B dependencies:

   uv sync --group e2b
   

4. Configure environment: Add to your .env file:

   E2B_API_KEY=your-e2b-api-key-here
   

Start with a generalist. Customize for your domain. Deploy faster!

Building a domain-specific enterprise agent from scratch is complex and requires significant effort: agent and tool orchestration, planning logic, safety and alignment policies, evaluation for performance/cost tradeoffs and ongoing improvements. CUGA is a state-of-the-art generalist agent designed with enterprise needs in mind, so you can focus on configuring your domain tools, policies and workflow.

---

🦉🤗 Try CUGA Live on Hugging Face Spaces

Python CugaAgent SDK [Status]() Documentation Discord

AppWorld WebArena

</div>

---

Why CUGA? — A generalist agent harness for the enterprise: wire your APIs and MCP servers, tune reasoning and task modes, and govern behavior with policies—without rebuilding orchestration from scratch. | Feature | How | |---------|-----| | MCP, OpenAPI & LangChain tools | mcp_servers.yaml · CugaAgent(tools=[...]) | | Reasoning modes (fast / balanced / accurate) | [features] cuga_mode in settings.toml · configurations/modes/ | | Hybrid API + browser tasks | [advanced_features] mode = 'hybrid' · Playwright + browser extension | | Multi-agent (CugaSupervisor) | cuga start demo_supervisor · [supervisor] in settings.toml | | A2A & remote agents | External agent entries in supervisor config · CugaSupervisor | | Policies & HITL | Policies SDK — Intent Guard, Playbook, Tool Approval, Tool Guide, Output Formatter | | Manage & publish | cuga start manager · draft tools, MCP, LLM, and policies in the web UI, then publish a versioned config for production chat (details) | | Reflection | [advanced_features] reflection_enabled in settings.toml | | Langflow | Low-code visual workflows — integrates with CUGA (langflow.org) | | Memory (optional) | enable_memory in settings.toml · uv sync --extra memory · cuga start memory | | Knowledge (RAG) | enable_knowledge=True (default) · ingest PDFs/Office/HTML/Markdown via Docling · agent-level + session-level scopes · cuga start demo_knowledge · details | | Agent skills | SKILL.md under .agents/skills · cuga start demo_skills (sandbox_mode = "native" by default, or opensandbox) · or demo --sandbox with [skills] on · Agent skills | | Self-host on a cluster | Helm chart and deploy scripts in deployment/ · Kubernetes guide (local kind/minikube, or registry push for cloud clusters) | | Save & reuse (experimental)_ | cuga_mode = "save_reuse_fast" in settings.toml | SDK · Policies · Quick Start →

Setup Steps:

  1. Switch to hybrid mode:
   # Edit ./src/cuga/settings.toml and change:
   mode = 'hybrid'  # under [advanced_features] section
   
  1. Install browser API support:
  • Installs playwright browser API and Chromium browser
  • The playwright installer should already be included after installing with Quick Start
   playwright install chromium
   
  1. Start the demo:
   cuga start demo
   
  1. Enable the browser extension:
  • Click the extension puzzle icon in your browser
  • Toggle the CUGA extension to activate it
  • This will open the CUGA side panel
  1. Open the test application:

6. Try the hybrid task:

   get top account by revenue from digital sales then add it to current page
   

What you'll see: CUGA will fetch data from the Digital Sales API and then interact with the web page to add the account information directly to the current page - demonstrating seamless API-to-web workflow integration!

</details>

Setup Steps:

  1. Enable HITL mode:
   # Edit ./src/cuga/settings.toml and ensure:
   api_planner_hitl = true  # under [advanced_features] section
   
  1. Start the demo:
   cuga start demo
   

3. Try the HITL task:

   get best accounts
   

What you'll see: CUGA will pause at critical decision points, showing you the planned actions and waiting for your approval before proceeding.

</details>

Setup Steps:

1. Choose how Evolve will be started. Recommended for normal CUGA usage: let the CUGA MCP registry launch Evolve for you. In the manager UI, add an MCP tool with: - Name: evolve - Connection type: Command (stdio) - Command: uvx - Args: --from altk-evolve --with setuptools<70 evolve-mcp Important: this command starts Evolve in stdio mode through the upstream Evolve package. It is intended to be launched by the CUGA registry, not run manually in a separate terminal. Alternative for standalone/manual debugging: run Evolve yourself as an SSE server: If you run Evolve from a checked-out altk-evolve repo instead of uvx, install the Postgres extras first with uv sync --extra pgvector. 2. Add these environment values in the MCP tool UI:

EVOLVE_BACKEND=postgres
EVOLVE_PG_HOST=localhost
EVOLVE_PG_PORT=5432
EVOLVE_PG_USER=postgres
EVOLVE_PG_PASSWORD=postgres
EVOLVE_PG_DBNAME=evolve
EVOLVE_MODEL_NAME=Azure/gpt-4o
OPENAI_API_KEY=env://OPENAI_API_KEY
OPENAI_BASE_URL=env://OPENAI_BASE_URL

Each env://... value tells CUGA to read the real secret or setting from its own process environment at runtime, so make sure PostgreSQL is reachable, pgvector is available, and the configured OpenAI/LiteLLM-compatible model is one your gateway is allowed to use.

  1. [Optional] Edit ./src/cuga/settings.toml and enable lite mode plus Evolve:
[advanced_features]
lite_mode = true

[evolve]
enabled = true
url = "http://127.0.0.1:8201/sse"
mode = "auto"
app_name = "evolve"
lite_mode_only = true
save_on_success = true
save_on_failure = true
async_save = true
timeout = 30.0

If you use the recommended registry-managed setup above, keep mode = "auto" or set mode = "registry".

If you run Evolve manually as a standalone SSE server, keep url = "http://127.0.0.1:8201/sse" and set mode = "direct" if you want to skip registry lookup entirely.

If you use Evolve tip generation, make sure the environment for the Evolve MCP server includes the required Evolve model settings. Otherwise save_trajectory may fail later with a LiteLLM/OpenAI model access error even when the MCP connection itself works.

  1. Start the same CRM demo with sample workspace files:
cuga start demo_crm --sample-memory-data
  1. Run a task that routes through CugaLite, for example:
Identify the common cities between my cuga_workspace/cities.txt and cuga_workspace/company.txt

Setup

• Change ./src/cuga/settings.toml: cuga_mode = "save_reuse_fast" • Run: cuga start demo

Quick Start

<details> <summary><em style="color: #666;"> Prerequisites (click to expand)</em></summary>

</details>

```bash

agent execution trajectories, decision-making, and tool usage

```

<details> <summary> LLM Configuration - Advanced Options</summary>

---

Refer to: .env.example for detailed examples.

CUGA supports multiple LLM providers with flexible configuration options. You can configure models through TOML files or override specific settings using environment variables.

Quick Start

```python from cuga import CugaAgent from langchain_core.tools import tool import asyncio

@tool def add_numbers(a: int, b: int) -> int: '''Add two numbers together''' return a + b

@tool def multiply_numbers(a: int, b: int) -> int: '''Multiply two numbers together''' return a * b

Quick Start

from cuga import CugaAgent, CugaSupervisor
from langchain_core.tools import tool
import asyncio

@tool
def get_customers(limit: int = 10) -> str:
    """Fetch top customers from CRM with name, email, and revenue. Returns a formatted string."""
    customers = [
        "Alice (alice@example.com, $250,000)",
        "Bob (bob@example.com, $180,000)",
        "Carol (carol@example.com, $120,000)",
        "Dave (dave@example.com, $95,000)",
        "Eve (eve@example.com, $88,000)",
    ]
    top = customers[: min(limit, len(customers))]
    return "Top customers by revenue: " + "; ".join(f"{i+1}. {c}" for i, c in enumerate(top))

@tool
def send_email(to: str, body: str) -> str:
    """Send an email. Returns confirmation."""
    return f"Email sent successfully to {to}"

async def main():
    crm_agent = CugaAgent(tools=[get_customers])
    crm_agent.description = "CRM and customer data"

    email_agent = CugaAgent(tools=[send_email])
    email_agent.description = "Sending emails and notifications"

    supervisor = CugaSupervisor(agents={
        "crm": crm_agent,
        "email": email_agent,
    })

    result = await supervisor.invoke("Get our top 5 customers by revenue, then send the top customer a thank-you email")
    print(result.answer)

asyncio.run(main())

To add a remote agent via A2A, pass an external config in agents: "analytics": {"type": "external", "description": "...", "config": {"a2a_protocol": {"endpoint": "http://localhost:9999", "transport": "http"}}}.

Advanced Usage

<details> <summary><b> Save & Reuse</b></summary>

4. Start the demo

cuga start demo_crm --read-only

Demo Steps

First run: get top account by revenue

  • This is a new flow (first time)
  • Wait for task to finish
  • Approve to save the workflow
  • Provide another example to help generalization of flow e.g. get top 2 accounts by revenue

Flow now will be saved:

  • May take some time
  • Flow will be successfully saved

Verify reuse: get top 4 accounts by revenue

  • Should run faster using saved workflow

</details>

<details> <summary><b> Adding Tools: Comprehensive Examples</b></summary>

CUGA supports three types of tool integrations. Each approach has its own use cases and benefits:

CUGA: Configurable Generalist Agent — Agent Harness for the Enterprise

1. Create and activate virtual environment

uv venv --python=3.12 && source .venv/bin/activate

3. Set up environment variables

Create .env file with your API keys

echo "OPENAI_API_KEY=your-openai-api-key-here" > .env

5. View agent trajectories (optional)

cuga viz

Configuration Priority

  1. Environment Variables (highest priority)
  2. TOML Configuration (medium priority)
  3. Default Values (lowest priority)

Option 1: OpenAI

Setup Instructions:

1. Create an account at platform.openai.com 2. Generate an API key from your API keys page 3. Add to your .env file:

   # OpenAI Configuration
   OPENAI_API_KEY=sk-...your-key-here...
   AGENT_SETTING_CONFIG="settings.openai.toml"

   # Optional overrides
   MODEL_NAME=gpt-4o                    # Override model name
   OPENAI_BASE_URL=https://api.openai.com/v1  # Override base URL
   OPENAI_API_VERSION=2024-08-06        # Override API version
   

Default Values:

  • Model: gpt-4o
  • API Version: OpenAI's default API Version
  • Base URL: OpenAI's default endpoint

Option 2: IBM WatsonX

Setup Instructions:

1. Access IBM WatsonX 2. Create a project or space and get your credentials: - Project ID or Space ID - API Key - Region/URL 3. Add to your .env file:

   # WatsonX Configuration
   WATSONX_API_KEY=your-watsonx-api-key
   WATSONX_PROJECT_ID=your-project-id
   # WATSONX_SPACE_ID=your-space-id  # Alternative to WATSONX_PROJECT_ID
   WATSONX_URL=https://us-south.ml.cloud.ibm.com  # or your region
   AGENT_SETTING_CONFIG="settings.watsonx.toml"

   # Optional override
   MODEL_NAME=meta-llama/llama-4-maverick-17b-128e-instruct-fp8  # Override model for all agents
   

Default Values:

  • Model: meta-llama/llama-4-maverick-17b-128e-instruct-fp8

Option 3: Azure OpenAI

Setup Instructions:

1. Add to your .env file:

    AGENT_SETTING_CONFIG="settings.azure.toml"  # Default config uses ETE
    AZURE_OPENAI_API_KEY="<your azure apikey>"
    AZURE_OPENAI_ENDPOINT="<your azure endpoint>"
    OPENAI_API_VERSION="2024-08-01-preview"
   

Option 4: LiteLLM Support

CUGA supports LiteLLM through the OpenAI configuration by overriding the base URL:

  1. Add to your .env file:
   # LiteLLM Configuration (using OpenAI settings)
   OPENAI_API_KEY=your-api-key
   AGENT_SETTING_CONFIG="settings.openai.toml"

   # Override for LiteLLM
   MODEL_NAME=Azure/gpt-4o              # Override model name
   OPENAI_BASE_URL=https://your-litellm-endpoint.com  # Override base URL
   OPENAI_API_VERSION=2024-08-06        # Override API version
   

Option 5: Groq Support

Setup Instructions:

1. Create an account at groq.com 2. Generate an API key from your API keys page 3. Add to your .env file:

   # Groq Configuration
   GROQ_API_KEY=your-groq-api-key-here
   AGENT_SETTING_CONFIG="settings.groq.toml"
   
   # Optional override
   MODEL_NAME=llama-3.1-70b-versatile  # Override model name
   

Default Values:

  • Model: Configured in settings.groq.toml
  • Base URL: Groq's default endpoint

Option 6: OpenRouter Support

Setup Instructions: 1. Create an account at openrouter.ai 2. Generate an API key from your account settings 3. Add to your .env file:

   # OpenRouter Configuration
   OPENROUTER_API_KEY=your-openrouter-api-key
   AGENT_SETTING_CONFIG="settings.openrouter.toml"
   OPENROUTER_BASE_URL="https://openrouter.ai/api/v1"
    # Optional override
   MODEL_NAME=openai/gpt-4o                    # Override model name
    

Configuration Files

CUGA uses TOML configuration files located in src/cuga/configurations/models/:

  • settings.openai.toml - OpenAI configuration (also supports LiteLLM via base URL override)
  • settings.watsonx.toml - WatsonX configuration
  • settings.azure.toml - Azure OpenAI configuration
  • settings.groq.toml - Groq configuration
  • settings.openrouter.toml - OpenRouter configuration

Each file contains agent-specific model settings that can be overridden by environment variables.

</details>

Tip: Want to use your own tools or add your MCP tools? Check out src/cuga/backend/tools_env/registry/config/mcp_servers.yaml for examples of how to configure custom tools and APIs, including those for digital sales.

</div>

Configurations

<details> <summary> Running with a secure code sandbox</summary>

Cuga supports isolated code execution using Docker/Podman containers for enhanced security.

  1. Install container runtime: Download and install Rancher Desktop or Docker.
  1. Install sandbox dependencies:
   uv sync --group sandbox
   
  1. Start with remote sandbox enabled:
   cuga start demo --sandbox
   

This automatically configures Cuga to use Docker/Podman for code execution instead of local execution.

  1. Test your sandbox setup (optional):
   # Test local sandbox (default)
   cuga test-sandbox

   # Test remote sandbox with Docker/Podman
   cuga test-sandbox --remote
   

You should see the output: ('test succeeded\n', {})

Note: Without the --sandbox flag, Cuga uses local Python execution (default), which is faster but provides less isolation.

</details>

<details> <summary> Running with E2B Cloud Sandbox</summary>

CUGA supports E2B for cloud-based code execution in secure, ephemeral sandboxes. This provides better isolation than local execution while being faster than Docker/Podman containers.

Enable E2B in Settings

Edit ./src/cuga/settings.toml:

[advanced_features]
e2b_sandbox = true
e2b_sandbox_mode = "per-session"  # Options: "per-session" | "single" | "per-call"
e2b_sandbox_ttl = 600  # Cache TTL in seconds (10 minutes)

Configuration

configurations/
├── modes/fast.toml
├── modes/balanced.toml
├── modes/accurate.toml
└── modes/custom.toml

Edit settings.toml:

[features]
cuga_mode = "fast"  # or "balanced" or "accurate" or "custom"

Documentation: ./docs/flags.html

</details>

<details> <summary> Task Mode Configuration - Switch between API/Web/Hybrid modes</summary>

Configuration

Edit ./src/cuga/settings.toml:

[demo_mode]
start_url = "https://opensource-demo.orangehrmlive.com/web/index.php/auth/login"  # Starting URL for hybrid mode


[advanced_features]
mode = 'api'  # 'api', 'web', or 'hybrid'

</details>

<details> <summary>📝 Special Instructions Configuration</summary>

Configuration

configurations/
└── instructions/
    ├── instructions.toml
    ├── default/
    │   ├── answer.md
    │   ├── api_planner.md
    │   ├── code_agent.md
    │   ├── plan_controller.md
    │   ├── reflection.md
    │   ├── shortlister.md
    │   └── task_decomposition.md
    └── [other instruction sets]/

Edit configurations/instructions/instructions.toml:

[instructions]
instruction_set = "default"  # or any instruction set above

</details>

<details> <summary><em style="color: #666;"> 🧠 Optional: Use Evolve with CugaLite</em></summary>

Evolve can now be used with CugaLite to bring task-specific guidance into the prompt before execution and save completed trajectories after the run.

This flow is:

  • Opt-in - disabled by default
  • Non-blocking - Evolve failures do not fail the task
  • CugaLite-focused - enabled for lite mode by default
  • Optional integration - install cuga[evolve] if you want the upstream Evolve package available locally, or let uvx fetch it on demand

Using CUGA as a Python SDK

CUGA can be easily integrated into your Python applications as a library. The SDK provides a clean, minimal API for creating and invoking agents with custom tools.

SDK Documentation: SDK Documentation

API Mode (`mode = 'api'`)

  • Opens tasks in a regular web browser
  • Best for API/Tools-focused workflows and testing

Troubleshooting:

  • Error: "function_call_host not configured": Make sure you've set function_call_host in settings.toml with your ngrok URL
  • Tool execution fails: Verify ngrok is running and the URL in settings.toml matches your ngrok URL
  • Connection timeout: Check that your firewall allows ngrok connections

Benefits of E2B: - No Docker/Podman required - Faster than container-based sandboxing - Cloud-native with automatic scaling - Better isolation than local execution - Supports per-session caching for cost optimization

Note: E2B is a paid service with a free tier. Check e2b.dev/pricing for details.

</details>

<details> <summary> Reasoning modes - Switch between Fast/Balanced/Accurate modes</summary>

🇨🇳 中文文档镜像 AI 翻译 2026-05-25
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

cuga-agent 是一个高性能的通用型 Agent 框架,旨在通过多种工具集成模式处理复杂的 Web 和 API 任务。它支持通过 OpenAPI 规范集成 REST APIs,利用 MCP 协议实现自定义协议或复杂集成,并允许通过 LangChain 直接导入 Python 函数。系统通过结构化规划和智能变量管理,有效防止幻觉并应对复杂逻辑。

⚡ 功能介绍

本项目具备强大的 Agent 能力,结合了 planner-executor 和 code-act 等先进模式,确保在复杂任务中的稳定性。开发者可以通过简洁的 API(如 `CugaAgent.invoke`)快速调用,并支持实时流式输出(Streaming)以监控执行过程。此外,系统提供完善的状态隔离(State Isolation)机制,支持基于 `thread_id` 的多用户会话,并允许通过 LangGraph 访问底层图结构进行深度定制。

📋 环境依赖

在开始之前,请确保您的开发环境已安装 Python 3.12+ 以及 uv 包管理器。此外,由于项目依赖 E2B 沙盒环境进行代码执行,您需要前往 e2b.dev 注册并获取 E2B API key,并通过 E2B CLI 完成登录与模板设置,以确保 Agent 具备安全的运行时环境。

🛠 安装步骤(Docker/pip/源码)

项目推荐使用 `uv sync` 进行依赖安装。若需启用混合模式(hybrid mode)以支持浏览器功能,请修改 `./src/cuga/settings.toml` 中的配置。对于需要浏览器交互的任务,请务必运行 `playwright install chromium` 来安装必要的浏览器 API 支持。您可以从通用 Agent 开始,根据业务领域快速定制并部署企业级应用。

🚀 使用教程

通过 Quick Start 示例,您可以利用 LangChain 的 `@tool` 装饰器轻松定义自定义工具,并将其注入到 `CugaAgent` 中。Agent 会自动解析工具逻辑并进行决策。对于高级用户,可以通过配置 `.env` 文件或 TOML 文件来灵活切换不同的 LLM 提供商,并根据需求覆盖特定的模型参数。

⚙️ 配置说明(含 MCP / env)

CUGA 提供了高度灵活的配置系统。您可以通过 `mcp_servers.yaml` 管理 MCP 服务器,或通过 `settings.toml` 配置高级功能。系统支持通过环境变量覆盖配置文件中的设置,方便在不同环境下快速切换 LLM 配置。对于需要外部通信的场景,请务必正确配置 `function_call_host` 参数。

🔌 API 说明

您可以将 CUGA 作为 Python SDK 集成到现有应用中。SDK 提供了极简的 API 设计,方便开发者创建并调用带有自定义工具的 Agent。在 `mode = 'api'` 模式下,任务将在常规 Web 浏览器中打开,这非常适合以 API 或工具为核心的工作流测试与验证。

❓ FAQ 摘要

常见问题排查:若遇到 "function_call_host not configured" 错误,请检查 `settings.toml` 中的 ngrok URL 是否配置正确;若工具执行失败,请确认 ngrok 服务是否正在运行且 URL 与配置一致;若出现连接超时,请检查防火墙是否允许 ngrok 的通信请求。

🎯 aiskill88 AI 点评 A 级 2026-05-20

活跃度高���企业级智能体框架,MCP集成完整,安全机制健全。开源社区维护良好,生产级可用性强。

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • embedding 模型与查询模型不一致导致检索失效
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • Docker:cuga-agent 提供官方镜像,docker compose up 一键启动
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
cuga-agent 中文教程cuga-agent 安装报错怎么办cuga-agent MCP 配置cuga-agent Docker 部署cuga-agent Agent 工作流cuga-agent 与同类工具对比cuga-agent 最佳实践cuga-agent 适合谁用
⚡ 核心功能
👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • embedding 模型与查询模型不一致导致检索失效
👥 适合人群
AI 技术爱好者研究人员和学生开发者和工程师技术创业者
🎯 使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
⚖️ 优点与不足
✅ 优点
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。

🔗 相关工具推荐
📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
支持计算机使用、代码生成、任务执行等多种MCP工具集成。
💡 AI Skill Hub 点评

经综合评估,cuga-agent MCP工具 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

📚 深入学习 cuga-agent MCP工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 cuga-agent
原始描述 开源MCP工具:CUGA is an open-source generalist agent harness for the enterprise, supporting c。⭐734 · Python
Topics MCP协议企业智能体代码生成计算机操作安全护栏
GitHub https://github.com/cuga-project/cuga-agent
License NOASSERTION
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/cuga-project/cuga-agent 🌐 官方网站  https://cuga.dev

收录时间:2026-05-17 · 更新时间:2026-05-19 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。