Migrate from 0.13
Replace the Hono + agent.run() starter with the 0.15 Agents SDK and SQLite Runtime.
This hop replaces the 0.13 Hono + agent.run() + AG-UI starter. Upgrade the
compatibility set together. After you reach 0.15,
continue with 0.15 → 0.17.
Historical mentions of Agent from Harness, agent.run(), new Runtime(),
serveAgents, --agent-url, AG-UI, Node 22.19, and memory-by-default storage
belong on this page only. They are not the current default path.
- Require Node 24.
- Author with
import { Agent, tool } from "@nylorun/agents". Exportagentsfromagents/index.ts. Removeagent.run(). - Install
@nylorun/clifornylorun configure,dev,serve, andstudio. The binary is no longer owned by Runtime. (0.15 docs saidnylorun start; that command is removed in 0.17 — useserve.) - Delete the generated Hono
src/index.ts,new Runtime(),serveAgents, andopenSessionusage. Compiled start loadsdist/agents/index.js. - Point Studio at the Runtime origin (
http://127.0.0.1:8787). Remove AG-UI and--agent-urlmount paths. Default Runtime port is8787, not3000. - Import explicit engine execution from
@nylorun/harness/run(run,bindingFromAgent,RunBinding,createRunState,runDurable). - Prefer tool
input/output/run. Keepeffectsandapprovaloff the manifest. - On 0.15, durable definitions used the old hook names. 0.17 replaces
them with
before("turn"|"step")andafter("step"|"turn"). See 0.15 → 0.17. - Treat
.nylorun/runtime.sqliteas the local store. OldSessionRecord/events.jsonlroots are not converted. Start new sessions after definition changes.
Custom backends use createClient (trusted ownerUserId, content,
idempotency keys) and connectAgents with scoped executor credentials.
Update an existing generated project (0.4 env / exported-app)
These steps applied to the 0.13 Hono starter. They are not sufficient for 0.15 — continue with the section above, or generate a new project.
- Back up any existing
.env/directory and leftoverconfig/model.jsonoutside the project. Translatemodel.jsonfieldsprovider,model, andcustom.baseUrlintoMODEL_PROVIDER,MODEL, andMODEL_PROVIDER_BASE_URL. Copy API keys intoMODEL_PROVIDER_API_KEYor provider-native variables. ReplaceNYLO_CUSTOM_API_KEYwithMODEL_PROVIDER_API_KEY. Mergeintegrations.envinto.env. Move OAuth records into.nylorun/auth.json. - Add
.env,.env.local, and.nylorun/to.gitignore. Remove old.env/exceptions. - On 0.13 only: replace
serve(...)withexport default appand set"dev": "nylorun dev". On 0.15 the entrypoint is theagentsregistry, not a Hono default export.
0.13 / 0.5 execution migration
Historical hop from the session-object API to
await agent.run({ input, state }), info instead of scope, capability
catalogs, and @nylorun/runtime/node adapters. That surface is not the
current application path: definitions no longer expose run(), and the
starter no longer constructs new Runtime(). Keep this section only if you
are reading old 0.13 code.
- Replace
agent.run()session objects withawait agent.run({ input, state, ... })(0.13 hosts). Statuses arecompleted,paused,cancelled, andfailed. - Move
scopeanduserId/contexttoinfoonrun(), or RuntimegetInfo. - Move
outputSchemaontoAgent({ ... }). There is no per-input schema. - Remove capability
statefactories. Create and close resources in the application. - Import Node adapters from leftover 0.13 hosts only. They are not the current starter path.
- Treat old session journals as archive.
SessionRecord/events.jsonlare notExecutionStateand are not auto-replayed.
Pre-1.0 stability
APIs can change before 1.0. Machine-readable error codes and documented record shapes are the safest integration points, but upgrades should still be validated end to end.