Skip to main content
The Flokoa Python SDK (flokoa) is the runtime bridge between your AI agent code and the Flokoa Kubernetes operator. It provides framework integrations for pydantic-ai and Google ADK, an A2A protocol server, OpenTelemetry tracing, and a CLI runner — everything you need to package an agent into a container that the Flokoa operator can deploy, scale, and connect to tools declaratively.

Installation

Install flokoa from PyPI with the extra that matches your agent framework. Python 3.13 or later is required.
pip install "flokoa[pydantic-ai]"

Key components

PydanticAIAgentExecutor

Wraps a pydantic-ai Agent and exposes it via the A2A protocol. Provides automatic tool injection, TTL-based config caching, and OpenAPI toolset support.

GoogleADKAgentExecutor

Wraps a Google ADK LlmAgent and exposes it via the A2A protocol. Manages ADK sessions automatically and injects Flokoa-managed tools at runtime.

flokoa run CLI

Start an A2A-compliant FastAPI server from the command line. Designed for local development and as the container entrypoint in Kubernetes pods.

OpenTelemetry tracing

Automatic instrumentation of the FastAPI server and pydantic-ai model calls. Install the tracing extra and set OTEL_ENDPOINT to enable it.

How it works

1

Build your agent

Write an agent using pydantic-ai or Google ADK, exactly as you would without Flokoa. The SDK does not require any special base classes.
2

Wrap it with a Flokoa executor

flokoa run automatically selects the right executor (PydanticAIAgentExecutor or GoogleADKAgentExecutor) and starts an A2A-compatible FastAPI server around your agent.
3

Containerize and push

Package your agent and its dependencies into a container image. Use flokoa run as the CMD so the operator can start the server when the pod starts.
4

Deploy with the Flokoa operator

Apply an Agent CRD to your cluster. The operator manages deployment, scaling, and health checking. Tools defined as AgentTool CRDs are mounted as files and automatically injected at runtime — no code changes needed.
The SDK is responsible for running your agent inside a container. The Kubernetes operator handles deployment, scaling, service discovery, and tool injection. You do not need to interact with the operator directly when building agent code.