Genkit ships with a CLI and a local Developer UI that make it easy to iterate on flows, prompts, models, and evaluations without deploying. Every flow run, model call, and tool invocation is traced and viewable in real time.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/genkit-ai/genkit/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install the Genkit CLI globally:Starting the Developer UI
Thegenkit start command launches both your application and the Dev UI. Pass your application’s start command after --:
- TypeScript (tsx)
- TypeScript (ts-node)
- Node.js (compiled)
- Python
- Go
GENKIT_ENV=dev for you, which tells your application to start the Reflection API server on port 3100. The Dev UI then connects to this server.
The Dev UI opens at http://localhost:4000 by default. Use --port to change the port:
You can start the Dev UI without running your application by calling
genkit start without the -- separator. This is useful if you already have your app running in a separate process.What the Dev UI shows
The Developer UI is divided into several sections:| Section | Description |
|---|---|
| Flows | List of all registered flows. Run them interactively with custom inputs. |
| Models | All registered models. Send test prompts directly to any model. |
| Prompts | Dotprompt files and programmatic prompts. Test with variable inputs. |
| Tools | Registered tools. Inspect their schemas and call them manually. |
| Traces | Full execution trace for every flow run, including all sub-steps. |
| Evaluate | View and compare evaluation run results. |
Running flows from the CLI
Usegenkit flow:run to invoke a flow by name with a JSON input:
The app must be running in dev mode (started with
genkit start) for flow:run to work. It connects to the Reflection API to trigger the flow.Key CLI commands
| Command | Description |
|---|---|
genkit start | Start the Dev UI and optionally launch your app. |
genkit start -- <cmd> | Launch your app in dev mode and start the Dev UI. |
genkit flow:run <name> [data] | Run a registered flow by name. |
genkit eval:run <dataset> | Run a dataset through all registered evaluators. |
genkit eval:run <dataset> --evaluators <list> | Run with specific evaluators only. |
genkit eval:run <dataset> --output <file> | Save evaluation results to a file. |
genkit --help | List all available commands. |
Inspecting traces
Every flow execution produces a trace — a hierarchical record of all steps taken. Traces are visible in the Traces section of the Dev UI. A trace for a typical flow looks like:- Name — the step or action name.
- Duration — how long it took.
- Input / Output — the data passed in and returned.
- Error — any exception thrown at that step.
- Metadata — model, tokens used, finish reason, etc.
Running evaluations with the CLI
See the Evaluation guide for dataset format and evaluator definitions. To trigger a run:The Reflection API
The Dev UI communicates with your running application through the Reflection API — a lightweight HTTP server that Genkit automatically starts whenGENKIT_ENV=dev is set. It runs on port 3100 by default.
The Reflection API provides endpoints to:
- List actions — Enumerate all registered flows, models, prompts, tools, and evaluators.
- Run actions — Trigger any registered action with arbitrary input.
- Stream actions — Stream the output of a flow or generate call.
- List traces — Retrieve stored trace data.
Options and flags
genkit start options
| Flag | Description |
|---|---|
--noui | Start your app in dev mode without launching the Dev UI. |
--port <port> | Port for the Dev UI (default: finds an open port in 4000–4099). |
--open | Open the browser automatically when the Dev UI starts. |
--disable-realtime-telemetry | Disable real-time telemetry streaming to the UI. |
--cors-origin <origin> | Allowed origin for CORS requests to the Dev UI. |
genkit flow:run options
| Flag | Description |
|---|---|
--stream | Stream output chunks as they are produced. |
--output <file> | Write the flow output to a JSON file. |
--context <JSON> | JSON object passed as the action context (e.g., auth data). |
--wait | Wait for the flow to complete before exiting. |
Python and Go support
The CLI works with Python and Go applications that use Genkit. The Reflection API is implemented in all SDKs. For Go, setGENKIT_ENV=dev before running your binary:
Flows
Learn about the flows that appear in the Dev UI.
Evaluation
Run and interpret eval results in the Dev UI.
Deployment
Move from dev mode to production deployment.
Observability
Export traces to Cloud Trace, Jaeger, and other backends.
