Skip to main content

Fluent builder API for Google's Agent Development Kit (ADK)

Project description

adk-fluent

Fluent builder API for Google's Agent Development Kit (ADK). Reduces agent creation from 22+ lines to 1-3 lines while maintaining full ADK compatibility.

Install

pip install adk-fluent

Quick Start

from adk_fluent import Agent, Pipeline, FanOut

# Simple agent
agent = Agent("helper", "gemini-2.0-flash").instruct("You are a helpful assistant.").build()

# Pipeline (sequential workflow)
pipeline = (
    Pipeline("research")
    .step(Agent("searcher", "gemini-2.0-flash").instruct("Search for information."))
    .step(Agent("writer", "gemini-2.0-flash").instruct("Write a summary."))
    .build()
)

# Fan-out (parallel workflow)
fanout = (
    FanOut("parallel-research")
    .branch(Agent("analyst-1", "gemini-2.0-flash"))
    .branch(Agent("analyst-2", "gemini-2.0-flash"))
    .build()
)

How It Works

adk-fluent is auto-generated from the installed ADK package:

  1. Scanner introspects all ADK modules and produces manifest.json
  2. Seed Generator classifies classes and produces seed.toml
  3. Code Generator emits fluent builders, type stubs, and test scaffolds

This means adk-fluent automatically stays in sync with ADK updates.

# Regenerate after ADK upgrade
just all

Features

  • Fluent chaining: .instruct(), .tool(), .before_model(), etc.
  • Full IDE autocomplete via .pyi type stubs
  • Zero-maintenance __getattr__ forwarding for any ADK field
  • Callback accumulation (multiple .before_model() calls append, not replace)
  • Builder renames for ergonomics: Agent, Pipeline, FanOut, Loop
  • 130+ builders covering agents, tools, configs, services, plugins, planners, executors

Development

# Setup
uv venv .venv && source .venv/bin/activate
uv pip install google-adk pytest pyright

# Full pipeline
just all

# Run tests
just test

# Type check
just typecheck

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adk_fluent-0.1.0-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

Details for the file adk_fluent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: adk_fluent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for adk_fluent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1347dc8b06c7ae786600c25c790339810f9770e8222566519918ccfb34a2b37
MD5 4f7031b63140a7700d543c94f507060b
BLAKE2b-256 a32fb370efe36fd04720aeddffa1a6ec8ab4a19824914c44eea2271f7ae63470

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page