diff --git a/docs/src/ai/external-agents.md b/docs/src/ai/external-agents.md index 59ad764483b74b9b7c1557082d953568b90b802f..7830400fde45ba76029c2e50d02126b2a6278677 100644 --- a/docs/src/ai/external-agents.md +++ b/docs/src/ai/external-agents.md @@ -206,6 +206,31 @@ This can be useful if you're in the middle of developing a new agent that speaks It's also possible to specify a custom path, arguments, or environment for the builtin integrations by using the `claude` and `gemini` names. +### Custom Keybinding For Extension-Based Agents + +To assign a custom keybinding to start a new thread for agents that were added by installing agent server extensions, add the following snippet to your `keymap.json` file: + +```json [keymap] +{ + "bindings": { + "cmd-alt-n": [ + "agent::NewExternalAgentThread", + { + "agent": { + "custom": { + "name": "My Agent", + "command": { + "command": "my-agent", + "args": ["acp"] + } + } + } + } + ] + } +}, +``` + ## Debugging Agents When using external agents in Zed, you can access the debug view via with `dev: open acp logs` from the Command Palette. This lets you see the messages being sent and received between Zed and the agent.