agent-tools-and-providers
Configure providers and safely operate leader-worker dispatch, text tool calls, repository tools, and literature search.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- agent-tools-and-providers
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Configure providers and safely operate leader-worker dispatch, text tool calls, repository tools, and literature search.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/provider-config.md6.7 KB
- 参考文档references/text-tool-protocol.md5.2 KB
- 参考文档references/tool-catalog.md7.8 KB
- 参考文档references/troubleshooting.md6.3 KB
- 脚本scripts/validate_provider_config.py3.2 KB
03 SKILL.md 正文
Agent tools and providers
Use this skill when a research project needs to configure the LLM endpoint or when a worker must inspect files, search code, query literature, or hand an experiment launch to monitoring. This skill describes the observable dispatcher and tool-registry contracts; it does not run an experiment, install source skills, or choose an execution backend.
Quick routing
- Confirm the provider, model, endpoint override, and credential environment variable names. Never put a secret value in a config file, prompt, report, or tool result.
- Use
AgentDispatcherfor leader/worker calls andToolRegistryfor the worker's allow-listed tools. A worker has no direct filesystem, shell, or network access; it must emit the text protocol described inreferences/text-tool-protocol.md. - Select a worker by responsibility:
ideafor literature,codefor implementation and launch, andwritingfor reports. Keep the tool set minimal and do not grant tools by copying another worker's list. - Treat the registry's returned JSON, especially
launch_experiment'spidandlog_file, as authoritative. Do not replace them with numbers or paths guessed from model prose. - Before any write or command, use workspace-relative paths and the exact
tool schemas in
references/tool-catalog.md. Route long-running lifecycle and backend transport questions to the corresponding lifecycle/backend skills.
Provider choices
AgentDispatcher supports anthropic, openai, claude_cli, and codex_cli.
The domestic aliases deepseek, dashscope, qwen, moonshot, kimi,
zhipu, and glm select an OpenAI-compatible endpoint while retaining the
original alias as provider_label. Presets, exact constructor behavior,
credential precedence, and model mapping are in
references/provider-config.md.
Prefer anthropic or openai for API calls and claude_cli when a pure text
CLI oracle is desired. codex_cli is suitable for leader/free-text work, but
is unsafe for authoritative worker handoff: its CLI runs its own built-in
agentic tools and cannot be forced into the registry protocol. The dispatcher
logs a warning whenever a codex worker receives tools; use another provider
for workers that write files or launch experiments.
Dispatch contract
dispatch_leader(task, context)keeps leader history within a cycle and parses a JSON decision. Leader history must be reset between cycles by the caller; the leader is not a worker tool loop.dispatch_worker(agent_type, task, tool_registry)starts a fresh worker conversation, appends the rendered schemas, executes parsed calls in order, and repeats until a response has no calls or the worker's hardmax_turnslimit is reached.- Tool results are returned to the model in a new user message. A non-dict
argsvalue is converted into a structured error and is never expanded as keyword arguments. Unknown tools also return a structured error. - For a code worker, a successful
launch_experimentresult is surfaced asexperiment_launched,pid, and (when supplied)log_file. This result is the handoff consumed by monitoring.
Safe operating rules
- A tool call is real only when it is a top-level
<tool_call>block. Calls inside a triple-backtick fenced block are illustrative and are suppressed. - Normalize paths before touching the backend. Absolute paths, empty paths,
..components, and symlink escapes are rejected. Writes additionally protect the basenamesstate.json,MEMORY_LOG.md,PROJECT_BRIEF.md, and.lock; protected files may still be read when otherwise valid. run_shellandlaunch_experimentparse withshlex.splitand invoke the backend without a shell. Empty commands, malformed quoting, and a blocked executable (rm,sudo,su,mkfs,dd,shutdown,reboot,poweroff, orhalt) fail before execution. Do not treat this as a complete privilege sandbox: explicitly invoking a shell interpreter remains a separate capability and should be avoided.- Repository searches are read-only, skip VCS/cache directories, skip symlinks and oversized/binary files, and return bounded results. Literature calls have network side effects and must be made only when the user permits them; failure is reported as JSON rather than retried blindly.
Verification
Run the bundled scripts/validate_provider_config.py with representative
provider/model/override combinations. It performs no network request, does
not read credential values, and prints only normalized non-secret metadata.
For parser/security review, use synthetic fenced-call, traversal, and
semicolon-payload cases and verify that no file is created and no backend call
is made before accepting a worker handoff.
Further reference
references/provider-config.md: constructor fields, aliases, SDK/CLI paths, precedence, and failure behavior.references/tool-catalog.md: worker allow-lists, exact schemas, result shapes, bounds, protection, and literature behavior.references/text-tool-protocol.md: parsing, multi-turn result handoff, fenced-call suppression, and authoritative PID handling.references/troubleshooting.md: predictable configuration, parser, path, shell, network, and CLI failure responses.
Do not use this skill to launch training or to poll a PID. For those tasks route to experiment lifecycle and execution/monitoring skills, respectively. For source-skill installation or export route to skills-and-installation.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).