@obversa/engine-anthropic-api calls the Anthropic Messages API directly:
it streams tokens as they arrive and starts no command-line process. Use it
for a seat that only needs text, a judge or a scorer, where a coding agent’s
tools and workspace would be wasted.
It loads none of your own setup, so it always runs clean and has no clean option. Its
row in the engines table says the same.
Install
@obversa/obversa.
Requirements
- An Anthropic API key, in the
ANTHROPIC_API_KEYenvironment variable or theapiKeyoption.
Identity
The plugin reportsprovider: 'anthropic', with the model family read from
the model name. It runs the model the request names; without one it uses
defaultModel, and without that claude-haiku-4-5-20251001.
Quickstart
Construct the engine and ask it what it will run as, with no network call:examples/engine-anthropic-api-binding.ts
admit returns the identity the engine reports before any request: the
adapter, provider, model family, model and capabilities. Run it with
npx tsx engine-anthropic-api-binding.ts:
Output
apiKey out and set ANTHROPIC_API_KEY, then pass the
engine to run() in engines or bind it to a graph node.
Options
Errors
- A missing key fails with a message that names both places to put it, and points at the agent-sdk and claude-cli engines, which use the host’s Claude sign-in instead.
- A request that asks for tools or workspace access fails as
invalid-config: the engine takes text-only requests. It ignoresAgentRequest.env, because there’s no process to pass it to. - Server errors (HTTP 5xx) and connection errors, timeouts included, are
retried. A rate limit (HTTP 429) fails as
rate-limit, carrying the API’sretry-afterwait when it sends one.
API
AnthropicApiEngine: the engine class.AnthropicApiEngineOptions: its options. Quickstart.
Next steps
- Evals in an agent workflow: the judge and scorer seats this engine suits.
- Claude Agent SDK Engine: Claude with tools and memory, through the host’s sign-in.