Project structure
Understand the generated application, scripts, Project link, and Host-owned data.
Creator writes an ordinary TypeScript application. Definitions live under
agents/; src/main.ts is the production entry that connects them to a
Runtime Tenant.
my-agent/
agents/
assistant/agent.ts
index.ts
src/
main.ts
package.json
tsconfig.json
.env.example
.nylorun/ # created when the Project is linked
link.json # Host URL, Host id, Tenant id
credentials.json # application credential; mode 0600agents/index.ts exports a non-empty agents array. Despite the historical
name, the registry can contain both agents and workflows.
import { assistant } from "./assistant/agent.js";
export const agents = [assistant];import { connectAgents } from "@nylorun/agents";
import { agents } from "../agents/index.js";
await connectAgents({ agents }).ready;Scripts
| Script | Command | Role |
|---|---|---|
dev | nylorun dev | Link a Tenant, watch the registry, connect its executor, and open Hosted Studio. |
studio | nylorun-studio | Attach Studio to the linked Tenant without starting the application. |
build | copy non-TypeScript assets and run tsc | Produce dist/agents/ and dist/src/main.js. |
start | node dist/src/main.js | Connect the compiled registry to a supplied or linked Runtime connection. |
check | tsc --noEmit | Typecheck without emitting files. |
@nylorun/agents and zod are production dependencies. @nylorun/cli,
@nylorun/studio, TypeScript, and tsx are development dependencies. Install
@nylorun/runtime globally, or as a Project development dependency when you
want to pin it. The CLI's package.json#nylorun.runtime records the recommended
version and produces the matching install command; the CLI never downloads it.
State and configuration
| Location | Contents | Commit? |
|---|---|---|
Project .nylorun/link.json | Host and Tenant identity. | No |
Project .nylorun/credentials.json | Application principal and key. | No |
Host root (NYLORUN_HOME or ~/.nylorun) | Host settings, Tenant databases, vault keys, logs, and sandboxes. | No |
.env | Optional one-time model seed and application configuration. | No |
The Project directory no longer contains Runtime SQLite, pid, logs, or vault
data. Deleting its .nylorun/ link does not delete the Tenant; relink with
nylorun dev or choose one with nylorun tenant use.
For a non-interactive deployment, provide NYLORUN_RUNTIME_URL,
NYLORUN_SERVER_KEY, and NYLORUN_TENANT. Never commit either .env or
.nylorun/.
Next step
Run the Project with Runtime, or learn how connection resolution works in Clients.