sdk anthropic
tool judged 0% likely a named technique or architecture
See how it has spread across media tiers
Mentions over time
Table view
| Week | Articles | Sources |
|---|---|---|
| 2024-W33 | 1 | 1 |
| 2024-W47 | 1 | 1 |
| 2025-W11 | 1 | 1 |
| 2025-W22 | 1 | 1 |
In their words
import { streamText, tool } from "ai";import { anthropic } from "@ai-sdk/anthropic";import { z } from "zod";async function stockAnalysisAgent( symbol: string, startDate: string, endDate: string) { return streamText({ model: anthropic("claude-4-sonnet-20250514"), system: `You are a professional stock analyst AI powered by Claude Sonnet.
You can access the model’s reasoning tokens with the reasoning property: import { generateText } from 'ai';import { anthropic } from '@ai-sdk/anthropic';const { text, reasoning } = await generateText({ model: anthropic('claude-3-7-sonnet-20250219'), prompt: 'How many people will live in the world in 2040?',}); You can experiment with different models to find the best fit for your application.
Here’s an example with Anthropic’s Claude Sonnet 3.5 model: import { generateText } from 'ai';import { anthropic } from '@ai-sdk/anthropic';const result = await generateText({ model: anthropic('claude-3-5-sonnet-20241022'), messages: [ { role: 'user', content: [ { type: 'text', text: 'What is an embedding model according to this document?', }, { type: 'file', data: fs.readFileSync('./data/ai.pdf')
Integrating any model into your app with the AI SDK is just a few lines of code: import { generateText } from "ai";import { anthropic } from "@ai-sdk/anthropic";const { text } = await generateText({ model: anthropic("claude-3-5-sonnet-20240620"), prompt: "What is the best way to architect an AI application?",}); Copy link to headingThird-party, fine-tuning, or in-house models Depending on your use