Introducing Veryfront Code

Product
Introducing Veryfront Code article cover.
Koji Wakayama7 min read
Table of Contents

Full-stack AI framework

Veryfront Code is the open source TypeScript and React framework for building AI apps and agents. It gives teams one project structure for agents, apps, skills, knowledge, tools, evals, workflows, schedules, and webhooks, from local development to deployment.

That means less runtime plumbing and more time spent putting agents to work.

The example below follows one customer-operations flow: a customer reports a production support issue, the project searches approved runbooks, the agent triages the request, evals check retrieval and grounding, and the same agent is reused in a workflow, source-defined schedule, webhook, and preview deployment.

You can try the complete customer-operations-agent example on GitHub.

An AI project is a directory

AI projects need a predictable structure for developers and coding agents to follow. Veryfront Code turns routes, chat, knowledge, tools, evals, workflows, triggers, and deployment config into convention-based project files.

Text
customer-operations-agent/  agents/        # agent definitions  skills/        # reusable agent instructions  knowledge/     # approved runbooks  tools/         # deterministic tools  app/           # chat UI and AG-UI route  evals/         # retrieval and grounding checks  workflows/     # repeatable escalation operations  schedules/     # source-defined scheduled runs  webhooks/      # source-defined event runs

Agents own behavior; skills own process; knowledge files own approved reference material; tools own deterministic capabilities; evals own quality checks; and workflows, schedules, and webhooks own repeatable operations. That structure helps teams work efficiently as agents and projects scale.

Define agents as code

An agent is a file in the agents/ folder. It owns instructions, model behavior, tools, skills, memory, and execution limits like any other project primitive.

agents/support-agent.ts
import { agent } from "veryfront/agent"; export default agent({  id: "support-agent",  system:    "You are a customer operations agent for support escalation. You help support teams turn customer issues into clear, evidence-based escalation summaries and next actions.",  skills: ["support-escalation"],  tools: true,  maxSteps: 8,});

Because the agent lives in the same project as the app, changes to its instructions, tools, and model behavior can be reviewed, tested, versioned, and deployed with the rest of the system.

Add skills

Skills turn tacit process knowledge into reviewable files that business users can read and edit. Veryfront Code follows the Agent Skills format: each skill is a skills/<name>/SKILL.md file with frontmatter and instructions.

skills/support-escalation/SKILL.md
---name: support-escalationdescription: Triage customer issues and prepare support escalation summaries.allowed-tools:  - search_knowledge--- # Support Escalation 1. Confirm the customer, workspace, affected users, severity, and exact symptom.2. Use `search_knowledge` for the symptom-specific runbook.3. Separate confirmed facts from assumptions.4. Draft the escalation with owner, evidence, impact, attempted fixes, and next action.

Add knowledge

Knowledge keeps approved reference material out of the system prompt while still making it available to the agent. Veryfront Code stores knowledge as Markdown files with frontmatter, following the same shape as the Open Knowledge Format, so runbooks such as knowledge/login-troubleshooting.md stay readable, reviewable, and agent-ready.

knowledge/login-troubleshooting.md
---title: Login troubleshootingdescription: Resolve sign-in, SSO, workspace, session, identity provider, and account access failures.type: runbook--- # Login troubleshooting Use this when a customer cannot sign in, cannot complete SSO, or reports anaccount access failure. ## Triage checklist - Confirm whether the issue affects one user, one workspace, or all users on the account.- Verify that the user is signing in to the correct workspace.- Ask for the last successful login time, identity provider, browser, and exact error message.

The agent does not need every support rule copied into its system prompt. This follows progressive disclosure and context engineering best practices: keep runbooks small, reviewable, and versioned, then retrieve the right context when the agent needs it.

Give agents typed tools

Tools are server-side functions with schema-backed inputs and outputs. For project knowledge, Veryfront Code provides a standard search_knowledge adapter, so chat, workflows, evals, and deployments all use the same contract.

tools/search-knowledge.ts
import { createSearchKnowledgeTool } from "veryfront/knowledge"; export default createSearchKnowledgeTool();

Agents can also combine project-defined tools with MCP tools for external systems.

Expose the agent over AG-UI

Veryfront Code includes an AG-UI route handler that streams the support agent response from the same project.

app/api/ag-ui/route.ts
import { createAgUiHandler } from "veryfront/agent"; export const POST = createAgUiHandler("support-agent");

Build the UI in React

The React page uses Veryfront chat primitives to stream messages from the AG-UI route.

app/page.tsx
"use client"; import { Chat, useChat } from "veryfront/chat"; export default function ChatPage(): React.JSX.Element {  const chat = useChat();   return (    <Chat      {...chat}      className="flex-1 min-h-0"      placeholder="Ask the support agent..."    />  );}

The chat UI, eval suite, workflow, and triggers all use the same support-agent definition, so they ship as one system instead of drifting apart.

Evaluate the agent

Agent behavior is non-deterministic, so evaluation is critical before it becomes automation. Veryfront Code evals target the same agent definition and check both tool behavior and answer quality.

