Skip to main content
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.

Installation

Install the Genkit CLI globally:
Verify the installation:

Starting the Developer UI

The genkit start command launches both your application and the Dev UI. Pass your application’s start command after --:
Genkit sets 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:
To open the browser automatically on startup:
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:

Running flows from the CLI

Use genkit 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

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:
Each span shows:
  • 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.
To view a trace, click on any flow run in the Traces panel. You can drill into nested spans to see exactly what each model call received and produced.

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 when GENKIT_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.
You do not interact with the Reflection API directly during normal development — the CLI and Dev UI use it under the hood. It is only started in dev mode and should not be exposed in production.
Do not expose the Reflection API in production. It provides unrestricted access to run any registered action without authentication. Set GENKIT_ENV=prod or remove the environment variable when deploying.

Options and flags

genkit start options

genkit flow:run options

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, set GENKIT_ENV=dev before running your binary:
The Dev UI will connect to the Reflection API server started by the SDK regardless of which language you use.

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.