Skip to main content
The flokoa CLI is the primary way to start an agent server outside of your Python code. It lets you run agents locally during development, use them as a container CMD in Kubernetes pods, or test A2A protocol behaviour without writing any server boilerplate. The CLI is installed automatically when you install any flokoa extra.

Installation

flokoa run

flokoa run is the primary command. It imports your agent object, wraps it with the appropriate executor, and starts a FastAPI server that speaks the A2A protocol.

Options

Examples

The default port is 10001 for local development. The convention for containerized deployments is 8080 to align with Kubernetes standards. Pick whichever suits your workflow and keep it consistent with the containerPort value in your Agent CRD.

What flokoa run starts

When you run flokoa run, the CLI does the following:
1

Initialise telemetry

OpenTelemetry tracing is initialised automatically if the tracing extra is installed. If it is not installed, this step is silently skipped.
2

Import the agent

The CLI splits --module on :, imports the left side as a Python module, and retrieves the object named on the right side. It also adds the current working directory to sys.path so relative imports work as expected.
3

Select an executor

Based on --framework, the CLI selects either PydanticAIAgentExecutor or GoogleADKAgentExecutor and wraps your agent object.
4

Build the agent card

The CLI attempts to load an agent card from the running URL. If none is found, AgentCardBuilder auto-generates one from the agent object, describing its capabilities for A2A callers.
5

Start the FastAPI server

A FastAPI application is created using the A2A SDK’s A2AFastAPIApplication. The server includes:
  • The A2A request handler at /
  • /health and /ready endpoints for Kubernetes liveness and readiness probes
  • OpenTelemetry FastAPI instrumentation (if tracing is enabled)
Always pass --host 0.0.0.0 when running inside a container. The default localhost binds only to the loopback interface, which makes the server unreachable from outside the container.

Using with Docker

Use flokoa run as the container CMD to make your agent image self-contained. Install the SDK at build time and let the CLI handle everything else at startup.
Dockerfile
Build and run the image locally to verify the server starts correctly before pushing:

Environment variables

The CLI and executor respect the following environment variables. You can set them in your pod spec using env or envFrom.
Set these in your Kubernetes Agent CR runtime spec to propagate them into the pod:

Agent card

The A2A protocol uses an agent card to describe what an agent can do — its name, description, supported input/output types, and capabilities. Flokoa generates this card automatically from your agent object using AgentCardBuilder when the server starts.
If you need to customise the card — for example to add a specific description or capability list — you can provide a pre-built agent card file at the URL the server checks on startup. When a card is found at that location, AgentCardBuilder is skipped entirely and your custom card is used instead.