Skip to content

内置能力

内置工具

工具用途
STOP_TOOLagent_stop结束工具循环;agent 直接作答
REASONING_TOOLreasoning显式推理步骤(非原生 thinking 模式)
UPDATE_STEP_TOOLupdate_step修订任务计划:replan / mark_done / add_step / remove_step
PROCESS_MESSAGE向用户报告 agent 进度(function_config.agent_middle_message 启用)

内置工具绕过 agent.tool_call / agent.tool_return 生命周期事件,且被排除在 停滞签名取消之外。

内置元数据类型

流元数据(MessageWithMetadata.metadata)使用 type + extra_type

typeextra_type含义
function_call工具开始/结束(is_done
reasoning_chunkcot_chunkthinking 模式推理流式
reasoning / structured_reasoning推理摘要
reflection停止后反思结果
errorloop_reasoning循环检测错误通知
stepdecompose / intro / leave / stall / compressStep 循环生命周期(见 Step 循环

内置适配器

模型适配器——OpenAI 兼容 (OpenAI/DeepSeek/Azure)与 Anthropic。

内置策略

策略类别备注
ReActAgentStrategyagent-mixed默认;Step 驱动循环(见 Agent 策略
HybridReActAgentStrategyagent-mixedMoE XML 风格结果;已弃用,v0.14.0 移除
NoActionAgentStrategyworkflow跳过工具调用

内置事件钩子

config.cookie.enable_cookie = True 时,响应会被扫描配置的 cookie 值;命中即 终止会话并返回通用错误防止数据泄露(见安全)。

后处理钩子

strategy.on_post_process() 在成功执行后对所有策略类别运行——最终指令、 摘要或清理。

内置工作流

amrita_core.builtins.workflows 中的预组合管线(见工作流引擎):

工作流管线
STEP_REACT_BLOCK / SIMPLE_STEP_REACT / STEP_REACT_ONLYStep 驱动 ReAct(默认系列)
REACT_BLOCK / SIMPLE_REACT / REACT_ONLY传统 ReAct 循环
SIMPLE_CHAT纯对话,无 agent

Apache 2.0 许可证(一些内容可能没有完全翻译成中文,请以英文文档为准。)