Claude integration
How the server configures Anthropic Messages, tool budgets, and provider-side processing.
On this page
Server configuration
CogniTech uses @anthropic-ai/sdk 1.16.0. The server reads ANTHROPIC_API_KEY and an optional ANTHROPIC_MODEL. The code defaults to claude-sonnet-5-5. Model access and support for the selected web-tool versions depend on the deployment’s Anthropic account. The browser never receives the provider key.
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
const stream = client.messages.stream({
model: process.env.ANTHROPIC_MODEL || "claude-sonnet-5-5",
max_tokens: 4096,
messages: [{ role: "user", content: "Summarize the role of a Merkle root." }],
});This minimal server-side example omits the application’s private instructions, history, tool policy, and accounting. The running application attaches system instructions and only its permitted tool definitions.
Budgets and errors
The application defaults to 4,096 output tokens, five searches, three fetches, and six tool rounds. A server deadline of 100 seconds sits inside the chat message route’s 120-second declared deployment budget. Provider failures and timeouts become safe errors or interrupted replies. Missing credentials produce configuration feedback. Usage rows record provider counts, including web uses where reported.
See Claude Messages and server configuration.

CogniTech