Quickstart
Get your first Noukai flow running in minutes.
Get up and running with the Noukai SDK in under 5 minutes.
Installation
Authentication
You need a Noukai API key to authenticate. Obtain one from Noukai Console, then set it as an environment variable:
Or pass it directly to the client:
Your first flow execution
This example executes a spelling-grade flow with a single message. The recommended pattern is to set org and project defaults when constructing the client, so you only need to provide the flow slug.
Local development? Set env: "dev" (Python: env="dev") to connect to http://localhost:8080/api/v1 instead of production. See Local development setup below.
The flow runs to completion and returns an ExecuteResult with the final output.
Iterate step-by-step
Instead of waiting for the entire flow, iterate over steps as they complete:
Each iteration yields a StepCompleted event with the step ID and its output.
Get a trace
After execution, inspect step-by-step timing and cost. Note that cost_usd / costUsd is a decimal string (e.g. "0.001234") — parse it before formatting as a float.
Local development setup
If you're running Noukai locally (e.g., on http://localhost:8080), pass env: "dev" when creating the client:
Or set the NOUKAI_ENV environment variable:
Next steps
- Streaming execution: See Step-by-step iteration
- Tool calls deep dive: See Tool calls
- Execution tracing: See Tracing & debugging
- Error handling: See Errors & retries
Using Python? You can also use the sync API without async/await. See Async vs Sync.