Weave

Error reference

Every Weave error carries a stable code, a plain-language message, and a link back to the matching section on this page (NFR-034). Errors render as:

[WEAVE_SCHEMA_INVALID] <message> (<detail>). See https://github.com/TheDeveloperDoctor/weave/blob/main/docs/errors.md#weave_schema_invalid

All Weave errors subclass WeaveError, so a single except WeaveError catches every case below. Each error also exposes .code, .message, .detail, and .docs_url.

WEAVE_SCHEMA_INVALID

A payload did not satisfy a port schema.

Common causes: the value's DataType does not match the port's declared type, or a required field is missing from a structured_json payload.

Fix: check the producing agent's output port against the consuming agent's input port. If the types are merely compatible (not identical), a transform is auto-injected. See Connections & Pipelines.

WEAVE_CONNECTION_INCOMPATIBLE

Two agents cannot be connected: their ports are incompatible and no transform exists to bridge them.

Fix: make the upstream output type compatible with the downstream input type, or register a transform for the pair. The compatibility graph is documented in Connections & Pipelines.

WEAVE_ADAPTER_ERROR

An LLM adapter failed at runtime or is misconfigured.

Common causes: a missing API key env var, an invalid provider:model string, or an upstream provider error after retries are exhausted.

Fix: confirm the matching API key is set (OPENAI_API_KEY, ANTHROPIC_API_KEY, …) and the model id is valid for the provider. See LLM Providers.

WEAVE_ADAPTER_NOT_INSTALLED

The provider SDK is not installed in the current environment.

Fix: install the matching extra, e.g. pip install "weaveflow[anthropic]". The core ships with zero runtime dependencies; each provider's SDK is an optional extra.

WEAVE_UNKNOWN_PROVIDER

No adapter is registered for the requested provider prefix.

Fix: use one of the registered providers (openai, anthropic, google, mistral, ollama, deepseek) in your "provider:model" string. To add your own, register it in weave/llm/adapters/__init__.py (the registry is the single source of truth for available providers).

WEAVE_AGENT_EXECUTION

An agent raised an exception during execution.

Fix: inspect .detail for the originating error. Wrap fallible work in guardrail on_error hooks if you need graceful recovery. See Guardrails.

WEAVE_GUARDRAIL_REJECTED

A guardrail hook rejected the payload (pre or post).

Fix: the payload violated a policy you registered. Inspect .detail for which guardrail rejected it and why. See Guardrails.

WEAVE_UNKNOWN

The fallback code for a WeaveError raised without a more specific subclass. You should rarely see this; if you do, it usually indicates an internal error worth reporting on the issue tracker.