Skip to main content
This example runs locally without a provider key or external service. It produces a result and a versioned event stream so you can see the runtime contract before adding a model.

Install

Use Node.js ^22.18.0 or ^24.11.0. Install the matching core and harness packages and a TypeScript runner:
This example targets Agentium 4.0.0. Use matching versions of core and harness; see local-build installation when developing against SDK source.

Run a local driver

Save this as hello-harness.ts:
hello-harness.ts
Expected output:
The runtime acquires the scoped session, calls the driver, commits its history, releases run resources, and emits one terminal event. result() returns the same settled result on subsequent calls. The empty array means session-resource cleanup produced no diagnostics.

Connect an Agent and source context

This complete alternative uses a provider and therefore makes a model call. Install its optional SDK:
research.ts
Expect a completed answer about shipping delays; model wording varies. research() supplies context but does not browse the web or grant tools. Passing configuration to agentDriver() creates a run-owned Agent and closes it after the run. Next, configure grants and budgets, compose abilities, or consume events in a UI. For a larger working example, build the research assistant, continue a conversation across runs, or review workspace files.