Skip to content

Latest commit

 

History

History
 
 

README.md

Agent Control Examples

This directory contains runnable examples for the main Agent Control integration patterns.

Commands below assume you are starting from the repo root unless noted otherwise.

Quick Start

  1. Start the local Agent Control server:
make server-run
  1. Set the server URL:
export AGENT_CONTROL_URL=http://localhost:8000
  1. Set the model API key required by the example you want to run:
    • GOOGLE_API_KEY for Google ADK examples
    • OPENAI_API_KEY for LangChain, CrewAI, and steer-action examples
    • GALILEO_API_KEY for the Galileo Luna-2 example

Recommended Starting Points

Google ADK Callbacks (google_adk_callbacks/)

Canonical Google ADK integration using ADK callback hooks for model and tool checks.

cd examples/google_adk_callbacks
uv pip install -e . --upgrade
uv run python setup_controls.py
uv run adk run my_agent

Google ADK Decorator (google_adk_decorator/)

Google ADK integration using Agent Control's @control() decorator for tool protection.

cd examples/google_adk_decorator
uv pip install -e . --upgrade
uv run python setup_controls.py
uv run adk run my_agent

Optional sdk-local execution for the decorator example:

cd examples/google_adk_decorator
uv run python setup_controls.py --execution sdk
uv run adk run my_agent

Agent Control Demo (agent_control_demo/)

Small end-to-end demo of creating controls, running a protected agent, and updating controls dynamically.

uv run python examples/agent_control_demo/setup_controls.py
uv run python examples/agent_control_demo/demo_agent.py
uv run python examples/agent_control_demo/update_controls.py --allow-ssn
uv run python examples/agent_control_demo/update_controls.py --block-ssn

Additional Examples

Notes

  • Example-specific setup lives in each example directory README.
  • The Google ADK callback example is server-only by design.
  • The Google ADK decorator example includes the optional execution="sdk" setup path for local evaluation.