Files
sherlock/docs/agents.md
T
amacocian 59eaf9e47d
Release / release (push) Failing after 6s
SearXNG support
2026-06-14 21:33:22 +02:00

1.2 KiB

Agents

Sherlock dispatches built-in agent profiles from internal/agent/.

Agent CLI MCP config
copilot GitHub Copilot CLI --additional-mcp-config @<path>
claude Claude Code CLI --mcp-config <path>

sherlock <agent> [args...] and sherlock run <agent> [args...] are equivalent. Unknown agent names exit with usage errors.

Spawn behavior

On spawn, sherlock resolves installed MCP binaries (gitea-mcp, grafana-mcp, gssh-mcp, searxng-mcp), skips missing ones with a warning, renders a 0600 .mcp.json file under $XDG_RUNTIME_DIR/sherlock/, and execs the target agent.

The child mostly inherits the parent environment. The Claude profile strips ANTHROPIC_API_KEY so a personal key does not override sherlock-managed behavior.

Changing agents

Adding an agent is a code change under internal/agent/. Implement the small agent interface, register it in init, and use internal/mcp for config rendering. The exact API lives in internal/agent/agent.go; shared spawn helpers live in internal/agent/exec.go.