Before you start: This guide is only for upgrading from v0.6 to v0.8.Check your current runtime version in
package.json:Quick Summary
v0.8 introduces async graph execution and required runtime cleanup. Breaking changes:graph.start()is now async - addawaitstopInworldRuntime()must be called before app termination
Migration Steps
Step 1: Update Graph Execution (Breaking)
graph.start() now returns Promise<ExecutionResult> instead of ExecutionResult.
- Add
awaitbefore allgraph.start()calls - Ensure the calling function is
async
Step 2: Add Runtime Cleanup (Breaking)
You must now callstopInworldRuntime() before your application terminates.
- Import
stopInworldRuntimefrom@inworld/runtime - Call
await stopInworldRuntime()before process exit - In Express/server apps, call it in shutdown handlers
Step 3: Test Your Migration
Run your application and verify:- All
graph.start()calls work withawait stopInworldRuntime()is called on shutdown- No runtime errors or warnings
Getting Help
If you encounter issues:- Review the Runtime Reference for API details
- Email support@inworld.ai