AGENT SKILL

agents-tools-and-streaming

Use AdalFlow Agent, Runner, ReActAgent, FunctionTool, ToolManager, streaming events, permissions, and MCP tools safely.

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

01 前言 Front Matter

name
agents-tools-and-streaming
license
MIT
metadata
{ "disco-role": "operating" }
description
Use AdalFlow Agent, Runner, ReActAgent, FunctionTool, ToolManager, streaming events, permissions, and MCP tools safely.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Agents, Tools, and Streaming

Use this sub-skill when the task involves AdalFlow agent execution, tool wrapping, tool calling, streaming run events, human approval for tools, or MCP-served tools.

Route here for

  • Wrapping Python callables as FunctionTool, including sync, async, sync-generator, async-generator, and bound-method tools.
  • Inspecting or constructing FunctionDefinition, Function, FunctionExpression, FunctionOutput, or ToolOutput values.
  • Building a ToolManager, parsing function expressions, or executing tool calls directly.
  • Constructing Agent, Runner, or legacy ReActAgent workflows after the model client / generator setup is known.
  • Calling Runner.call, Runner.acall, or Runner.astream and consuming RunnerResult, step history, and stream events.
  • Adding human-in-the-loop approvals through PermissionManager, CLI/FastAPI handlers, require_approval, or pre-execution confirmation details.
  • Integrating MCP tools through MCP server parameter dataclasses, MCPFunctionTool, and MCPToolManager.

Route elsewhere

  • Model client, provider credentials, Generator, prompt/model kwargs, and provider streaming setup belong to model-client-and-generator-workflows.
  • DataClass schemas, parser design, and general structured output repair belong to core-components-and-structured-io unless the schema is specifically an agent final answer_data_type.
  • Retrieval/RAG tools belong to retrieval-rag-and-data-pipelines before wrapping them for agent use here.
  • Tracing spans, logs, MLflow, and persistent observability belong to tracing-observability-and-configuration.
  • Training and optimizer behavior for agents/tools belongs to evaluation-and-optimization.

Read these references

  1. references/agents-and-tools.md for FunctionTool, ToolManager, Agent, Runner, ReActAgent, tool outputs, and fake-planner testing.
  2. references/streaming-and-run-results.md for RunnerResult, StepOutput, streaming event types, and robust event consumption loops.
  3. references/mcp-and-permissions.md for tool approval flows, permission handlers, and MCP manager/server parameter patterns.
  4. references/troubleshooting.md for unsafe tools, missing annotations, async-loop issues, result formatting, max-step exhaustion, finalization, permission denials, stream consumption, and missing MCP dependencies.

Safe bundled checks

  • python scripts/function_tool_smoke.py verifies service-free FunctionTool and ToolManager behavior.
  • python scripts/agent_runner_fake_planner_smoke.py verifies Agent + Runner sync, async, streaming, and permission behavior with a fake planner and no provider calls.

Run these only in an environment where adalflow is importable. They do not require API keys, network services, provider calls, or MCP servers.

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