AI SDK integration npm 0.1.0
YouTube transcript search
for your AI SDK agent.
Add YouTube transcript search and entity lookup to your AI SDK agent. Return source passages your readers can check.
Install @arcmira/ai-sdk 0.1.0 with Node.js 22 or later.
Give your coding agent this prompt
Read https://arcmira.github.io/integrations/ai-sdk/.
Add Arcmira transcript search to my AI SDK agent.
Keep source timestamps and coverage notes in every answer.Install the package
Get an Arcmira API key, then run these commands. Keep the key in server-side configuration.
npm install @arcmira/ai-sdk@0.1.0 ai zod
export ARCMIRA_API_KEY='your-key'Find a timestamped passage
Save this as search.mjs in your project, then run node search.mjs. This calls Arcmira directly through the tool, without model inference.
import { createArcmiraTools } from '@arcmira/ai-sdk';
const apiKey = process.env.ARCMIRA_API_KEY;
if (!apiKey) throw new Error('Set ARCMIRA_API_KEY');
const tools = createArcmiraTools({ apiKey });
const result = await tools.arcmiraSearch.execute(
{ q: 'AI agents', limit: 5 },
{ toolCallId: 'quickstart', messages: [] },
);
for (const chunk of result.chunks) {
console.log(chunk.text, chunk.watch_url);
}
console.log(result.note);Results include transcript passages, source links and coverage notes. Your account's access and freshness limits apply. An empty result does not establish that a topic was never discussed.
Let your agent choose the tool
Set AI_GATEWAY_API_KEY for the AI SDK Gateway. Save this as agent.mjs in the same directory and run node agent.mjs. Model inference is billed separately.
import { generateText, isStepCount } from 'ai';
import { createArcmiraTools } from '@arcmira/ai-sdk';
const apiKey = process.env.ARCMIRA_API_KEY;
if (!apiKey) throw new Error('Set ARCMIRA_API_KEY');
const { text } = await generateText({
model: 'openai/gpt-5-mini',
tools: createArcmiraTools({ apiKey }),
prompt: 'Find passages discussing AI agents. Return timestamped source links and preserve coverage notes.',
stopWhen: isStepCount(3),
});
console.log(text);arcmiraSearch finds transcript passages. arcmiraResolve resolves people, organizations, products, topics and channels to IDs before filtering. Keep ambiguous candidates visible until the intended entity is clear.
Keep the evidence attached
Preserve the returned source labels, timestamps and coverage notes when presenting an answer. Check the surrounding recording before using a quote. Speaker attribution and indexed coverage can be incomplete.
A paid read uses credits from your plan, then your on-demand budget. API refusals preserve their typed error body. The adapter does not retry refused requests or substitute a different transcript source.
This adapter provides search and entity resolution. Use the full SDK or MCP server for full transcripts, recommendations and monitors.