skills/voltagent-best-practices/SKILL.md
VoltAgent architectural patterns and conventions. Covers agents vs workflows, project layout, memory, servers, and observability.
npx skillsauth add VoltAgent/skills voltagent-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Quick reference for VoltAgent conventions and patterns.
| Use | When | | --- | --- | | Agent | Open-ended tasks that require tool selection and adaptive reasoning | | Workflow | Multi-step pipelines with explicit control flow and suspend/resume |
src/
|-- index.ts
|-- agents/
|-- tools/
`-- workflows/
import { Agent } from "@voltagent/core";
const agent = new Agent({
name: "assistant",
instructions: "You are helpful.",
model: "openai/gpt-4o-mini",
});
Model format is provider/model (for example openai/gpt-4o-mini or anthropic/claude-3-5-sonnet).
import { createWorkflowChain } from "@voltagent/core";
import { z } from "zod";
const workflow = createWorkflowChain({
id: "example",
input: z.object({ text: z.string() }),
result: z.object({ summary: z.string() }),
}).andThen({
id: "summarize",
execute: async ({ data }) => ({ summary: data.text }),
});
import { VoltAgent } from "@voltagent/core";
import { honoServer } from "@voltagent/server-hono";
new VoltAgent({
agents: { agent },
workflows: { workflow },
server: honoServer(),
});
memory for a shared default across agents and workflows.agentMemory or workflowMemory when defaults need to differ.@voltagent/server-hono for Node HTTP servers.@voltagent/server-elysia as an alternative Node server provider.serverless provider for fetch runtimes (Cloudflare, Netlify).VoltOpsClient or createVoltAgentObservability for tracing.VOLTAGENT_PUBLIC_KEY and VOLTAGENT_SECRET_KEY are set.Short best-practice recipes live in the embedded docs:
packages/core/docs/recipes/rg -n "keyword" packages/core/docs/recipes -g"*.md"cat packages/core/docs/recipes/<file>.mdJSON.stringify inside VoltAgent packages. Use safeStringify from @voltagent/internal.development
Look up VoltAgent documentation embedded in node_modules/@voltagent/core/docs for version-matched docs. Use for API signatures, guides, and examples.
data-ai
--- name: voltagent-core-reference # prettier-ignore description: Reference for the VoltAgent class: constructor options, lifecycle methods, and runtime behavior. license: MIT metadata: author: VoltAgent version: "1.0.0" repository: https://github.com/VoltAgent/skills --- # VoltAgent Core Reference Reference for the VoltAgent class in `@voltagent/core`. Source files: - packages/core/src/voltagent.ts - packages/core/src/types.ts --- ## Options Overview `VoltAgentOptions` supports: -
tools
Skill for creating AI agent projects using the VoltAgent framework. Guide for CLI setup and manual bootstrapping.
data-ai
Example TaskFlow authoring pattern for inbox triage. Use when messages need different treatment based on intent, with some routes notifying immediately, some waiting on outside answers, and others rolling into a later summary.