Skip to main content

Handlebar AI governance for Google-ADK agents

Project description

Handlebar for google-adk

Add Handlebar runtime checks, controls and governance into the Google ADK. This package provides a HandlebarRunner wrapper around the default Runner class, to provide agent governance in a single-line code change. The Handlebar runner collects audit logs of your agents' runs, tool and model use, and enforces rules around agent behaviour you've configured on the Handlebar platform.

Note: This package in early development and the interface is subject to change.

Features

Short-term roadmap:

  • Rule engine for allow/block tools, based on:
    • user category
    • rule category
  • Tool ordering + execution time checks
  • custom checks for rules (numeric tracking; boolean evaluation)
  • Audit telemetry + consumers
  • Agent lockdown + human-in-the-loop actions

Roadmap

Handlebar is in early development. We have a lot of functionality planned, but need your feedback on what you need to help you build better agents.

Getting started

Install the package in your codebase

pip install handlebar_google_adk

The package provides a runner, HandlebarRunner, which is a drop-in replacement for the default google-adk Runner class

- from google.adk.runners import Runner;
+ from handlebar_google_adk import HandlebarRunner;

- runner = Runner(
+ runner = HandlebarRunner(
    agent=agent,
    app_name=handlebar_app_name,
    session_service=session_service,
+   handlebar_api_key=handlebar_api_key,
)

On the Handlebar platform create an api key for your org and ensure you've set the environment variable in your codebase as HANDLEBAR_API_KEY=<your api key>

By default, the Handlebar runner enforces no governance rules, but does collect agent telemetry which can be exported to analyse your agent's behaviour. You can configure rules on tool use and behaviour for Handlebar to enforce at runtime on the platform

Audit logs

The Handlebar runner collects audit logs for key events in the lifetime of an agent run, such as tool usage and agent rule evaluations (see below for more on Handlebar rules). With your Handlebar API key configured, the platform will automatically ingest the logs created by the runner, which you can view on the dashboard.

Contributing

We welcome contributions from the community: bug reports, feedback, feature requests. Please refer to [CONTRIBUTING.md][root_contributing] for ways you can help, and guidelines.

About Handlebar

Find out more at https://gethandlebar.com

Project details


Download files

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

Source Distribution

handlebar_google_adk-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

handlebar_google_adk-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file handlebar_google_adk-0.1.0.tar.gz.

File metadata

File hashes

Hashes for handlebar_google_adk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53d1010090d63a41ff343dd02bb9a04cacd5c5e7b1c29bf4842c21340542553f
MD5 00fc65fcaaee9e7cd315dc427262f819
BLAKE2b-256 5366098915af4507ee9e78a2e11cc5987656e6dfe39a24a33ba20e3d9e9d2523

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for handlebar_google_adk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4d10844b0f5bdd44fe5c6434923f4c83e592f980989c5b9e30cbf8d7790ca1d
MD5 33a27207a3e398c8de63ffe55ea26d7c
BLAKE2b-256 14e70e386c70c95a8d7f96a2db9bade548e5bbb002bffd15e18b2a49742d1137

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