Meta tags:
description= The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents - GitHub - vercel/ai: The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents;
Headings (most frequently used words):
uh, oh, navigation, agent, app, code, saved, searches, ai, files, for, agents, contributing, footer, generating, ui, image, generation, ts, route, component, tsx, page, search, repositories, users, issues, pull, requests, provide, feedback, vercel, sdk, menu, use, to, filter, your, results, more, quickly, folders, and, latest, commit, history, repository, installation, skill, coding, unified, provider, architecture, usage, templates, community, authors, about, releases, 000, contributors, languages, text, structured, data, integration, topics, resources, license, of, conduct, security, policy, stars, watchers, forks, next, js, router, api, chat, tool, view,
Text of the page (most frequently used words):
sdk (24), and (20), you (19), the (19), from (18), openai (16), code (14), import (14), #security (13), github (13), const (13), agent (11), #agents (11), your (11), json (11), view (10), vercel (10), model (10), for (10), contributing (9), with (9), use (9), all (9), community (8), div (8), tools (8), await (8), can (7), open (7), reload (7), page (7), anthropic (7), return (7), image (7), output (7), claude (7), this (6), next (6), input (6), message (6), gpt (6), generatetext (6), yaml (6), enterprise (6), navigation (5), typescript (5), license (5), react (5), source (5), powered (5), invocation (5), case (5), text (5), export (5), generation (5), app (5), string (5), name (5), more (5), search (5), vue (4), there (4), was (4), error (4), while (4), loading (4), please (4), readme (4), like (4), providers (4), messages (4), part (4), available (4), imagegenerationagent (4), toolloopagent (4), npm (4), install (4), package (4), prompt (4), object (4), google (4), skills (4), another (4), documentation (4), tsconfig (4), examples (4), pnpm (4), actions (4), issues (4), support (4), that (3), action (3), status (3), policy (3), repository (3), stars (3), conduct (3), resources (3), generative (3), gemini (3), svelte (3), topics (3), toolkit (3), library (3), applications (3), are (3), our (3), projects (3), templates (3), setinput (3), index (3), key (3), imagegenerationview (3), type (3), imagegenerationagentmessage (3), function (3), default (3), component (3), generating (3), result (3), api (3), new (3), build (3), command (3), sandbox (3), packages (3), out (3), architecture (3), cursor (3), files (3), changelog (3), content (3), commit (3), insights (3), pull (3), requests (3), signed (3), settings (3), tab (3), window (3), refresh (3), session (3), sign (3), saved (3), feedback (3), grade (3), features (3), copilot (3), platform (3), solutions (3), explore (3), share (2), manage (2), footer (2), 2026 (2), javascript (2), releases (2), latest (2), forks (2), dev (2), creators (2), free (2), building (2), about (2), contributions (2), highly (2), before (2), jump (2), review (2), include (2), cases (2), frameworks (2), these (2), application (2), sendmessage (2), form (2), value (2), handlesubmit (2), tool (2), generateimage (2), switch (2), map (2), strong (2), usechat (2), tsx (2), data (2), imagegeneration (2), typeof (2), uitoolinvocation (2), createagentuistreamresponse (2), req (2), async (2), route (2), inferagentuimessage (2), need (2), framework (2), provides (2), hooks (2), help (2), agnostic (2), they (2), cmd (2), args (2), shell (2), access (2), recipe (2), array (2), gateway (2), hello (2), flash (2), etc (2), opus (2), using (2), any (2), unified (2), provider (2), add (2), coding (2), skill (2), node (2), development (2), turbo (2), socket (2), workspace (2), lock (2), code_of_conduct (2), oxlintrc (2), oxfmtrc (2), jsonc (2), npmrc (2), kodiak (2), toml (2), gitignore (2), assets (2), vscode (2), husky (2), codex (2), changeset (2), 562 (2), commits (2), last (2), menu (2), quality (2), appearance (2), cancel (2), see (2), searches (2), repositories (2), business (2), advanced (2), developer (2), customer (2), services (2), devops (2), perform, time, not, personal, information, cookies, contact, docs, privacy, terms, inc, css, mdx, languages, contributors, 623, jul, bytedance, 000, report, watching, 144, watchers, custom, properties, activity, llm, language, artificial, intelligence, nextjs, created, team, members, authors, welcome, appreciated, however, right, into, would, make, sure, have, smooth, experience, contribution, guidelines, found, where, ask, questions, voice, ideas, other, people, built, integrations, different, get, started, ready, disabled, target, onchange, onsubmit, parts, role, preventdefault, usestate, client, png, base64, src, img, state, returntype, request, post, router, chat, partialimages, module, set, chatbots, user, interfaces, used, integration, stdout, runcommand, getsandbox, execute, localshell, environment, system, sandboxagent, generate, lasagna, steps, amount, ingredients, schema, zod, structured, what, usage, also, connect, directly, their, uses, give, major, box, just, pass, supported, interact, npx, such, recommend, adding, will, manager, installed, local, machine, installation, learn, how, check, reference, designed, popular, angular, runtimes, items, history, date, folders, file, tags, branches, main, additional, options, 896, 908, star, fork, must, change, notification, notifications, public, dismiss, alert, switched, accounts, resetting, focus, create, qualifiers, query, filter, results, quickly, submit, email, address, contacted, read, every, piece, take, very, seriously, provide, syntax, tips, clear, users, pricing, premium, ons, collections, trending, archive, program, accelerator, maintainer, lab, programs, fund, developers, sponsors, partners, trust, center, forum, ebooks, reports, events, webinars, stories, software, topic, industries, government, manufacturing, financial, healthcare, industry, devsecops, modernization, nonprofits, startups, small, medium, teams, enterprises, company, size, marketplace, blog, why, stop, leaks, start, secret, protection, secure, find, fix, vulnerabilities, changes, plan, track, work, instant, environments, codespaces, automate, workflow, workflows, integrate, external, mcp, registry, direct, issue, merge, write, better, creation, toggle, skip,
Text of the page (random words):
github vercel ai the ai toolkit for typescript from the creators of next js the ai sdk is a free open source library for building ai powered applications and agents github skip to content navigation menu toggle navigation sign in appearance settings platform ai code creation github copilot write better code with ai github copilot app direct agents from issue to merge mcp registry new integrate external tools developer workflows actions automate any workflow codespaces instant dev environments issues plan and track work code review manage code changes application security github advanced security find and fix vulnerabilities code security secure your code as you build secret protection stop leaks before they start explore why github documentation blog changelog marketplace view all features solutions by company size enterprises small and medium teams startups nonprofits by use case app modernization devsecops devops ci cd view all use cases by industry healthcare financial services manufacturing government view all industries view all solutions resources explore by topic ai software development devops security view all topics explore by type customer stories events webinars ebooks reports business insights github skills support services documentation customer support community forum trust center partners view all resources open source community github sponsors fund open source developers programs security lab maintainer community accelerator github stars archive program repositories topics trending collections enterprise enterprise solutions enterprise platform ai powered developer platform available add ons github advanced security enterprise grade security features copilot for business enterprise grade ai features premium support enterprise grade 24 7 support pricing search or jump to search code repositories users issues pull requests search clear search syntax tips provide feedback we read every piece of feedback and take your input very seriously include my email address so i can be contacted cancel submit feedback saved searches use saved searches to filter your results more quickly name query to see all available qualifiers see our documentation cancel create saved search sign in sign up appearance settings resetting focus you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message uh oh there was an error while loading please reload this page vercel ai public notifications you must be signed in to change notification settings fork 4 8k star 25 6k code issues 908 pull requests 896 actions projects security and quality 0 insights additional navigation options code issues pull requests actions projects security and quality insights vercel ai main branches tags go to file code open more actions menu folders and files name name last commit message last commit date latest commit history 7 562 commits 7 562 commits agents agents changeset changeset claude claude codex codex cursor cursor github github husky husky vscode vscode architecture architecture assets assets content content contributing contributing examples examples packages packages skills skills tools tools gitignore gitignore kodiak toml kodiak toml npmrc npmrc oxfmtrc jsonc oxfmtrc jsonc oxlintrc json oxlintrc json agents md agents md changelog md changelog md claude md claude md code_of_conduct md code_of_conduct md contributing md contributing md license license readme md readme md package json package json pnpm lock yaml pnpm lock yaml pnpm workspace yaml pnpm workspace yaml socket yaml socket yaml tsconfig json tsconfig json tsconfig with examples json tsconfig with examples json turbo json turbo json view all files repository files navigation readme code of conduct contributing license security more items ai sdk the ai sdk is a provider agnostic typescript toolkit designed to help you build ai powered applications and agents using popular ui frameworks like next js react svelte vue angular and runtimes like node js to learn more about how to use the ai sdk check out our api reference and documentation installation you will need node js 22 and npm or another package manager installed on your local development machine npm install ai skill for coding agents if you use coding agents such as claude code or cursor we highly recommend adding the ai sdk skill to your repository npx skills add vercel ai unified provider architecture the ai sdk provides a unified api to interact with model providers like openai anthropic google and more by default the ai sdk uses the vercel ai gateway to give you access to all major providers out of the box just pass a model string for any supported model const result await generatetext model anthropic claude opus 4 6 or openai gpt 5 4 google gemini 3 flash etc prompt hello you can also connect to providers directly using their sdk packages npm install ai sdk openai ai sdk anthropic ai sdk google import anthropic from ai sdk anthropic const result await generatetext model anthropic claude opus 4 6 or openai gpt 5 4 google gemini 3 flash etc prompt hello usage generating text import generatetext from ai const text await generatetext model openai gpt 5 4 use vercel ai gateway prompt what is an agent generating structured data import generatetext output from ai import z from zod const output await generatetext model openai gpt 5 4 output output object schema z object recipe z object name z string ingredients z array z object name z string amount z string steps z array z string prompt generate a lasagna recipe agents import toolloopagent from ai const sandboxagent new toolloopagent model openai gpt 5 4 system you are an agent with access to a shell environment tools shell openai tools localshell execute async action const cmd args action command const sandbox await getsandbox vercel sandbox const command await sandbox runcommand cmd args return output await command stdout ui integration the ai sdk ui module provides a set of hooks that help you build chatbots and generative user interfaces these hooks are framework agnostic so they can be used in next js react svelte and vue you need to install the package for your framework e g npm install ai sdk react agent agent image generation agent ts import openai from ai sdk openai import toolloopagent inferagentuimessage from ai export const imagegenerationagent new toolloopagent model openai gpt 5 4 tools generateimage openai tools imagegeneration partialimages 3 export type imagegenerationagentmessage inferagentuimessage typeof imagegenerationagent route next js app router app api chat route ts import imagegenerationagent from agent image generation agent import createagentuistreamresponse from ai export async function post req request const messages await req json return createagentuistreamresponse agent imagegenerationagent messages ui component for tool component image generation view tsx import openai from ai sdk openai import uitoolinvocation from ai export default function imagegenerationview invocation invocation uitoolinvocation returntype typeof openai tools imagegeneration switch invocation state case input available return div generating image div case output available return img src data image png base64 invocation output result page app page tsx use client import imagegenerationagentmessage from agent image generation agent import imagegenerationview from component image generation view import usechat from ai sdk react export default function page const messages status sendmessage usechat imagegenerationagentmessage const input setinput usestate const handlesubmit e e preventdefault sendmessage text input setinput return div messages map message div key message id strong message role strong message parts map part index switch part type case text return div key index part text div case tool generateimage return imagegenerationview key index invocation part div form onsubmit handlesubmit input value input onchange e setinput e target value disabled status ready form div templates we ve built templates that include ai sdk integrations for different use cases providers and frameworks you can use these templates to get started with your ai powered application community the ai sdk community can be found on the vercel community where you can ask questions voice ideas and share your projects with other people contributing contributions to the ai sdk are welcome and highly appreciated however before you jump right into it we would like you to review our contribution guidelines to make sure you have smooth experience contributing to ai sdk authors this library is created by vercel and next js team members with contributions from the open source community about the ai toolkit for typescript from the creators of next js the ai sdk is a free open source library for building ai powered applications and agents ai sdk dev topics react javascript typescript vue nextjs svelte artificial intelligence gemini openai language model vercel llm generative ai anthropic generative ui resources readme license view license code of conduct code of conduct contributing contributing security policy security policy uh oh there was an error while loading please reload this page activity custom properties stars 25 6k stars watchers 144 watching forks 4 8k forks report repository releases 5 000 ai sdk bytedance 1 0 27 latest jul 14 2026 21 623 releases uh oh there was an error while loading please reload this page contributors uh oh there was an error while loading please reload this page languages typescript 81 0 mdx 18 5 javascript 0 4 vue 0 1 css 0 0 open policy agent 0 0 footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|