@vctools/llm
v0.1.0
Published
Anthropic Claude client used by vctools — structured output via tool_use.
Maintainers
Readme
@vctools/llm
Anthropic Claude client used by the vctools suite. A thin wrapper around @anthropic-ai/sdk that returns JSON-shaped responses via tool_use.
import { LlmClient } from "@vctools/llm";
const client = new LlmClient({ model: "claude-haiku-4-5-20251001" });
const result = await client.callStructured<{ summary: string }>({
systemPrompt: "Summarise the input in one sentence.",
userPrompt: "...",
toolName: "summarise",
toolDescription: "Return a one-sentence summary.",
schema: {
type: "object",
properties: { summary: { type: "string" } },
required: ["summary"],
},
});Reads ANTHROPIC_API_KEY from the environment by default. Throws MissingApiKeyError if absent.
License
MIT
