ADK Plugin: Agent
Overview
Section titled “Overview”FlotorchADKAgent
is the main entry point for creating ADK-compatible agents that integrate with FloTorch’s Gateway. It fetches agent configurations, builds tools, and provides a proxy that supports config synchronization.
from flotorch.adk.agent import FlotorchADKAgent
API_KEY = "<your_api_key>"BASE_URL = "https://gateway.flotorch.cloud"AGENT_NAME = "<your_agent_name>"
FlotorchADKAgent
Section titled “FlotorchADKAgent”FlotorchADKAgent( agent_name: str, # agent name configured in console enable_memory: bool = False, custom_tools: list = None, base_url: str = None, api_key: str = None,)
Creates an agent manager that fetches configuration from FloTorch Gateway and builds an ADK-compatible agent.
get_agent() -> LlmAgent
Section titled “get_agent() -> LlmAgent”Returns a FloTorch agent (ADK-compatible) with automatic config synchronization.
Features
Section titled “Features”Config Synchronization
Section titled “Config Synchronization”The agent automatically reloads its configuration from FloTorch Gateway based on the syncEnabled
and syncInterval
settings in the agent config.
Tool Integration
Section titled “Tool Integration”- Memory Tools: Set
enable_memory=True
to automatically include FloTorch Memory tools (preload/search) so the agent can read/write memories via your configured provider. This uses the FloTorch Memory SDK under the hood; ensure a Memory Provider is configured in your Console and see the plugin docs here: FloTorch ADK: Memory. - Custom Tools: User-defined tools passed via
custom_tools
Usage Example
Section titled “Usage Example”# Create agent manageragent_manager = FlotorchADKAgent( agent_name="customer-support", custom_tools=[my_custom_tool])
# Get the ADK agentagent = agent_manager.get_agent()
# Use with ADK Runnerfrom google.adk.runner import Runnerrunner = Runner(agent=agent)
- Agent configuration must exist in FloTorch Console