CLI Workflow
This example walks through the CLI with a core project (@kernova/core, created by kernova init). For full-stack apps with a frontend, start with npx create-kernova-app instead and see the framework CLI reference.
Prerequisites
- Node.js 22+ — download from nodejs.org
- npm (comes with Node.js)
- An API key for a model provider (for example
OPENAI_API_KEY), or a local model server
node --version # v22.0.0 or higherInstall the Kernova CLI
npm install -g @kernova/clikernova --version# kernova v1.2.0Or run it without installing: npx @kernova/cli <command>.
1. Create a project
kernova init my-support-bot → Creating Kernova project: my-support-bot → Created .agent.yaml — starter agent configuration ✓ Project created at ./my-support-bot
→ Next steps: cd my-support-bot npm install kernova dev2. Explore the generated project
my-support-bot/├── .agent.yaml # starter agent config file (used by `kernova serve`)├── kernova.config.json # project name, environment, default model├── package.json├── tsconfig.json└── src/ ├── main.ts # starts a kernel, registers the agent, submits an intent └── agents/ └── assistant.ts # defineAgent() examplesrc/main.ts registers the agent and runs one intent:
import { KernovaKernel } from '@kernova/core';import assistant from './agents/assistant.js';
const kernel = new KernovaKernel({ environment: 'development', debug: true });kernel.agentRegistry.register(assistant.definition, assistant.executor);await kernel.start();
const result = await kernel.submit({ goal: 'Hello, Kernova!', intentType: 'query', priority: 'medium' });console.log('Result:', result.result?.summary);await kernel.stop();.agent.yaml is a declarative agent with a schedule:
name: my-assistantinstructions: | You are a helpful assistant powered by Kernova. Help users with their tasks and answer questions clearly.# model: gpt-4o # optional; default: the model of the first provider with an API keytools: - http-fetch - date-timeschedules: - name: hourly-check cron: "0 * * * *" goal: "Check for pending tasks and process them"Install and run the entry point:
npm installnpm run dev# Kernova runtime started.# Result: Processed: Hello, Kernova!3. Create agents
kernova agent create escalation-handler# ✓ Agent "escalation-handler" created at src/agents/escalation-handler.ts
kernova agent list# Registered Agents:# ──────────────────# ◆ assistant# ◆ escalation-handlerRegister new agents in src/main.ts the same way as assistant.
4. Run in development mode
kernova dev loads the agents in src/agents/, reloads them when files change, and starts the development dashboard:
→ Starting legacy kernova runtime for "my-support-bot"... ✓ Agent 'assistant' loaded (178ms) ✓ Agent 'escalation-handler' loaded (4ms) → Watching: src/agents → Studio: http://localhost:4200
✓ kernova runtime is running Agents: 25. Run agent config files with the daemon
Agent config files (*.agent.yaml, *.agent.yml, *.agent.json) describe agents, schedules, and triggers without code:
mkdir -p agentscat > agents/support-bot.agent.yaml << 'EOF'name: support-botinstructions: | You are a customer support agent. Handle billing and account questions.tools: - http-fetch - date-timeschedules: - name: daily-summary cron: "0 9 * * *" goal: "Generate daily support summary"triggers: - name: on-escalation event: "intent.failed" goal: "Escalate unresolved issue to human"EOF
kernova serve --config ./agents/ --watch → Starting kernova daemon... → Config: ./agents/ → Watch mode: enabled ✓ Daemon is running. Press Ctrl+C to stop.With --watch, edits to the files are picked up without a restart. Add --port 3000 to also serve the HTTP gateway (it needs KERNOVA_API_KEY), which Studio connects to.
6. Manage scheduled jobs
kernova schedule list Scheduled Jobs (1) ID Name Cron/Delay Enabled Next Execution job_97cda2fb-91… support-bot:daily-sum… 0 9 * * * yes 2026-11-04T09:00:00.000ZEnable or disable a job by name, full ID, or ID prefix:
kernova schedule disable support-bot:daily-summary# ✓ Job "support-bot:daily-summary" (job_97cda2fb-91cb-4849-a96d-1a0802483635) disabled.kernova schedule enable job_97cda2fb7. Monitor the task queue
kernova queue status Task Queue Status ═════════════════ Pending: 0 Active: 0 Completed: 0 Failed: 0 Dead-lettered: 0Replay a dead-lettered task with kernova queue replay <task-id>.
8. Inspect trigger rules
kernova triggers list Trigger Rules (1) ID Name Pattern Enabled Cooldown Last Fired trigger_e7d4b… support-bot:on-esca… intent.failed yes 1.0s neverkernova triggers disable support-bot:on-escalation# → Trigger rule "support-bot:on-escalation" (trigger_e7d4b858-…) disabled.kernova triggers enable trigger_e7d4b9. Check project status
kernova status Kernova Project Status ════════════════════════ Name: my-support-bot Version: 0.1.0 Environment: development Model: openai/gpt-4o
Runtime ───────── Daemon: Running (last heartbeat: 12s ago) Agents: 3 defined (from files) Schedules: 1 total (1 enabled) Task Queue: 0 pending, 0 active Triggers: 1 rules (1 enabled)kernova status, schedule, queue, and triggers read the data directory directly: --data-dir <path>, or $KERNOVA_DATA_DIR, or ./kernova-data.
10. Deploy with Docker
kernova deploy docker ✓ Generated Dockerfile ✓ Generated .dockerignore
→ Build and run: docker build -t my-support-bot . docker run --env-file .env my-support-botFor a core project the Dockerfile builds with your build script and runs npm start, so your start script decides what runs. To run the agent config files as a service, add @kernova/cli to your dependencies and use:
"start": "kernova serve --config ./agents --port 3000 --host 0.0.0.0"Set KERNOVA_API_KEY in the container’s environment: the gateway refuses to start without a token.
11. Production monitoring
Point the inspection commands at the production data directory:
export KERNOVA_DATA_DIR=/var/lib/kernovakernova statuskernova schedule listkernova queue statuskernova triggers listThat’s the lifecycle from kernova init to production. See the CLI reference for every command and option.