返回顶部
m

mistral-agents-orchestratorMistral智能体编排

Multi-agent orchestration via Mistral's Agents API — register agents, manage conversations, delegate via handoffs, bind function calling tools. Use when building multi-agent systems with Mistral models, coordinating specialist agents, or implementing agent-to-agent delegation patterns. Requires MISTRAL_API_KEY.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
319
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

mistral-agents-orchestrator

Mistral Agents Orchestrator

使用Mistral的Agents API实现经过生产测试的多智能体编排。实现了编排器-委托模式,其中主导智能体通过对话和交接协调专业智能体。

架构

编排器(Papa Bois模式)
├── 通过Agents API注册专业智能体
├── 创建带交接配置的对话
├── 通过指定目标智能体名称来委派任务
└── 从完成的交接中收集结果

专业智能体(Anansi、Devi、Firefly模式)
├── 接收带有完整对话上下文的委派任务
├── 执行其专业领域(故事生成、音频、代码)
└── 将结果返回给编排器对话

关键概念

智能体: 在Mistral平台上预先注册,具有特定的系统提示和模型配置。每个智能体都有唯一的ID(ag_...)。

对话: 跨交接保留上下文的多轮线程。子项的名称、语言和提示都会自动传递,无需重新注入。

交接: 编排器指定一个专业智能体;Mistral将对话路由到该智能体。上下文自动保留。

函数调用: 工具(如TTS、SFX)绑定到编排器智能体,而不是委托智能体。工具遵循对话上下文。

快速开始

python
from mistralai import Mistral

client = Mistral(apikey=os.environ[MISTRALAPI_KEY])

注册智能体(一次性设置)

orchestrator = client.beta.agents.create( model=mistral-large-latest, name=orchestrator, instructions=你协调专业智能体..., )

specialist = client.beta.agents.create(
model=mistral-large-latest,
name=writer,
instructions=当被委派时你负责撰写内容...,
)

创建带交接的对话

response = client.beta.conversations.create( agent_id=orchestrator.id, inputs=写一篇关于AI智能体的博客文章, handoffs=[{agent_id: specialist.id, name: writer}], )

经验总结

  • - 交接保留对话上下文 — 无需重新注入背景信息
  • 工具绑定到编排器,而非委托智能体 — 委托智能体可以请求工具调用,但执行发生在编排器的上下文中
  • 4个智能体是黑客松范围的最佳数量 — 更多智能体意味着更多API调用和更多协调开销,但价值不成比例
  • 委托智能体上的JSON模式 强制结构化输出 — 没有它,Mistral Large有时会返回散文而非场景数组

文件

  • - scripts/orchestrator.py — 完整的编排器实现,包括智能体注册、对话管理和交接委派
  • references/agent-patterns.md — 常见的多智能体模式及其适用场景

安全说明

此技能使用的模式可能触发自动化安全扫描器:

  • - base64:用于编码API响应中的音频/二进制数据(媒体API的标准做法)
  • UploadFile:FastAPI内置的文件上传参数,用于STT/语音隔离端点
  • system prompt:指配置智能体指令,而非提示注入

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mistral-agents-orchestrator-1776198997 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mistral-agents-orchestrator-1776198997 技能

通过命令行安装

skillhub install mistral-agents-orchestrator-1776198997

下载

⬇ 下载 mistral-agents-orchestrator v1.0.1(免费)

文件大小: 8.54 KB | 发布时间: 2026-4-15 11:17

v1.0.1 最新 2026-4-15 11:17
- Updated to version 1.0.1.
- Added detailed security_notes in metadata, clarifying the use of base64 encoding, UploadFile for document ingestion, and the meaning of "system prompt."
- No changes to functionality or code; documentation metadata improved for security transparency.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部