Escape the limitations of no-code builders and the complexity of starting from scratch.
VoltAgent is an open-source TypeScript framework for creating and managing AI agents. It provides modular components to build, customize, and scale agents with ease. From connecting to APIs and memory management to supporting multiple LLMs, VoltAgent simplifies the process of creating sophisticated AI systems. It enables fast development, maintains clean code, and offers flexibility to switch between models and tools without vendor lock-in.
Create a new VoltAgent project in seconds using the create-voltagent-app
CLI tool:
npm create voltagent-app@latest
This command guides you through setup.
You'll see the starter code in src/index.ts
, which now registers both an agent and a comprehensive workflow example found in src/workflows/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";
// Create a logger instance
const logger = createPinoLogger({
name: "my-agent-app",
level: "info",
});
// Optional persistent memory (remove to use default in-memory)
const memory = new Memory({
storage: new LibSQLMemoryAdapter({ url: "file:./.voltagent/memory.db" }),
});
// A simple, general-purpose agent for the project.
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,
});
// Initialize VoltAgent with your agent(s) and workflow(s)
new VoltAgent({
agents: {
agent,
},
workflows: {
expenseApprovalWorkflow,
},
server: honoServer(),
logger,
});
Afterwards, navigate to your project and run:
npm run dev
When you run the dev command, tsx will compile and run your code. You should see the VoltAgent server startup message in your terminal:
══════════════════════════════════════════════════
VOLTAGENT SERVER STARTED SUCCESSFULLY
══════════════════════════════════════════════════
✓ HTTP Server: http://localhost:3141
Test your agents with VoltOps Console: https://console.voltagent.dev
══════════════════════════════════════════════════
Your agent is now running! To interact with it:
- Open the Console: Click the VoltOps LLM Observability Platform link in your terminal output (or copy-paste it into your browser).
- Find Your Agent: On the VoltOps LLM Observability Platform page, you should see your agent listed (e.g., "my-agent").
- Open Agent Details: Click on your agent's name.
- Start Chatting: On the agent detail page, click the chat icon in the bottom right corner to open the chat window.
- Send a Message: Type a message like "Hello" and press Enter.