Agents (ACP + HTTP)

Interoperability without boredom. Lock-in kills trust.

Hash speaks two protocols so you can:

  • Run cloud agents (Claude, GPT, Gemini)
  • Run local models (Ollama, llama.cpp)
  • Switch without changing your workflow

ACP (Agent Client Protocol)

For agents that run as local processes. Uses JSON-RPC 2.0 over stdin/stdout.

~/.config/hash/config.toml
[agent]
command = "claude-code-acp"

Claude Code Setup

Anthropic API key required. Claude Code ACP uses the Anthropic API, which requires an API key from the Anthropic Developer Console. This is separate from a Claude.ai subscription account.

To use Anthropic's Claude Code with Hash, first install the Claude CLI using the native installer:

Terminal
curl -fsSL https://claude.ai/install.sh | bash

Then, install the ACP adapter which allows Hash to communicate with Claude:

Terminal
npm install -g @zed-industries/claude-code-acp

Set ANTHROPIC_API_KEY in your environment (e.g., in ~/.hashrc) before using the agent.

Gemini CLI Setup

Google's Gemini CLI supports ACP natively with an experimental flag. First, install the Gemini CLI:

Terminal
npm install -g @google/gemini-cli@latest

Then configure Hash to use Gemini with the --experimental-acp flag:

~/.config/hash/config.toml
[agent]
command = "gemini"
args = ["--experimental-acp"]

Alternatively, you can use: command = "gemini --experimental-acp"

When to use ACP

  • Claude Code, Gemini CLI, or any tool with ACP support
  • You want the agent to have full context (files, git, etc.)
  • Session persistence matters

Behavior

  • Lazy connect: connects on first ?? use
  • One session per shell instance
  • Closed on shell exit

HTTP transport

For HTTP-based model servers. Works with Ollama, vLLM, or any OpenAI-compatible endpoint.

~/.config/hash/config.toml
[agent]
transport = "http"
url = "http://localhost:11434/api/generate"
model = "codellama:13b"

When to use HTTP

  • Ollama or local model servers
  • Self-hosted inference
  • You want full control over the model

Agent config options

~/.config/hash/config.toml
[agent]
command = "claude-code-acp" # ACP agent command
timeout = "120s" # Max response wait (default: 120s)

# HTTP transport (alternative)
# transport = "http"
# url = "http://localhost:11434/api/generate"
# model = "codellama:13b"

Debug checklist

SymptomCheck
"command not found"Is command in your PATH?
TimeoutIncrease timeout, check model is loaded
Empty responseCheck model name matches server
Auth errorsCheck API keys are set in environment
Slow startupNormal — ACP connects lazily on first ??

Check the agent command works directly in your terminal before configuring it in Hash.