Skip to main content
Clawise

Daemon Proxy

The daemon is a local HTTPS forward proxy between your agent and the LLM provider. It strips real credentials out of outbound requests and resolves them back in responses — the LLM only ever sees clawise://<short_id> placeholders.

Your
agent

sk_live_xxx9zKm
sk_live_xxx9zKm
Clawise daemon
master key
clawise://a3f7b2c4
clawise://a3f7b2c4
LLM

Setup

1. Start the daemon

clawise daemon start

Listens on 127.0.0.1:9800. Leave it running.

2. Point your agent at the daemon

In the shell where your agent runs:

export HTTPS_PROXY=http://127.0.0.1:9800
export HTTP_PROXY=http://127.0.0.1:9800
export NODE_EXTRA_CA_CERTS=$(clawise daemon status --ca-path)

Your existing LLM client code stays unchanged.

What it does

The daemon does two passes on every request:

  • On the way out (agent → LLM): scans the request body and replaces any real credential with a clawise://<short_id> placeholder. Two sources of matches:
    • Values already stored in your vault
    • New secrets caught by built-in regex — auto-stored in the vault before substitution
  • On the way back (LLM → agent, including SSE): scans the response stream for any clawise://<short_id> echoed back and resolves each one to its plaintext before it reaches your agent.

The LLM and its provider only ever see placeholders. Your agent keeps using plaintext on both sides.

Supported LLM hosts

The daemon only touches traffic to a curated list of LLM provider hosts. Everything else passes through as opaque tunnels and is never read.

Built-in hosts:

  • api.openai.com, chatgpt.com
  • api.anthropic.com
  • cloudcode-pa.googleapis.com
  • api.deepseek.com, api.moonshot.cn, api.minimaxi.com, open.bigmodel.cn, dashscope.aliyuncs.com
  • api.x.ai, api.groq.com, api.together.xyz, openrouter.ai
  • api.githubcopilot.com
  • localhost:11434 (Ollama)

To add your own (e.g., an internal LLM gateway), append one host per line to ~/.local/share/clawise/proxy-whitelist.txt (lines starting with # are comments) and restart the daemon.

Recognized credential formats

For each request to a supported host, the daemon scans the body with a set of built-in regex patterns. When one matches, the secret is auto-stored in the vault, assigned a short ID, and replaced with the placeholder before forwarding.

CategoryExamples
LLM provider keysOpenAI (sk-...T3BlbkFJ...), Anthropic (sk-ant-...), Google (AIza...), DeepSeek, Groq, Together, Fireworks, OpenRouter, Perplexity, xAI, Replicate, HuggingFace
CloudAWS access keys, AWS secret access keys, Google OAuth client secrets
Source controlGitHub tokens (ghp_, ghu_, gho_, ghs_), GitHub fine-grained PATs, GitLab PATs / CI tokens
MessagingSlack bot / user / app tokens
PaymentsStripe secret / publishable / webhook secrets
GenericJWT-like strings, npm tokens, PyPI tokens

The full pattern list is built into the binary and updated as new formats become relevant.

Custom rules

Override defaults in ~/.config/clawise/config.yaml. The daemon watches the file and reloads on save (or send SIGHUP manually):

daemon:
  rules:
    disable_default: false
    blocklist:
      - 'INTERNAL_API_[A-Z0-9]{32}'
      - 'corp-secret-[a-f0-9]{16}'
    allowlist:
      - 'PUBLIC_KEY_[A-Z0-9]+'
  vendor_schemas:
    - host: my-llm-proxy.example.com
      protected_paths:
        - messages.#.content.#.thinking
        - messages.#.reasoning_content
  • rules.blocklist — extra regex patterns. Matched strings are added to the vault and replaced with placeholders.
  • rules.allowlist — patterns the daemon will never mask, even if blocklist or defaults would match. Useful for public keys or known-safe identifiers.
  • rules.disable_default — turn off the built-in patterns entirely (only your blocklist is active).
  • vendor_schemas — JSON paths in responses to leave untouched (e.g., signed thinking blocks, encrypted reasoning chunks). Paths use GJSON syntax; # indexes arrays. The host must also be in proxy-whitelist.txt to be intercepted. Built-ins already cover Anthropic, DeepSeek, and Moonshot.

Commands

  • clawise daemon start
  • clawise daemon status --ca-path — print the CA cert path

See the CLI reference for full flags and config.

On this page