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
| Option | Short | Required | Default | Description |
|---|---|---|---|---|
--module | -m | ✅ | — | Module path to the agent object, e.g. my_module:my_agent |
--framework | — | ✅ | — | Framework to use: pydantic-ai or google-adk |
--host | — | — | localhost | Host address to bind the server to |
--port | — | — | 10001 | Port to bind the server to |
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:
Initialise telemetry
OpenTelemetry tracing is initialised automatically if the
tracing extra is installed. If it is not installed, this step is silently skipped.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.Select an executor
Based on
--framework, the CLI selects either PydanticAIAgentExecutor or GoogleADKAgentExecutor and wraps your agent object.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.Using with Docker
Useflokoa 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
Environment variables
The CLI and executor respect the following environment variables. You can set them in your pod spec usingenv or envFrom.
- Server
- OpenTelemetry
| Variable | Description |
|---|---|
FLOKOA_CACHE_TTL_SECONDS | TTL in seconds for cached tool definitions and model config (default: 60) |
FLOKOA_CACHE_ENABLED | Set to false to disable caching entirely (default: true) |
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 usingAgentCardBuilder when the server starts.
AgentCardBuilder is skipped entirely and your custom card is used instead.