AGENT SKILL

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.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
tools-and-agents
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
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.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Tools and agents

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.

Route first

  1. Read the API reference for exact imports, return values, tool-call parsing/validation, execution tiers, and optional dependencies.
  2. Read workflows for the smallest suitable recipe: plain callable, manual tool loop, ReAct, MCP, framework adapter, or compaction.
  3. Read safety and policies before registering an execution-capable, networked, credentialed, or MCP tool.
  4. For failures, use troubleshooting. Run the bundled static checker before manually approving a serialized request: python scripts/audit_tool_request.py --help.

Operating rules

  • A tool schema advertises a callable; it is not approval to call it. Prefer narrow, typed functions and explicit names. Use @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 both the request shape and the business policy. Use 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.
  • Treat local shell and local Python tiers as host execution. Capability policy booleans on local tiers are declarations, not isolation. Prefer static checks for inspection and Docker-backed execution for untrusted code; still review network, package, filesystem, credential, and artifact behavior.
  • Discover MCP tools first, inspect/filter their names and schemas, then wrap only approved specs. Treat server descriptions, results, headers, stdio commands, and environment values as untrusted boundary data.
  • Use 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.
  • Pin the ReAct initiator before compaction. Keep backend-calling summarizers out of per-append 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.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351