evals/support-triage.eval.ts
import { datasets, evalAgent, judges, metrics } from "veryfront/eval"; export default evalAgent({  id: "eval:support-triage",  name: "Support triage quality",  target: "agent:support-agent",  dataset: datasets.json("evals/datasets/support-triage.json"),  metrics: [    metrics.agent.calledTool("search_knowledge").gate(),    metrics.agent.noFailedTools().gate(),    metrics.knowledge.recallAtK({ k: 3 }).gate({ min: 0.75 }),    metrics.knowledge.precisionAtK({ k: 3 }).soft({ min: 0.34 }),    metrics.knowledge.mrr({ k: 3 }).soft({ min: 0.5 }),    metrics.answer.groundedness({      judge: judges.llm.groundedness(),    }).gate({ min: 0.8 }),  ],});

Each dataset row declares the expected runbooks, so evals can measure whether the agent called search_knowledge, retrieved the right knowledge, and answered from approved material.

Orchestrate durable work

Not every agent task should live inside a chat turn. Veryfront Code workflows turn customer operations work into durable runs with ordered steps, source knowledge, agent output, logs, and an inspectable record.

workflows/escalate-ticket.ts
import { step, workflow } from "veryfront/workflow"; type EscalationInput = {  customer?: string;  subject?: string;  description?: string;  severity?: string;  priority?: string;}; function buildKnowledgeQuery(input: EscalationInput): string {  return [    input.subject,    input.description,    input.severity,    input.priority,    input.customer,  ]    .filter(Boolean)    .join("\n");} export default workflow({  id: "escalate-ticket",  description: "Triage a customer issue and draft an escalation plan.",  steps: ({ input }: { input: EscalationInput }) => [    step("knowledge", {      tool: "search_knowledge",      input: { query: buildKnowledgeQuery(input) },    }),    step("triage", {      agent: "support-agent",      input: ({ knowledge }) => ({        task: "Triage this customer issue using approved project knowledge.",        issue: input,        approvedKnowledge: knowledge,      }),    }),    step("draft-escalation", {      agent: "support-agent",      input: ({ triage }) => ({        task: "Draft the internal escalation summary with scope, evidence, owner, and next action.",        triage,      }),    }),  ],});

Starting the workflow creates a run. Runs give long-lived work identity, status, events, logs, output, and a production record for the escalation.

Schedule work from source

Scheduled jobs automate recurring agent work, such as daily support triage or periodic account reviews. In Veryfront Code, schedules are source files that can target agents, workflows, or tasks, then run locally or deploy with the rest of the project.

schedules/daily-support-triage.ts
import { schedule } from "veryfront/schedule"; export default schedule({  id: "daily-support-triage",  name: "Daily support triage",  schedule: "0 9 * * 1-5",  timezone: "Europe/Stockholm",  target: { kind: "workflow", id: "escalate-ticket" },  input: {    customer: "Acme Retail",    subject: "Daily review of high-priority support issues",    severity: "medium",  },});

Trigger work from webhooks

Webhooks listen for external events and trigger work when matching events arrive. Like schedules, they are source files that can target agents, workflows, or tasks.

webhooks/customer-escalation.ts
import { webhook } from "veryfront/webhook"; export default webhook({  id: "customer-escalation",  name: "Customer escalation",  target: { kind: "workflow", id: "escalate-ticket" },  eventFilter: {    mode: "any",    conditions: [      { path: "severity", operator: "equals", value: "high" },      { path: "priority", operator: "equals", value: "urgent" },    ],  },});

The workflow, schedule, and webhook all use the same agent and the same search_knowledge tool. In Veryfront Cloud, deployment creates or updates the hosted schedule and webhook from those source files.

Run locally, ship anywhere

Start the app locally, validate the agent, run the automation fixtures, and then sync or deploy the same source tree.

Shell
npm installnpm run dev -- --port 3010
Shell
npm run evalnpm run workflow:runnpm run schedule:runnpm run webhook:run
Shell
npx veryfront push --branch mainnpx veryfront deploy --branch main --env preview

Veryfront Code runs on Node.js, Deno, and Bun. You can self-host it or ship it through the Veryfront platform with preview environments and production hosting.

What this unlocks

Veryfront Code gives teams one framework where:

  • agents, skills, knowledge, tools, evals, workflows, schedules, and webhooks are file-defined
  • developers and coding agents know where each behavior change belongs
  • typed tools connect model behavior to deterministic code
  • evals measure retrieval, grounding, and tool use before automation
  • React, AG-UI, workflows, schedules, webhooks, and deployment share one project model

The point is less runtime plumbing and more time spent putting agents to work.

Getting started

Veryfront Code

Use your existing development environment. Build AI apps and agents with the open source TypeScript and React framework.

Start in Code

Veryfront Studio

Create an agent in the browser. Connect it to your knowledge and tools. Test behavior and deploy it in one flow.

Start in Studio