
Write HTML. Render video. Built for agents.
AgentStack packages a production-style multi-agent stack on Mastra. It combines specialized agents, workflows, supervisor networks, MCP/A2A routing, observability, and workspace controls so you can build agent systems with shared tools and governed execution.
Builders who want reusable agent orchestration, tool use, and tracing in one TypeScript codebase.
You can build and run coordinated agent workflows with shared tools, memory, tracing, and guardrails instead of wiring each piece yourself.
Defines 25+ agents for tasks like research, stock analysis, writing, and review.
Uses coordinator agents to route work to subagents through delegation hooks.
Coordinates agents through MCP tools and A2A communication for multi-agent flows.
Includes semantic search, chunking, reranking, and graph-based retrieval for document work.
Tracks agent runs, tool calls, and workflow steps with tracing and Langfuse-ready hooks.
Supports local, AgentFS, and Daytona workspaces with persistence and approval controls.
Provides repo-level guidance in `AGENTS.md`, `.github/instructions`, `.windsurf/rules`, and related files.
# Start server
npm run mcp-server
# Use in Cursor/Claude
# coordinate_a2a_task({task: "AAPL analysis", agents: ["research", "stock"]})
AgentStack is a production-grade AI agent platform built on Mastra, delivering 57 enterprise tools, 25+ specialized agents, 10+ workflows, 12+ supervisor networks, 105 UI components (50+ AI Elements + 55+ base), and A2A/MCP orchestration for scalable AI systems. Features supervisor networks with delegation hooks, workspace management (AgentFS/Daytona/Local), TanStack Query integration, and LibSQL-backed persistence for agents, workspaces, supervisor networks, and auth. Focuses on financial intelligence, RAG pipelines, enterprise observability, secure governance, and AI chat interfaces.
AgentStack bridges the gap between basic AI chatbots and enterprise-grade multi-agent orchestration. While other AI agent platforms offer simple automation, AgentStack delivers the observability, security, and scalability required for production deployment.
| Feature | AgentStack | Fleece AI | Botpress | Vellum AI |
|---|---|---|---|---|
| Production Observability | β Real-time traces via TanStack + Langfuse ready | β οΈ Basic | β οΈ Basic | β Partial |
| Dataset Management | β Full dataset/eval/experiment API with versioning | β None | β None | β οΈ Basic |
| Supervisor Networks | β 12+ coordinator agents with delegation hooks | β None | β None | β None |
| Financial Intelligence | β Polygon/Finnhub/AlphaVantage (30+ endpoints) | β None | β None | β None |
| RAG Pipeline | β LibSQL HNSW + rerank + graphRAG | β οΈ Basic | β οΈ Basic | β External |
| Multi-Agent Orchestration | β A2A MCP + supervisor networks (25+ agents) | β Advanced | β Basic | β Partial |
| Live Browser Automation | β Local Chrome/CDP browser agent + shared runtime | β οΈ Basic | β οΈ Partial | β οΈ Partial |
| Workspaces / Sandboxes | β AgentFS + Daytona + local sandboxes + persistence | β οΈ Basic | β None | β οΈ Partial |
| Enterprise Security | β Better Auth + RBAC + path traversal protection + HTML sanitization | β οΈ Partial | β οΈ Partial | β Partial |
| Type Safety | β Zod schemas everywhere (57 tools) | β οΈ Limited | β οΈ Limited | β Partial |
| UI Components | β 105 components (AI Elements + shadcn/ui) | β 30+ | β 50+ | β 30+ |
| Testing | β Vitest + 97% coverage + comprehensive mocks | β οΈ Partial | β οΈ Partial | β Partial |
While other AI agent platforms offer basic chatbot functionality, AgentStack provides enterprise-grade multi-agent orchestration:
Production-grade data fetching with comprehensive React hooks:
// lib/hooks/use-mastra-query.ts - 1590+ lines of typed hooks
import { useAgentsQuery } from '@/lib/hooks/use-mastra-query'
export function AgentsDashboard() {
const { data: agents, isLoading, error } = useAgentsQuery()
// 15+ specialized hooks for agents, workflows, tools, memory, vectors
// Automatic caching, background refetching, optimistic updates
// Type-safe with Zod schemas throughout
}
Key Features:
Complete dataset and evaluation pipeline with versioning and experiments:
// lib/hooks/use-mastra-query.ts - Full dataset API
const { data: datasets } = useDatasets()
const { data: experiments } = useDatasetExperiments(datasetId)
// Dataset operations
const createDataset = useCreateDatasetMutation()
const addItems = useAddDatasetItemsMutation()
const runExperiment = useTriggerDatasetExperimentMutation()
Features:
Enterprise-grade observability with easy Langfuse integration:
// src/mastra/index.ts - Default observability setup
observability: new Observability({
configs: {
default: {
sampling: { type: SamplingStrategyType.RATIO, probability: 0.75 },
spanOutputProcessors: [new SensitiveDataFilter({...})],
exporters: [new DefaultExporter({...})],
// Easy Langfuse integration: uncomment and configure
// exporters: [new LangfuseExporter({...})],
}
}
})
Features:
Real-time Trace Monitoring:
// View traces in real-time with TanStack hooks
const { data: traces } = useTraces({ limit: 10 })
const { data: trace } = useTrace(traceId)
// Monitor agent performance metrics
const { data: scores } = useScoresByRun({ runId })
AgentStack uses server-side Mastra middleware to populate request context for agents, tools, workflows, and supervisor routes. The frontend does not import these helpers directly.
// src/mastra/index.ts - Middleware configuration
middleware: [
async (c, next) => {
const authHeader = c.req.header('Authorization') ?? ''
const requestContext = c.get('requestContext')
const authenticatedUser = await getAuthenticatedUser({
mastra,
token: authHeader.startsWith('Bearer ')
? authHeader.slice('Bearer '.length)
: '',
request: c.req.raw,
})
if (requestContext?.set) {
requestContext.set('userId', authenticatedUser?.user.id)
requestContext.set(
'role',
authenticatedUser?.user.role === 'admin' ? 'admin' : 'user'
)
requestContext.set('language', 'en')
requestContext.set('provider-id', 'google')
requestContext.set(
'model-id',
'gemini-3.1-flash-lite-preview'
)
}
await next()
},
]
How it works:
src/mastra/agents/request-context.tssrc/mastra/auth.ts stores Better Auth data in LibSQLrole is either admin or userprovider-id and model-id can be passed through request contextworkspaceId, threadId, and resourceId are reserved for server-side routing and persistencefile:./database.dbAdvanced multi-mode agent orchestration with state persistence and workspace management:
// src/mastra/harness.ts - 8 specialized agent modes
export const mainHarness = new Harness({
id: 'agentstack-harness',
resourceId: 'agentstack',
storage: pgStore,
workspace: mainWorkspace,
modes: [
{ id: 'plan', name: 'Planner', agent: codeArchitectAgent },
{ id: 'code', name: 'Builder', agent: codeArchitectAgent },
{ id: 'review', name: 'Reviewer', agent: codeReviewerAgent },
{ id: 'test', name: 'Tester', agent: testEngineerAgent },
{ id: 'refactor', name: 'Refactorer', agent: refactoringAgent },
{ id: 'research', name: 'Researcher', agent: researchAgent },
{ id: 'edit', name: 'Editor', agent: editorAgent },
{ id: 'report', name: 'Reporter', agent: reportAgent },
],
})
Available Modes:
Key Features:
Usage (Alpha):
// Switch to planning mode
await harness.switchMode('plan')
await harness.execute('Design a new authentication system')
// Switch to implementation mode
await harness.switchMode('code')
await harness.execute('Implement the auth system using JWT')
// Switch to testing mode
await harness.switchMode('test')
await harness.execute('Generate comprehensive tests for auth')
β οΈ Alpha Status: The harness is currently in active development. APIs may change without notice.
Multi-provider workspace system with LSP support:
// src/mastra/workspaces.ts - 14 workspace variants
export const workspaceVariants = {
mainWorkspace, // Local filesystem + sandbox
agentFsWorkspace, // AgentFS integration
daytonaWorkspace, // Daytona cloud sandboxes
localReadOnlyWorkspace, // Read-only operations
localApprovalWorkspace, // Manual approval required
localLspWorkspace, // TypeScript/ESLint LSP
// ... 8 more variants
}
Providers:
Features:
Real-time market data from 30+ endpoints:
// Example: Multi-source stock analysis
const analysis = await stockAnalysisAgent.execute({
symbol: 'AAPL',
includeFundamentals: true,
includeNews: true,
timeRange: '1Y',
})
// β Combines Polygon quotes, Finnhub analysis, AlphaVantage indicators
// β Returns: Price action, valuation metrics, sentiment analysis
Supported Data Providers:
Zero-config semantic search with libSQL:
// 1. Index documents
await documentProcessingWorkflow.execute({
documents: ['./annual-report.pdf', './market-data.csv'],
chunkingStrategy: 'semantic',
indexName: 'financial-reports',
})
// 2. Query with context
const answer = await governedRagAnswerWorkflow.execute({
query: 'What were Q3 revenue drivers?',
indexName: 'financial-reports',
rerankTopK: 5,
})
// β Returns: Synthesized answer + source citations + confidence score
Features:
Supervisor agents that coordinate multiple specialized agents using delegation hooks:
// Networks are supervisor agents that route tasks to specialized subagents
const result = await agentNetwork.execute({
query: 'Analyze renewable energy market trends',
// Uses delegation hooks to route to researchAgent, learningAgent, etc.
})
// β Supervisor agent analyzes request and delegates to appropriate subagents
// β Results synthesized into unified response
Network Architecture:
onDelegationStart/onDelegationComplete for coordinationPre-configured Networks:
Every operation traced with Langfuse:
// Traces automatically captured
const trace = await langfuse.getTrace(traceId)
// β Agent execution steps
// β Tool calls with latency
// β Token usage per step
// β Custom scorer results (quality, diversity, completeness)
Dashboard Views:
50+ production-ready React components:
import { AgentArtifact, AgentChainOfThought, AgentSources } from '@/ai-elements'
// Render streaming AI responses
<AgentChainOfThought
steps={reasoningSteps}
isStreaming={true}
duration={1500}
/>
// Display code artifacts with syntax highlighting
<AgentArtifact
artifact={{
type: 'code',
language: 'typescript',
content: generatedCode
}}
onCodeUpdate={handleUpdate}
/>
// Show source citations
<AgentSources
sources={citedSources}
maxVisible={5}
/>
Real-world applications powered by AgentStack:
// Supervisor network coordinates specialized agents
const report = await financialIntelligenceNetwork.execute({
symbol: 'TSLA',
includeTechnicalAnalysis: true,
includeNewsSentiment: true,
generateCharts: true,
})
// β Supervisor network delegates to: researchAgent β stockAnalysisAgent β chartGeneratorAgent β reportAgent
// β Generates PDF report with charts and citations
Features:
// Ingest and query company documents
await documentProcessingWorkflow.execute({
source: 'https://company.com/docs',
includeSubpages: true,
chunkingStrategy: 'semantic',
extractMetadata: true,
})
const answer = await knowledgeBaseAgent.execute({
query: 'What is our refund policy?',
includeSources: true,
confidenceThreshold: 0.8,
})
// β Searches across all indexed documents
// β Returns answer with source URLs
Features:
// Supervisor network coordinates coding team
const result = await codingTeamNetwork.execute({
task: 'Refactor authentication module',
code: './src/auth/*',
requirements: [
'Improve security',
'Add rate limiting',
'Better error handling',
],
})
// β Supervisor network delegates: codeArchitectAgent β codeReviewerAgent β testEngineerAgent β refactoringAgent
// β Each agent handles specific aspect using delegation hooks
Features:
// Supervisor network orchestrates content pipeline
const content = await contentCreationNetwork.execute({
topic: 'Sustainable investing trends',
formats: ['blog', 'social', 'newsletter'],
tone: 'professional',
seoOptimize: true,
})
// β Supervisor network delegates: copywriterAgent β editorAgent β contentStrategistAgent β seoAgent
// β Each agent specializes in different aspect of content creation
Features:
// Supervisor network coordinates research pipeline
const research = await researchPipelineNe
Sign in to join the discussion.
No comments yet. Be the first to say what this is good for.

Write HTML. Render video. Built for agents.
Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents β swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.
A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.
π·οΈ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!