뉴스피드 큐레이션 SNS 대시보드 저널

HN 표시: Vercel Blob AI SDK 도구

hackernews | | 💼 비즈니스
#ai agent #ai sdk #gpt-5 #openai #tip #vercel blob #개발 도구 #파일 관리

요약

Vercel는 AI 에이전트가 Vercel Blob을 활용해 파일을 효율적으로 저장하고 관리할 수 있도록 지원하는 AI SDK 도구 모음을 출시했습니다. 이번 도구를 통해 개발자들은 복잡한 인프라 구축 없이도 AI 에이전트에 파일 처리 기능을 손쉽게 통합할 수 있게 되었습니다.

왜 중요한가

개발자 관점

검토중입니다

연구자 관점

검토중입니다

비즈니스 관점

검토중입니다

본문

A collection of AI SDK tools that give your AI agents the ability to store and manage files using Vercel Blob. npm install vercel-blob-ai-sdk Set the BLOB_READ_WRITE_TOKEN environment variable with your Vercel Blob token. import { generateText, stepCountIs } from "ai"; import { uploadAsset, listAssets, downloadAsset } from "vercel-blob-ai-sdk"; const { text } = await generateText({ model: 'openai/gpt-5.2', tools: { uploadAsset, listAssets, downloadAsset }, prompt: "Save a file called hello.txt with the content 'Hello, world!'", stopWhen: stepCountIs(3), }); This package requires ai (^6.0.67) and zod (^4.3.6) as peer dependencies. | Tool | Description | Needs approval | |---|---|---| uploadAsset | Upload files, images, or text content to blob storage | No | listAssets | List stored assets with optional prefix filtering and pagination | No | getAssetInfo | Get metadata (size, content type, upload date) without downloading | No | downloadAsset | Download and retrieve file contents (text or base64) | No | copyAsset | Copy an asset to a new path without re-uploading | No | deleteAsset | Permanently delete a single asset | Yes | deleteAssets | Permanently delete multiple assets at once | Yes | Use createBlobTools to scope operations under a path prefix, configure access control, and customize individual tool behavior. import { createBlobTools } from "vercel-blob-ai-sdk"; const tools = createBlobTools({ pathPrefix: "tenant-abc", access: "private", allowOverwrite: true, overrides: { deleteAsset: { needsApproval: false }, uploadAsset: { description: "Store tenant files" }, }, }); | Option | Type | Default | Description | |---|---|---|---| pathPrefix | string | "" | Prefix prepended to all asset paths | access | "public" | "private" | "public" | Default access level for uploaded/copied assets | addRandomSuffix | boolean | false | Add a random suffix to filenames to avoid conflicts | allowOverwrite | boolean | false | Allow overwriting existing assets at the same path | overrides | Record | — | Per-tool overrides (see below) | The path prefix applies to uploadAsset , listAssets , and copyAsset . URL-based tools (deleteAsset , deleteAssets , getAssetInfo , downloadAsset ) are unaffected by the prefix. The overrides option lets you customize any AI SDK tool() property on a per-tool basis, keyed by tool name. import type { ToolOverrides } from "vercel-blob-ai-sdk"; Supported override properties: | Property | Type | Description | |---|---|---| description | string | Custom tool description for the model | title | string | Human-readable title | strict | boolean | Strict mode for input generation | needsApproval | boolean | function | Gate execution behind approval | providerOptions | ProviderOptions | Provider-specific metadata | onInputStart | function | Callback when argument streaming starts | onInputDelta | function | Callback on each streaming delta | onInputAvailable | function | Callback when full input is available | toModelOutput | function | Custom mapping of tool result to model output | Core properties (execute , inputSchema , outputSchema ) cannot be overridden. Contributions are welcome! Please read our Contributing Guide for more information.

관련 저널 읽기

전체 보기 →