Skip to main content
You will create a project with one Agent, run its TypeScript check, and receive a model response. Use Node.js 22.18+ within v22 or 24.11+ within v24. The basic template calls OpenAI, so you need an API key and access to the selected model. Prefer an example without provider credentials? Start with the local harness workflow. Already have a TypeScript application? Use the manual quickstart.

Scaffold and install

Run this in the parent directory where you want the new project:
The destination must not already exist. The CLI creates package.json, tsconfig.json, src/index.ts, .gitignore, and a README. The project uses ESM and includes start and typecheck scripts. Scaffolding creates files; it does not run the model.

Configure and verify

In the same terminal:
The type check should exit successfully. Starting the app sends its sample prompt to OpenAI and prints the response, then closes the Agent. Exact wording varies. Keep the key in the server environment; the generated project does not load a .env file automatically. See example model choices if your account uses another model. A type check verifies the program’s types; the successful response verifies this provider connection.

Change one thing

Open src/index.ts. Change the Agent’s instructions and the input passed to run(), then run npm start again. Next, add a lookup tool so the response can depend on application data.

Choose another template

Pass the template to the same init command with a new project name. The voice template is a configuration starting point: running it alone does not connect a microphone. Continue with voice adapters for the media path. The CLI has no harness template in v4; use the harness quickstart.

If setup fails

Continue with the support assistant tutorial, or choose a build path for your own application.