AI clients and agents

Argent for Claude Agent SDK

Agents built on the Claude Agent SDK get Argent's gateway, proxy and hooks, like Claude Code. Here is what Argent governs, how it connects and what your team sets.

Anthropic logo
01 / AI CLIENTS AND AGENTS

What Argent does with Claude Agent SDK

Every model call an app makes with Claude Agent SDK goes through Argent first. Argent knows which agent sent it and which person owns that agent, checks it against your policy, and writes a signed record of what it decided.

  • A named agent with a human owner. Each app or service you connect uses its own Argent agent key, tied to an accountable person, so no call is anonymous. Identity tethering
  • Only the models you allow. The agent can reach only the providers and models your policy names, and a request can be swapped to an approved model. Model control
  • Sensitive data handled before it leaves. Prompts and replies are scanned for personal and secret data, then redacted or blocked as your policy says. Sensitive data redaction
  • Spend priced and capped. Every request is priced and metered against budgets for the agent, its owner and the teams above them. AI spend caps
  • A signed record you can replay. Each decision becomes a hash-chained, signed audit record, and requests are grouped into sessions you can replay. Session replay
  • Tool actions checked before they run. Shell commands, file reads and writes, web fetches, MCP calls and prompt submits ask Argent first; if Argent cannot answer, the action is refused. Agent permissions
02 / AI CLIENTS AND AGENTS

How Claude Agent SDK connects

Claude Agent SDK reaches Argent in three ways.

  • Gateway base URL. Your app points Claude Agent SDK at your Argent route (its base URL setting) and uses an Argent agent key in place of the provider key. Argent removes that key and adds the real provider credential from your vault on the way out, so your app never holds it.
  • TLS-inspecting forward proxy. Your app keeps its normal Claude Agent SDK settings and sends its HTTPS traffic through the Argent forward proxy and trusts your Argent certificate; the exact settings are below. The proxy signs in with the agent's own key, so every call is attributed, then runs the same checks as the gateway. It opens only known AI hosts, and its certificate is limited to those hosts.
  • Tool hooks. Before Claude Agent SDK runs a tool or submits a prompt, its hook asks Argent for a decision and a data-loss scan. If Argent cannot answer, the hook refuses.

The same steps are in the Argent console under Integrations > AI Clients, and each agent's Connect tab gives the copy-paste values for your tenant.

03 / AI CLIENTS AND AGENTS

What you configure

What your team sets in Claude Agent SDK. These are the settings the Argent console shows for this tool. Values in angle brackets come from your tenant.

  1. Gateway. Pass env to the SDK's agent process: ANTHROPIC_BASE_URL=https://<ARGENT_GATEWAY>/<tenant>/anthropic, ANTHROPIC_AUTH_TOKEN=<an Argent agent key>, ANTHROPIC_CUSTOM_HEADERS='Host: api.anthropic.com'.
  2. Forward proxy. HTTPS_PROXY plus NODE_EXTRA_CA_CERTS in the env block, or in managed-settings.json env (Claude Code reads standard proxy variables; no SOCKS; basic auth in the URL is supported). See https://code.claude.com/docs/en/network-config.
  3. Hooks. The SDK loads.claude/settings and managed settings, so Argent hooks (argent connect claude-code) apply: hooks ask Argent before shell, file and MCP actions.
04 / AI CLIENTS AND AGENTS

Make Argent the only path

Make Argent the only path for Claude Agent SDK. These controls are documented by the platform each one belongs to (linked); pair them with the Argent settings above.

  • Claude Code managed settings (applies to SDK sessions). Pins proxy, CA, base URL and hooks for every Claude Code process including SDK-launched agents. Vendor docs
  • Machine-wide environment variables (Windows). Sets the base URL / proxy / CA variables for every process on the machine so SDK-based apps default to Argent. Vendor docs
  • Managed environment (macOS). Same variables for GUI-launched and shell processes. Vendor docs
  • Service / container environment (Linux, Kubernetes, CI). Sets the variables where most production SDK code runs. Vendor docs

Same settings everywhere it runs. The Argent fleet setup script and certificate bundle give every service, container and build runner the same proxy and certificate settings.

argent connect claude-code --emit-managed writes an admin-deployable managed-settings.json that pins the Argent key helper above user and project settings.

Want to see which AI tools people already run before you push anything? Start with Shadow AI discovery in watch mode. Watch before you enforce

05 / AI CLIENTS AND AGENTS

Check that it works

Send one request and look for the signed row. Same as Claude Code: signed LLM and hook rows in the Argent console live stream.

Every request also appears on the live stream with the agent's name and owner, and in the session view. Session replay