Getting Started

Build a typed AI agent in 60 seconds. Then generate the LangGraph artifacts LangSmith consumes with one command. Dawn is file-system routing for agents — no registry, no hand-written tool schemas, no glue.

By the end of this guide you'll have a typed agent at /hello/[tenant] that greets a user by name, running locally, ready to deploy.

1. Install

bash
pnpm create dawn-ai-app my-agent
cd my-agent
pnpm install

Requires Node.js 22.12 or later.

2. Set your API key

The scaffolded agent() route uses OpenAI through Dawn's LangChain adapter. Export an OpenAI API key before running it:

OpenAI
export OPENAI_API_KEY=sk-...

3. What you got

Three files. The folder path is the agent endpoint — no registration step.

import { z } from "zod"
 
// Route state. Provide tenant in the route input when invoking /hello/[tenant].
export default z.object({
  question: z.string().default(""),
})

Tools under tools/ are bound to the agent at build time — the LLM picks when to call them. The route's shape is whatever index.ts default-exports: agent, workflow, graph, or chain.

4. Run it

bash
dawn dev

In another shell:

bash
echo '{"tenant":"acme"}' | dawn run '/hello/[tenant]' --url http://127.0.0.1:<port>

The dev server exposes LangSmith-style /runs/wait and /runs/stream endpoints, so local clients can use the same request envelope before you build deployment artifacts.

5. Ship it

bash
dawn build

This walks the routes declared via dawn.config.ts, runs typegen, and writes .dawn/build/langgraph.json plus per-route entry files under .dawn/build/<routeSlug>.ts. The generated assistant_ids match the local ids, such as /hello/[tenant]#agent.

Where to go next