Your project
Understand the generated application, its scripts, and where state lives.
npm create @nylorun/agent writes an ordinary TypeScript application.
Agents live under agents/; src/main.ts connects them to the Runtime.
my-agent/
agents/
assistant/agent.ts # the Order assistant and its lookup_order tool
index.ts # exports every agent and workflow
src/main.ts # connectAgents({ agents })
package.json
tsconfig.json
.env.example
.nylorun/
.gitignore # contains *
link.json # Runtime URL, Host id, Tenant id
credentials.json # application key; mode 0600import { connectAgents } from "@nylorun/agents";
import { agents } from "../agents/index.js";
await connectAgents({ agents }).ready;This process is your executor. connectAgents registers the agents with
the Tenant, then waits for the Runtime to ask it to run a tool. Your tools
always run here, in your code, with your dependencies. It does not serve HTTP;
to put agents in front of people, add an
app server.
Scripts
| Script | Command | Role |
|---|---|---|
dev | tsx watch --env-file-if-exists=.env src/main.ts | Watch and reconnect the application. |
build | copy assets and run tsc | Produce dist/agents/ and dist/src/main.js. |
start | node dist/src/main.js | Connect the compiled application. |
check | tsc --noEmit | Typecheck without emitting files. |
Production dependencies are @nylorun/agents and zod. Development
dependencies are tsx, typescript, and @types/node. The project does not
install the CLI, Studio, or Runtime; run them with npx.
Where state lives
| Location | Contents | Commit? |
|---|---|---|
Project .nylorun/ | Tenant link and application key. | No |
Host root (NYLORUN_HOME or ~/.nylorun) | host.json, host-credentials.json, stack/, and Tenant files. | No |
| Docker volumes | Postgres schemas, S2 streams, Restate state, and workspaces. | No |
.env | One-time model seed and application configuration. | No |
Sessions and history live in the Runtime's Docker volumes, not in your
project. Deleting .nylorun/ unlinks the project without deleting its Tenant;
run nylo tenant create or nylo tenant use to link again.
Outside your machine, replace the link with three environment variables:
NYLORUN_RUNTIME_URL, NYLORUN_SERVER_KEY, and NYLORUN_TENANT. See
App server.