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
AgentDispatcher for leader/worker calls and ToolRegistry for the
worker's allow-listed tools. A worker has no direct filesystem, shell, or
network access; it must emit the text protocol described in
references/text-tool-protocol.md.
- Select a worker by responsibility:
idea for literature, code for
implementation and launch, and writing for 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's pid
and log_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 hard max_turns
limit is reached.
- Tool results are returned to the model in a new user message. A non-dict
args value 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_experiment result is surfaced as
experiment_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 basenames state.json, MEMORY_LOG.md, PROJECT_BRIEF.md, and
.lock; protected files may still be read when otherwise valid.
run_shell and launch_experiment parse with shlex.split and invoke the
backend without a shell. Empty commands, malformed quoting, and a blocked
executable (rm, sudo, su, mkfs, dd, shutdown, reboot,
poweroff, or halt) 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.
1---2name: agent-tools-and-providers3description: "Configure providers and safely operate leader-worker dispatch, text tool calls, repository tools, and literature search."4disable-model-invocation: true5metadata:6 source: https://skillmd.com/skills/vectorspacelab/agent-tools-and-providers7 disco-role: operating8license: Apache 2.09---1011# Agent tools and providers1213Use this skill when a research project needs to configure the LLM endpoint or14when a worker must inspect files, search code, query literature, or hand an15experiment launch to monitoring. This skill describes the observable16dispatcher and tool-registry contracts; it does not run an experiment, install17source skills, or choose an execution backend.1819## Quick routing20211. Confirm the provider, model, endpoint override, and credential *environment22 variable names*. Never put a secret value in a config file, prompt, report,23 or tool result.242. Use `AgentDispatcher` for leader/worker calls and `ToolRegistry` for the25 worker's allow-listed tools. A worker has no direct filesystem, shell, or26 network access; it must emit the text protocol described in27 `references/text-tool-protocol.md`.283. Select a worker by responsibility: `idea` for literature, `code` for29 implementation and launch, and `writing` for reports. Keep the tool set30 minimal and do not grant tools by copying another worker's list.314. Treat the registry's returned JSON, especially `launch_experiment`'s `pid`32 and `log_file`, as authoritative. Do not replace them with numbers or paths33 guessed from model prose.345. Before any write or command, use workspace-relative paths and the exact35 tool schemas in `references/tool-catalog.md`. Route long-running lifecycle36 and backend transport questions to the corresponding lifecycle/backend37 skills.3839## Provider choices4041`AgentDispatcher` supports `anthropic`, `openai`, `claude_cli`, and `codex_cli`.42The domestic aliases `deepseek`, `dashscope`, `qwen`, `moonshot`, `kimi`,43`zhipu`, and `glm` select an OpenAI-compatible endpoint while retaining the44original alias as `provider_label`. Presets, exact constructor behavior,45credential precedence, and model mapping are in46`references/provider-config.md`.4748Prefer `anthropic` or `openai` for API calls and `claude_cli` when a pure text49CLI oracle is desired. `codex_cli` is suitable for leader/free-text work, but50is unsafe for authoritative worker handoff: its CLI runs its own built-in51agentic tools and cannot be forced into the registry protocol. The dispatcher52logs a warning whenever a codex worker receives tools; use another provider53for workers that write files or launch experiments.5455## Dispatch contract5657- `dispatch_leader(task, context)` keeps leader history within a cycle and58 parses a JSON decision. Leader history must be reset between cycles by the59 caller; the leader is not a worker tool loop.60- `dispatch_worker(agent_type, task, tool_registry)` starts a fresh worker61 conversation, appends the rendered schemas, executes parsed calls in order,62 and repeats until a response has no calls or the worker's hard `max_turns`63 limit is reached.64- Tool results are returned to the model in a new user message. A non-dict65 `args` value is converted into a structured error and is never expanded as66 keyword arguments. Unknown tools also return a structured error.67- For a code worker, a successful `launch_experiment` result is surfaced as68 `experiment_launched`, `pid`, and (when supplied) `log_file`. This result is69 the handoff consumed by monitoring.7071## Safe operating rules7273- A tool call is real only when it is a top-level `<tool_call>` block. Calls74 inside a triple-backtick fenced block are illustrative and are suppressed.75- Normalize paths before touching the backend. Absolute paths, empty paths,76 `..` components, and symlink escapes are rejected. Writes additionally77 protect the basenames `state.json`, `MEMORY_LOG.md`, `PROJECT_BRIEF.md`, and78 `.lock`; protected files may still be read when otherwise valid.79- `run_shell` and `launch_experiment` parse with `shlex.split` and invoke the80 backend without a shell. Empty commands, malformed quoting, and a blocked81 executable (`rm`, `sudo`, `su`, `mkfs`, `dd`, `shutdown`, `reboot`,82 `poweroff`, or `halt`) fail before execution. Do not treat this as a complete83 privilege sandbox: explicitly invoking a shell interpreter remains a84 separate capability and should be avoided.85- Repository searches are read-only, skip VCS/cache directories, skip86 symlinks and oversized/binary files, and return bounded results. Literature87 calls have network side effects and must be made only when the user permits88 them; failure is reported as JSON rather than retried blindly.8990## Verification9192Run the bundled `scripts/validate_provider_config.py` with representative93provider/model/override combinations. It performs no network request, does94not read credential values, and prints only normalized non-secret metadata.95For parser/security review, use synthetic fenced-call, traversal, and96semicolon-payload cases and verify that no file is created and no backend call97is made before accepting a worker handoff.9899## Further reference100101- `references/provider-config.md`: constructor fields, aliases, SDK/CLI paths,102 precedence, and failure behavior.103- `references/tool-catalog.md`: worker allow-lists, exact schemas, result104 shapes, bounds, protection, and literature behavior.105- `references/text-tool-protocol.md`: parsing, multi-turn result handoff,106 fenced-call suppression, and authoritative PID handling.107- `references/troubleshooting.md`: predictable configuration, parser, path,108 shell, network, and CLI failure responses.109110Do not use this skill to launch training or to poll a PID. For those tasks route111to experiment lifecycle and execution/monitoring skills, respectively. For112source-skill installation or export route to skills-and-installation.