Weave for Agents is in public preview. Features, APIs, and the Agents view UI may change before general availability.
Prerequisites
- Node.js v18 or later (includes
npm). - Claude Code installed and authenticated.
- A W&B account and API key set as a
WANDB_API_KEYenvironment variable. - A Weave project (
[YOUR-TEAM]/[YOUR-PROJECT]) to receive traces.
Install the plugin
Install the CLI, run the installer to register the plugin with Claude Code, then start a Claude Code session to begin tracing.Run the installer
- Creates
~/.weave-claude-code/settings.json. - Registers the plugin in Claude Code.
- Prompts for your Weave project (
[YOUR-TEAM]/[YOUR-PROJECT]) and W&B API key if they aren’t already set.
WEAVE_PROJECT and WANDB_API_KEY from the environment and warns if either is missing.View Claude Code traces in Weave
After running at least one Claude Code session, open your project in the Weave UI:- Navigate to https://wandb.ai and select your project.
- In the sidebar menu, select Agents to view all agent conversations saved for your project.
- Select a conversation to inspect the full session tree.
invoke_agent claude-code span uses the top-level agent name, which defaults to claude-code. You can change it with the agent_name setting or the WEAVE_AGENT_NAME environment variable (see Configure the plugin). Subagents keep their own type names.
Multi-turn conversations are linked server-side by session ID, so you can follow a conversation across multiple traces. Each span includes token usage, model name, tool inputs and outputs, timing, and the textual content of prompts and responses. For more information about traced data, see What Gets Traced in GitHub.
Configure the plugin
Use theweave-claude-code config commands to view or update plugin settings after installation:
claude-code in the Agents view. Set agent_name to use a different name, for example to distinguish teams or projects. The name can’t be empty, and surrounding whitespace is trimmed.
Environment variables take precedence over the settings file:
Weave skills
After installation, three Weave-specific skills are available directly inside any Claude Code session.| Skill | Command | Description |
|---|---|---|
| Install | /weave:weave-install | Walks through the installation and configuration flow interactively. Use this on a fresh machine or to diagnose a broken setup. |
| Status | /weave:weave-status | Checks the current plugin status and explains any issues. Equivalent to running weave-claude-code status, but Claude interprets the output and tells you what to fix. |
| Config | /weave:weave-config | Read or update plugin configuration without leaving Claude Code. |
weave:weave-config skill to set Weave values from within Claude Code:
Check plugin status
You can use these CLI commands to check plugin status or troubleshoot issues:✓ (OK), ✗ (action needed), or - (not yet active but not an error).
If sessions aren’t appearing in Weave, check the daemon log:
~/.weave-claude-code/logs/daemon.log.
W&B Dedicated Cloud or self-hosted instances
If you use W&B Dedicated Cloud or a self-hosted instance, setWANDB_BASE_URL before launching Claude Code:
WANDB_BASE_URL at startup. If the daemon is already running when you set the variable, it won’t detect the change. To restart the daemon:
- Shut down the daemon:
- Set
WANDB_BASE_URL, or runwandb login --host https://[YOUR-INSTANCE].wandb.ioto persist the setting across sessions. - Launch Claude Code again. The daemon restarts automatically and uses the correct URL.
Uninstall
To remove the plugin from Claude Code, run:--keep-logs to preserve the log directory.