@ai-sdk-tools/agents weekly downloads statistics
By ai-sdk-tools (5 listings) · npm · AI SDKs
Multi-agent orchestration system built on AI SDK v5 - handoffs, routing, and coordination for any AI provider
@ai-sdk-tools/agents has 8,964 recorded weekly downloads on npm, an increase of 60.3% over the past 30 days, ranking #1315 of 3,247 tracked listings.
About @ai-sdk-tools/agents
@ai-sdk-tools/agents
Multi-agent orchestration for AI SDK v5. Build intelligent workflows with specialized agents, automatic handoffs, and seamless coordination. Works with any AI provider.
npm install @ai-sdk-tools/agents ai zod
Why Multi-Agent Systems?
Complex tasks benefit from specialized expertise. Instead of a single model handling everything, break work into focused agents:
Customer Support: Triage → Technical Support → Billing
Content Pipeline: Research → Writing → Editing → Publishing
Code Development: Planning → Implementation → Testing → Documentation
Data Analysis: Collection → Processing → Visualization → Insights
Benefits
- Specialization - Each agent focuses on its domain with optimized instructions and tools
- Context Preservation - Full conversation history maintained across handoffs
- Provider Flexibility - Use different models for different tasks (GPT-4 for analysis, Claude for writing)
- Programmatic Routing - Pattern matching and automatic agent selection
- Production Ready - Built on AI SDK v5 with streaming, error handling, and observability
When to Use Agents
Use multi-agent systems when:
- Tasks require distinct expertise (technical vs. creative vs. analytical)
- Workflow has clear stages that could be handled independently
- Different models excel at different parts of the task
- You need better control over specialized behavior
Use single model when:
- Task is straightforward and can be handled by general instructions
- No clear separation of concerns
- Response time is critical (multi-agent adds orchestration overhead)
Core Concepts
Agent
An AI with specialized instructions, tools, and optional context. Each agent is configured with a language model and system prompt tailored to its role.
Memory & Conversation History
Agents automatically load conversation history from storage when memory is enabled. This creates a clean separation of concerns:
- Frontend: Sends only the new user message
- Backend: Loads conversation history from storage
- Storage: Single source of truth for all conversations
This approach:
- Reduces network payload (no need to send full history)
- Provides consistent context across requests
- Enables server-side control of context window size via
lastMessagesconfig - Integrates seamlessly with
@ai-sdk-tools/memoryproviders
Handoffs
Agents can transfer control to other agents while preserving conversation context. Handoffs include the reason for transfer and any relevant context.
Enhanced Context Management: The system now supports OpenAI-style context filtering during handoffs, allowing you to control exactly what information is passed between agents using HandoffInputFilter functions.
Orchestration
Automatic routing between agents based on:
- Programmatic matching: Pattern-based routing with
matchOn - LLM-based routing: The orchestrator agent decides which specialist to invoke
- Hybrid: Combine both for optimal performance
Enhanced Features (v0.3.0+)
Context Management & Handoff Filtering
The package now includes OpenAI-style context management with AgentRunContext and HandoffInputFilter support:
import { Agent, handoff, removeAllTools, keepLastNMessages } from '@ai-sdk-tools/agents';
// Configure handoffs with context filtering
const specialist = new Agent({
name: 'Specialist',
model: openai('gpt-4o'),
instructions: 'Specialized instructions...',
});
const orchestrator = new Agent({
name: 'Orchestrator',
model: openai('gpt-4o'),
instructions: 'Route to specialists...',
handoffs: [
// Remove all tool calls when handing off
handoff(specialist, {
inputFilter: removeAllTools,
onHandoff: async (runContext) => {
console.log('Handing off to specialist');
},
}),
// Keep only last 10 messages for context windowing
handoff(anotherSpecialist, {
inputFilter: keepLastNMessages(10),
}),
],
});
Agent Communication During Handoffs
Agents automatically share context through conversationMessages during handoffs. No separate tools needed.
Working Memory
Working memory automatically loads and provides update capability when enabled:
const agent = createAgent({
memory: {
workingMemory: {
enabled: true,
scope: 'user', // Persists across all chats for this user
template: 'Custom template...'
}
}
});
When enabled:
- Working memory loads automatically into system instructions
- Agent gets
updateWorkingMemorytool to update preferences/context - Updates persist in storage via the memory provider
Pre-built Handoff Filters
removeAllTools()- Remove all tool-related messageskeepLastNMessages(n)- Keep only the last N messages for context windowing
Quick Start
Basic: Single Agent
import { Agent } from '@ai-sdk-tools/agents';
import { openai } from '@ai-sdk/openai';
const agent = new Agent({
name: 'Assistant',
model: openai('gpt-4o'),
instructions: 'You are a helpful assistant.',
});
// Generate response
const result = await agent.generate({
prompt: 'What is 2+2?',
});
console.log(result.text); // "4"
Handoffs: Two Specialists
import { Agent } from '@ai-sdk-tools/agents';
import { openai } from '@ai-sdk/openai';
// Create specialized agents
const mathAgent = new Agent({
name: 'Math Tutor',
model: openai('gpt-4o'),
instructions: 'You help with math problems. Show step-by-step solutions.',
});
const historyAgent = new Agent({
name: 'History Tutor',
model: openai('gpt-4o'),
instructions: 'You help with history questions. Provide context and dates.',
});…
Description from the npm listing.
- ai
- ai-sdk
- agents
- multi-agent
- orchestration
- handoff
- routing
- llm
- openai
- anthropic
- claude
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm AI SDKs plugins
All 20 @ai-sdk-tools/agents alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@ai-sdk-tools/agents. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.