30 lines
1.2 KiB
Markdown
30 lines
1.2 KiB
Markdown
# 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 `exec`s 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`.
|