Open Source TypeScript AI Agent Framework with built-in LLM
Observability - VoltAgent/voltagent
See https://github.com/VoltAgent/voltagent
VoltAgent is an open source TypeScript framework for building and orchestrating AI agents with memory, workflows, tools, and built-in LLM observability.
Why VoltAgent?
- Production-Ready: Built-in memory, workflows, and observability out of the box.
- TypeScript First: Full type safety and compile-time checks.
- Built-in Observability: Trace decisions, monitor performance, and optimize workflows in real-time with VoltOps.
- Scalable Architecture: Easily orchestrate multi-agent teams with supervisors and modular workflows.
Core Features
- Core Runtime (
@voltagent/core
): Define typed agents with roles, tools, memory, and model providers. - Workflow Engine: Declarative multi-step automations with suspend/resume support.
- Supervisors & Sub-Agents: Coordinate teams of specialized agents.
- Tool Registry & MCP Support: Ship typed tools and connect to Model Context Protocol servers seamlessly.
- LLM Provider Agnostic: Switch between OpenAI, Anthropic, Google, etc., via config.
- Memory Adapters: Durable memory to retain context across runs.
- Retrieval & RAG Support: Integrate retriever agents for grounding responses.
- Evals Framework: Run agent evaluation suites alongside workflows.
VoltOps LLM Observability Platform
Built-in platform to monitor and debug agents with:
- Detailed execution traces
- Performance metrics
- Visual dashboards
- Logs and memory inspection
- Prompt builder
Quick Start
Create a new project using the CLI:
npm create voltagent-app@latest
Example agent setup (src/index.ts
):
import { VoltAgent, Agent, Memory } from "@voltagent/core";
import { LibSQLMemoryAdapter } from "@voltagent/libsql";
import { createPinoLogger } from "@voltagent/logger";
import { honoServer } from "@voltagent/server-hono";
import { openai } from "@ai-sdk/openai";
import { expenseApprovalWorkflow } from "./workflows";
import { weatherTool } from "./tools";
const logger = createPinoLogger({ name: "my-agent-app", level: "info" });
const memory = new Memory({
storage: new LibSQLMemoryAdapter({ url: "file:./.voltagent/memory.db" }),
});
const agent = new Agent({
name: "my-agent",
instructions: "A helpful assistant that can check weather and help with various tasks",
model: openai("gpt-4o-mini"),
tools: [weatherTool],
memory,
});
new VoltAgent({
agents: { agent },
workflows: { expenseApprovalWorkflow },
server: honoServer(),
logger,
});
Run your project and access the VoltOps Console at https://console.voltagent.dev to interact with your agent.
Example Workflow: Expense Approval
import { createWorkflowChain } from "@voltagent/core";
import { z } from "zod";
export const expenseApprovalWorkflow = createWorkflowChain({
id: "expense-approval",
name: "Expense Approval Workflow",
purpose: "Process expense reports with manager approval for high amounts",
input: z.object({
employeeId: z.string(),
amount: z.number(),
category: z.string(),
description: z.string(),
}),
result: z.object({
status: z.enum(["approved", "rejected"]),
approvedBy: z.string(),
finalAmount: z.number(),
}),
})
.andThen({
id: "check-approval-needed",
resumeSchema: z.object({
approved: z.boolean(),
managerId: z.string(),
comments: z.string().optional(),
adjustedAmount: z.number().optional(),
}),
execute: async ({ data, suspend, resumeData }) => {
if (resumeData) {
return {
...data,
approved: resumeData.approved,
approvedBy: resumeData.managerId,
finalAmount: resumeData.adjustedAmount || data.amount,
};
}
if (data.amount > 500) {
await suspend("Manager approval required", {
employeeId: data.employeeId,
requestedAmount: data.amount,
});
}
return {
...data,
approved: true,
approvedBy: "system",
finalAmount: data.amount,
};
},
})
.andThen({
id: "process-decision",
execute: async ({ data }) => ({
status: data.approved ? "approved" : "rejected",
approvedBy: data.approvedBy,
finalAmount: data.finalAmount,
}),
});
Run this workflow via the VoltOps Console to test human-in-the-loop automation.
Examples & Use Cases
Explore full source code and tutorials for:
- WhatsApp Order Agent (chatbot for food orders)
- YouTube to Blog Agent (convert videos to blog posts)
- AI Ads Generator Agent (Instagram ad creation)
- AI Recipe Generator Agent (personalized cooking suggestions)
- AI Research Assistant Agent (multi-agent research workflows)
Use cases include HR automation, customer support, sales, finance, development assistance, marketing, legal review, insurance claims processing, industrial monitoring, education tutoring, government services, and documentation generation.
Learning Resources
MIT License