Skip to content

Reference

Configuration

Nuxt module options, defineNuxtAgentic, the Void plugin, defineVoidAgentic and environment variables.

Nuxt module options

Set under agentic in nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  extends: ['@nuxtagentic-pro/nuxt'],
  agentic: {
    dashboard: { path: '/app' },
    features: { localRuntimes: false },
  },
})
OptionDefaultDescription
basePath'/api/agentic'Mount path of the Agentic API
dashboard.path'/dashboard'Mount path of the dashboard
features{}Switch optional features off; see Features
modelsDir'server/models'Agentic Models, scanned in the app and every layer
toolsDir'server/tools'defineAgentTool tools
agentsDir'server/agents'Markdown agents
automationsDir'server/automations'defineAutomation templates
integrationsDir'server/integrations'defineIntegration integrations
configFile'server/agentic'The optional defineNuxtAgentic module
cron'*/5 * * * *'Schedule of the maintenance pass
localRuntimestrueLocal Codex CLI and Claude Code runtimes in nuxt dev; false or { binaries, environment }
localMcptrueLet agentic mcp connect coding agents to nuxt dev
route'/api/_agentic'Prefix of the free module's useAgent() endpoint

Keep basePath at /api/agentic when you use the dashboard: the dashboard and the layer composables call that path. Local runtimes and local MCP only run while the dev server listens on localhost and are never part of a build.

defineNuxtAgentic

server/agentic.ts configures what is not discovered from files:

server/agentic.ts
export default defineNuxtAgentic({
  auth: {
    socialProviders: {
      github: {
        clientId: process.env.GITHUB_CLIENT_ID!,
        clientSecret: process.env.GITHUB_CLIENT_SECRET!,
      },
    },
  },
})
OptionDescription
authbetter-auth options such as socialProviders, plugins and plugin tables; database and secret come from the app
featuresExtra features from defineFeature, registered after the built-in ones
modelsExtra Agentic Models registered in code
toolsExtra tools registered in code
integrationsExtra integrations registered in code
updateRecordTrusted outcome adapter for tables that are not Agentic Models; see Outcomes

Void plugin

vite.config.ts
plugins: [...(await voidAgentic({ server: 'src/agentic.ts' })), vue(), voidPlugin()]
OptionDefaultDescription
serverModule that default-exports defineVoidAgentic(...)
localRuntimestrueLocal Codex CLI and Claude Code runtimes in vite dev
localMcptrueLet agentic mcp connect coding agents to vite dev
schematrueGenerate db/schema.ts; disable only when you compose it yourself
authtrueGenerate the auth config; disable only when you compose withAgenticAuth
maintenancetrueAdd the maintenance cron; disable only when you run runVoidMaintenance yourself
uitrueInstall the Nuxt UI Vite plugin

defineVoidAgentic

src/agentic.ts defines the backend for the API, crons and Durable Objects:

OptionDescription
modelsAgentic Models
toolsdefineAgentTool tools
integrationsdefineIntegration integrations
featuresThe feature list; defaults to defaultFeatures()
eventsEvent handler; see Events
updateRecordTrusted outcome adapter
basePathMount path of the API, default /api/agentic
dashboardPathMount path of the dashboard, default /dashboard
openapititle, version and description of the OpenAPI document

Environment variables

Set these in .env for development and as Worker secrets in production.

VariableDescription
BETTER_AUTH_SECRETRequired. Signs sessions
BETTER_AUTH_URLThe app's public URL, required in production (Nuxt)
AGENTIC_ENCRYPTION_KEYRequired. 32 bytes, base64; encrypts integration credentials
OPENAI_API_KEYProvider key for OpenAI agents
ANTHROPIC_API_KEYProvider key for Anthropic agents
GOOGLE_AI_API_KEYProvider key for Google agents
AGENTIC_DECISION_PROVIDERPrompt planner: typesafeAI (default) or openAI
AGENTIC_DECISION_MODELPrompt planner model override
TYPESAFE_API_KEYKey for the typesafeAI planner
AGENTIC_<PROVIDER>_CLIENT_ID, AGENTIC_<PROVIDER>_CLIENT_SECRETOAuth app for an integration provider, such as AGENTIC_GOOGLE_CLIENT_ID
AGENTIC_WEBHOOK_ORIGINSComma-separated HTTPS origins that webhook outcomes may call
AGENTIC_MCP_ORIGINSComma-separated HTTPS origins of allowed MCP servers
AGENTIC_MCP_AUTH_ORIGINSMCP authorization servers on another origin
AGENTIC_MCP_CLIENTSJSON map of MCP server URL to pre-registered OAuth client
AGENTIC_RUN_RETENTION_DAYSArchive finished agent and automation runs after N days; 0 (default) keeps them
AGENTIC_APPROVAL_RETENTION_DAYSArchive answered approvals after N days; 0 (default) keeps them
AGENTIC_RECEIPT_RETENTION_DAYSRemove automation delivery receipts after N days; default 1
AGENTIC_IMAGE_RETENTION_DAYSDelete unused profile images and logos after N days; 0 (default) keeps them

Retention values are whole days from 0 to 3650.