← 返回
AI智能 Key 中文

Mistral Agents Orchestrator

Multi-agent orchestration via Mistral's Agents API — register agents, manage conversations, delegate via handoffs, bind function calling tools. Use when buil...
使用Mistral Agents API实现多智能体编排——注册智能体、管理对话、通过交接委托、绑定函数调用工具。适用于构建...
nissan
AI智能 clawhub v1.0.1 2 版本 100000 Key: 需要
★ 0
Stars
📥 658
下载
💾 15
安装
2
版本
#latest

概述

Mistral Agents Orchestrator

Production-tested multi-agent orchestration using Mistral's Agents API. Implements the orchestrator-delegate pattern where a lead agent coordinates specialist agents via Conversations and Handoffs.

Architecture

Orchestrator (Papa Bois pattern)
├── Registers specialist agents via Agents API
├── Creates conversations with handoff configuration
├── Delegates tasks by naming the target agent
└── Collects results from completed handoffs

Specialists (Anansi, Devi, Firefly patterns)
├── Receive delegated tasks with full conversation context
├── Execute their speciality (story gen, audio, code)
└── Return results to the orchestrator conversation

Key Concepts

Agents: Pre-registered on Mistral platform with specific system prompts and model configs. Each agent has a unique ID (ag_...).

Conversations: Multi-turn threads that preserve context across handoffs. The child's name, language, and prompt all carry through without re-injection.

Handoffs: The orchestrator names a specialist agent; Mistral routes the conversation to that agent. Context is preserved automatically.

Function Calling: Tools (like TTS, SFX) are bound to the orchestrator agent, not the delegates. Tools follow the conversation context.

Quick Start

from mistralai import Mistral

client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])

# Register agents (one-time setup)
orchestrator = client.beta.agents.create(
    model="mistral-large-latest",
    name="orchestrator",
    instructions="You coordinate specialist agents...",
)

specialist = client.beta.agents.create(
    model="mistral-large-latest",
    name="writer",
    instructions="You write content when delegated to...",
)

# Create conversation with handoff
response = client.beta.conversations.create(
    agent_id=orchestrator.id,
    inputs="Write a blog post about AI agents",
    handoffs=[{"agent_id": specialist.id, "name": "writer"}],
)

Patterns Learned

  • Handoffs preserve conversation context — no need to re-inject background info
  • Tools bind to the orchestrator, not delegates — delegates can request tool calls but execution happens in the orchestrator's context
  • 4 agents is the sweet spot for hackathon scope — more agents = more API calls = more coordination overhead without proportional value
  • JSON mode on delegates forces structured output reliably — without it, Mistral Large sometimes returns prose instead of scene arrays

Files

  • scripts/orchestrator.py — Full orchestrator implementation with agent registration, conversation management, and handoff delegation
  • references/agent-patterns.md — Common multi-agent patterns and when to use each

Security Notes

This skill uses patterns that may trigger automated security scanners:

  • base64: Used for encoding audio/binary data in API responses (standard practice for media APIs)
  • UploadFile: FastAPI's built-in file upload parameter for STT/voice isolation endpoints
  • "system prompt": Refers to configuring agent instructions, not prompt injection

版本历史

共 2 个版本

  • v1.0.0
    2026-03-30 17:25
  • v1.0.1 当前
    2026-03-18 22:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,362 📥 318,770
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 837 📥 213,305
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,006