NylorunDocsBeta
Get startedBuildRunDeployReferenceMore

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 0600

agents/index.ts exports a non-empty agents array. Despite the historical name, the registry can contain both agents and workflows.

agents/index.ts
import { assistant } from "./assistant/agent.js";

export const agents = [assistant];
src/main.ts
import { connectAgents } from "@nylorun/agents";
import { agents } from "../agents/index.js";

await connectAgents({ agents }).ready;

Scripts

ScriptCommandRole
devnylorun devLink a Tenant, watch the registry, connect its executor, and open Hosted Studio.
studionylorun-studioAttach Studio to the linked Tenant without starting the application.
buildcopy non-TypeScript assets and run tscProduce dist/agents/ and dist/src/main.js.
startnode dist/src/main.jsConnect the compiled registry to a supplied or linked Runtime connection.
checktsc --noEmitTypecheck 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

LocationContentsCommit?
Project .nylorun/link.jsonHost and Tenant identity.No
Project .nylorun/credentials.jsonApplication principal and key.No
Host root (NYLORUN_HOME or ~/.nylorun)Host settings, Tenant databases, vault keys, logs, and sandboxes.No
.envOptional 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.

On this page