协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
tools-and-agents【开发与工程】Defines, audits, executes, and composes Mellea 0.8.0.dev0 tools and ReAct agents with explicit schema, approval, sandbox, hook, MCP, and context-compaction boundaries.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when a task exposes a Python callable, shell or Python execution, MCP/LangChain/smolagents tool, model tool call, ReAct loop, tool hook, or conversation compaction policy. Treat every model-produced tool request as untrusted data until its tool name, schema, arguments, side effects, and execution boundary have been approved.
python scripts/audit_tool_request.py --help.@tool or
MelleaTool.from_callable; call .run() for a deliberate direct call.instruct(), act(), and aact() can produce tool calls but do not execute
them. Use call_tools()/acall_tools() for an explicit execution boundary.
react() is different: it executes each non-final tool turn itself, so its
registered tool list is an execution allowlist, not merely context.validate_tool_arguments(..., strict=True) for schema validation at a manual
boundary, and uses_tool/tool_arg_validator when generation must satisfy a
requirement-and-repair loop. Lenient validation returns original arguments;
it is not a safety gate.tool_pre_invoke for the final allowlist/argument/redaction decision and
tool_post_invoke for audit or output redaction. Preserve ReAct's internal
final_answer control-flow tool unless the policy intentionally handles
is_control_flow.ChatContext compaction; use a per-turn or thresholded
compactor instead.Core generative-program design, session/context generation, and validation
repair belong to generative-programming.
Provider/model selection belongs to backends-and-models. Serving, m, and
endpoint deployment belong to serving-and-cli.
Telemetry and general plugin lifecycle belong to
observability-and-extensions; this route owns the tool-execution hook payload
and policy decision.