Voltagent core reference
Reference for the VoltAgent class: constructor options, lifecycle methods, and runtime behavior.From its SKILL.md
npx -y skills add VoltAgent/skills --skill voltagent-core-referenceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 17 stars17 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.5 KB, 582 tokens by cl100k_base, as published. Nobody here has run it
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:
agents: Record ofAgentinstances to register.workflows: Record ofWorkfloworWorkflowChaininstances.memory: DefaultMemoryused for agents and workflows.agentMemory: DefaultMemoryfor agents (falls back tomemory).workflowMemory: DefaultMemoryfor workflows (falls back tomemory).toolRouting: GlobalToolRoutingConfigdefaults.triggers:VoltAgentTriggersConfighandlers.server: Server provider factory (for examplehonoServer()).serverless: Serverless provider factory for fetch runtimes.voltOpsClient: SharedVoltOpsClientinstance.observability:VoltAgentObservabilityinstance.logger: SharedLoggerinstance.mcpServers: Record of MCP servers or factories.a2aServers: Record of A2A servers or factories.checkDependencies: Set tofalseto skip dependency checks.
Deprecated options:
portautoStartcustomEndpointsenableSwaggerUI
Lifecycle Notes
- Registers agents and workflows on construction.
- Auto-starts the server if a server provider is supplied.
- Applies default memory to agents and workflows.
- Auto-configures VoltOps client from
VOLTAGENT_PUBLIC_KEYandVOLTAGENT_SECRET_KEYif not provided. - Initializes MCP and A2A servers and starts MCP transports after server start.
Methods
registerAgent(agent),registerAgents(agents)registerWorkflow(workflow),registerWorkflows(workflows)registerTrigger(name, config),registerTriggers(triggers)getAgent(id),getAgents(),getAgentCount()getWorkflow(id),getWorkflows(),getWorkflowCount()getObservability()startServer(),stopServer(),getServerInstance()serverless()to access the serverless providershutdown()for graceful shutdown,shutdownTelemetry()for observability
Example
import { VoltAgent } from "@voltagent/core";
import { honoServer } from "@voltagent/server-hono";
const app = new VoltAgent({
agents: { agent },
workflows: { workflow },
server: honoServer(),
});
await app.startServer();