Token导航 LogoToken导航TokenDH.com
alfredo (Biocypher) logo
AI代理stdio官方级别未说明来源级核验

alfredo (Biocypher)

MCP Server

Alfredo是一个基于Python的AI代理构建工具,提供全面的工具执行和自主任务完成能力,适用于自动化任务处理、代码分析和视觉验证等场景。

工具数

10

提示词数

0

GitHub Stars

1

资源数

0
AI代理代码分析PythonClaudeClaudeCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

biocypher

提供方

biocypher

最后核验

2026/5/17 20:23

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run pytest

详细介绍

阿尔弗雷多

![Release](https://img.shields.io/github/v/release/biocypher/alfredo) ![Build status](https://github.com/biocypher/alfredo/actions/workflows/main.yml?query=branch%3Amain) ![codecov](https://codecov.io/gh/biocypher/alfredo) ![License](https://img.shields.io/github/license/biocypher/alfredo)

一个用于构建具备全面工具执行和自主任务完成能力的AI代理的Python框架。

Alfredo 提供了一个基于 LangGraph 的智能体框架,该框架将规划、执行和验证集成为一个统一的智能体系统。其设计注重可扩展性,支持自定义工具、MCP 集成,并附带了专用的预构建智能体。

主要特点

  • 🤖 机器人 自主代理 - 计划-验证-重新计划循环,带自动任务分解功能
  • 🔧 修理工具或扳手的符号,常用于表示维修、修理或技术相关的工作。 11 个内置工具 - 文件操作、命令、发现、代码分析、可视化以及工作流控制
  • 👁️ 视觉能力 - 使用多模态模型分析图像
  • 🔗 MCP集成 - 连接到任何模型上下文协议服务器
  • 🎯(目标、靶心) 模型无关的 - OpenAI、Anthropic 或任何支持 LangChain 的大型语言模型(LLM)
  • 📊(图表/数据) 执行追踪 - 对代理行为的详细可见性
  • 🛠️(工具/螺丝刀等工具的符号,可翻译为“工具”或根据具体语境翻译为相应的具体工具名称) 自定义系统提示 - 使用AlfredoTool微调节点行为
  • 📦 翻译为中文是:“📦”(这个符号本身在中文中没有直接对应的翻译,通常保持原样使用,表示包裹或箱子)。如果需要描述其含义,可以翻译为“包裹”或“箱子”,但具体翻译需根据上下文确定。 预构建代理 - 探索代理(ExplorationAgent)和反思代理(ReflexionAgent)已准备好使用

安装

注: Alfredo 尚未在 PyPI 上发布。请直接从 GitHub 安装,使用 uv

# Clone the repository
git clone https://github.com/biocypher/alfredo.git
cd alfredo

# Install dependencies
uv sync

# Or add as a dependency to your project
uv add git+https://github.com/biocypher/alfredo.git

快速入门

from alfredo import Agent

# Create an agent
agent = Agent(
    cwd=".",
    model_name="gpt-4.1-mini",  # or "anthropic/claude-3-5-sonnet-20241022"
    verbose=True
)

# Run a task - agent will plan, execute, and verify
agent.run("Create a Python script that computes an approximation of pi using the Monte Carlo method")

# View execution trace
agent.display_trace()

# Access results
print(agent.results["final_answer"])

视觉赋能的智能体

Alfredo智能体能够利用视觉模型分析图像,从而实现强大的工作流程,使智能体能够验证其自身的视觉输出:

from alfredo import Agent

# Create an agent with vision capabilities
agent = Agent(
    cwd=".",
    model_name="gpt-4.1-mini",       # Main model for planning and reasoning
    vision_model="gpt-4.1-mini",     # Vision model for image analysis
    parse_reasoning=True
)

# Agent creates visualization AND verifies it by looking at it
agent.run("""
Create a Python script that computes an approximation of pi using the Monte Carlo method.
Also create a visualization of the results and save it as a PNG file.
Make sure that the plot is correct by analyzing the image.
If you miss some package, use uv to initialize a venv and then add what is missing.
""")

# View execution trace to see vision tool in action
agent.display_trace()

发生的事情:

  1. 代理编写蒙特卡洛模拟代码
  2. 代理运行代码并生成图表
  3. 代理使用 analyze_image 验证可视化是否正确
  4. 如果发现问题,代理将继续迭代(或:代理会重复执行以解决问题)

视觉技术的应用场景:

  • 📸 界面测试中的截图分析
  • 📊 图表和图示验证
  • 📝 OCR(光学字符识别)和文档处理
  • 🎨 图像描述与配文创作
  • ✅ 视觉质量保证

建筑学

阿尔弗雷多使用一个 LangGraph状态图 包含以下节点:

START → planner → agent ⇄ tools → verifier
                   ↑              ↓
                   └── replan ←───┘
  • 规划者;日程安排者制定实施计划
  • 代理执行ReAct风格的推理和工具调用
  • 工具执行工具调用
  • 验证者检查任务是否完成
  • 重新计划如果验证失败,则生成改进后的计划

可以禁用规划功能,直接在代理节点上开始执行。

阅读更多:代理架构 →

可用工具

Alfredo 包含11个内置工具,按类别组织:

类别工具
文件操作read_filewrite_to_filereplace_in_file
发现list_filessearch_files
代码分析list_code_definition_names
命令execute_command
愿景analyze_image
工作流程ask_followup_questionattempt_completion

阅读更多:工具文档 →

MCP 集成

Alfredo支持两种MCP集成模式:

代码行动模式

从MCP服务器生成可导入的Python模块,使代理能够像使用常规函数一样使用工具,而无需通过ReAct循环:

from alfredo import Agent

# Configure remote MCP server (supports both local and remote)
agent = Agent(
    cwd="./workspace",
    model_name="gpt-4.1-mini",
    codeact_mcp_functions={
        "biocontext": {
            "url": "https://mcp.biocontext.ai/mcp/",  # Remote or local server
        }
    },
    verbose=True
)

# Agent can now import and use MCP tools in scripts:
agent.run("Write a script that gets the interactors of gene ENSG00000141510 and save to interactors.txt")

# Agent generates code like:
# from biocontext_mcp import bc_get_protein_interactors
# result = bc_get_protein_interactors(gene_id="ENSG00000141510")

特点:

  • ✅ 与……兼容/可与……一起使用 远程 服务器(例如。, https://mcp.biocontext.ai/mcp/
  • ✅ 与……兼容/协同工作 当地的 服务器(例如。, http://localhost:8000
  • ✅ 自动生成带类型的Python封装模块
  • ✅ 支持SSE和JSON-RPC 2.0协议
  • ✅ 会话管理,支持自动重试
  • ✅ 基于脚本的工具链集成

ReAct 模式

通过LangChain的工具调用直接使用MCP工具:

from alfredo import Agent
from alfredo.integrations.mcp import load_combined_tools_sync

# Configure MCP servers
server_configs = {
    "biocontext": {
        "transport": "streamable_http",
        "url": "https://mcp.biocontext.ai/mcp/",
    }
}

# Load Alfredo + MCP tools
tools = load_combined_tools_sync(cwd=".", mcp_server_configs=server_configs)

# Create agent with combined toolset
agent = Agent(cwd=".", tools=tools)
agent.run("Get the interactors of TP53 in human and save the results to a file called tp53_interactors.txt")

阅读更多:MCP 集成 →

自定义系统提示

使用 AlfredoTool 为任何工具添加节点特定的指令:

from alfredo.tools.alfredo_tool import AlfredoTool

# Add instructions that only appear in specific nodes
tool = AlfredoTool.from_alfredo(
    tool_id="write_todo_list",
    cwd=".",
    system_instructions={
        "planner": "After making your plan, create an initial checklist to keep track of your progress",
    }
)

# Instructions are dynamically injected into node system prompts
agent = Agent(cwd=".", tools=[tool])

阅读更多:Alfredo工具与系统提示 →

预构建的代理(或预置代理)

探索代理

浏览目录,并通过智能文件读取和数据分析生成全面的Markdown报告:

from alfredo.prebuilt import ExplorationAgent

agent = ExplorationAgent(
    cwd="./my_project",
    context_prompt="Data belongs to a transcriptomic study on cancer cell lines"
)
report = agent.explore()

反思型智能体(或:反思性代理)

利用网络搜索进行迭代自我批评和修订的研究代理:

from alfredo.prebuilt import ReflexionAgent

agent = ReflexionAgent(model_name="gpt-4.1-mini", max_iterations=2)
answer = agent.research("Create a detailed report about the roles of TP53 in cancer cell lines and save the results to a file called tp53_roles.md")
agent.display_trace()

阅读更多:预构建代理 →

文档

发展

# Install dependencies
make install

# Run tests
uv run pytest

# Run tests with coverage
uv run pytest --cov=src

# Lint and type check
uv run ruff check src
uv run mypy src

许可证

在以下(许可/条款)下发布 麻省理工学院许可证(MIT License)

功劳/学分/资历

受……启发的工具系统设计 克林(Cline,根据上下文,此为人名翻译,具体翻译可能因语境而异) - 一个适用于VSCode的AI编码助手。

______________________________________________________________________

仓库已初始化,使用 fpgmaas/cookiecutter-uv 可以翻译为:“FPGA(现场可编程门阵列)质量分析系统/基于Cookiecutter的UV(可能指紫外线或某种特定工具/模板的缩写,具体需根据上下文确定)项目模板”。不过,这里的“fpgmaas”可能是一个特定上下文或领域内的术语或项目名,如果它不是广为人知的术语,那么在翻译时可能需要保留原样或根据具体上下文进行解释。同时,“cookiecutter”在这里通常指的是一个用于生成项目模板的工具或框架,而“uv”则可能需要根据具体语境来确定其确切含义

目录标签

目录标签

AI代理代码分析PythonClaude本地部署自动化任务视觉验证工具执行

支持客户端

ClaudeCline

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

10

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP