Skip to main content

Extension of Google ADK with easily configurable toolsets

Project description

ADK-Lib: Advanced Agent Development Kit

Python 3.10+ License Documentation

ADK-Lib is a powerful, extensible Python library for building AI agents with seamless integration to popular services like Google Workspace, Atlassian, Salesforce, and more. Built on top of Google ADK, it provides simplified configuration, pre-built connectors, and advanced features like tracing and instant learning.

✨ Key Features

  • 🚀 Simplified Agent Creation: Minimal code to create powerful AI agents
  • 🔌 Pre-built Connectors: Ready-to-use integrations for popular services
  • 🔐 Multiple Authentication: HTTP, OAuth2, and Service Account support
  • ☁️ Cloud Deployment: One-click deployment to Vertex AI
  • 📊 Built-in Tracing: Monitor and debug agent interactions
  • 🧠 Instant Learning: Dynamic, contextual knowledge injection
  • 🎯 Type-Safe: Full type hints and validation

🚀 Quick Start

Installation

pip install adk-lib

Create Your First Agent

from adk_lib import Agent, AgentConfig
from adk_lib.toolset.connectors.google import GoogleDriveConnector

# Configure Google Drive access
drive_config = GoogleDriveConnector.create_config(
    config_vars={"GOOGLE_ACCESS_TOKEN": "your_token_here"}
)

# Create agent configuration
agent_config = AgentConfig(
    name="my_assistant",
    model="gemini-2.0-flash-001",
    instruction="Help users manage their Google Drive files"
)

# Initialize the agent
agent_interface = Agent(agent_config, {"drive": drive_config})
agent = agent_interface.get_agent()

# Use the agent
response = agent.generate_content("List my recent Google Drive files")
print(response.text)

📋 Table of Contents

🛠 Quick Examples

Multi-Service Agent

from adk_lib import Agent, AgentConfig
from adk_lib.toolset.connectors import (
    GoogleDriveConnector, 
    GoogleCalendarConnector,
    JiraConnector
)

# Configure multiple services
toolsets = {
    "drive": GoogleDriveConnector.create_config(),
    "calendar": GoogleCalendarConnector.create_config(),
    "jira": JiraConnector.create_config(
        config_vars={"ATLASSIAN_CLOUD_ID": "your_cloud_id"}
    )
}

# Create multi-service agent
agent_config = AgentConfig(
    name="productivity_assistant",
    instruction="Help manage files, calendar, and project tasks"
)

agent = Agent(agent_config, toolsets).get_agent()

Custom Authentication

from adk_lib.auth import OAuth2Manager
from adk_lib.toolset.utils.types import BaseToolSetConfig
from adk_lib.toolset.utils.enums import ToolsetType

# OAuth2 authentication
auth_manager = OAuth2Manager(
    service="google",
    client_id="your_client_id",
    client_secret="your_client_secret",
    scopes=["https://www.googleapis.com/auth/drive"]
)

# Custom toolset configuration
custom_config = BaseToolSetConfig(
    name="custom_service",
    toolset_type=ToolsetType.OPENAPI_TOOLSET,
    auth_credential=auth_manager.get_auth_credential(),
    auth_scheme=auth_manager.get_auth_scheme()
)

🔌 Supported Services

Service Status Connector Auth Types
Google Workspace GoogleDriveConnector, GoogleCalendarConnector, GoogleGmailConnector HTTP, OAuth2
Atlassian JiraConnector, ConfluenceConnector HTTP, OAuth2
Salesforce SalesforceConnector, SalesforceAppIntegrationConnector HTTP, OAuth2
Microsoft 365 🚧 Coming Soon OAuth2

🔐 Authentication

ADK-Lib supports multiple authentication methods:

HTTP Bearer Token

from adk_lib.auth import HttpAuthManager

auth = HttpAuthManager(
    service="google",
    auth_token="your_bearer_token"
)

OAuth2

from adk_lib.auth import OAuth2Manager

auth = OAuth2Manager(
    service="google",
    client_id="your_client_id",
    client_secret="your_client_secret"
)

Service Account

from adk_lib.auth import ServiceAccountAuthManager

auth = ServiceAccountAuthManager(
    service_account_dict={"type": "service_account", ...},
    scopes=["scope1", "scope2"]
)

☁️ Deployment

Vertex AI Deployment

from adk_lib.deploy import VertexAIDeployment, create_vertexai_config

# Create deployment configuration
config = create_vertexai_config(
    project_id="your-project",
    deployment_name="my-agent",
    requirements=["adk-lib"],
    enable_tracing=True
)

# Deploy to Vertex AI
deployment = VertexAIDeployment(agent, config)
resource_id = deployment.deploy()

🔬 Advanced Features

Tracing & Monitoring

agent_config = AgentConfig(
    name="traced_agent",
    trace=True,
    trace_url="https://your-trace-dashboard.com",
    assistant_name="my_assistant"
)

Instant Learning

agent_config = AgentConfig(
    name="learning_agent",
    instant_learning_url="https://your-il-api.com",
    prompt_instant_learning=True,
    prompt_instant_learning_config={
        "topic_tables": "knowledge_base",
        "embedding_model": "text-embedding-ada-002"
    }
)

Custom Toolsets

from adk_lib.toolset.categories import OpenAPILibToolset
from adk_lib.toolset.utils.configs import SpecConfig, SpecType

custom_config = BaseToolSetConfig(
    name="custom_api",
    toolset_type=ToolsetType.OPENAPI_TOOLSET,
    spec_config=SpecConfig(
        spec_type=SpecType.URL,
        spec_source="https://api.example.com/openapi.json"
    )
)

📚 Documentation

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/your-org/adk-lib.git
cd adk-lib

# Install with development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
flake8 adk_lib/
black adk_lib/

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

🗺️ Roadmap

  • Microsoft 365 connectors
  • Enhanced error handling and validation
  • Performance optimizations
  • Additional deployment targets (AWS, Azure)
  • Advanced monitoring and analytics

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

adk_lib-1.3.0.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

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

adk_lib-1.3.0-py3-none-any.whl (98.1 kB view details)

Uploaded Python 3

File details

Details for the file adk_lib-1.3.0.tar.gz.

File metadata

  • Download URL: adk_lib-1.3.0.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Darwin/25.2.0

File hashes

Hashes for adk_lib-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a6284c8b350081b4f7962b83fc103b053c38d9b37c22c8e6b352257c2c4b6021
MD5 91fe72727bdf4bc540b52ab81823a1a0
BLAKE2b-256 1b48c3317055f15261eae3d61987a6bee478b08d5cdebb8d1352ea8fa465d9b6

See more details on using hashes here.

File details

Details for the file adk_lib-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: adk_lib-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 98.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.0 Darwin/25.2.0

File hashes

Hashes for adk_lib-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d54036a167cbfaa04f7b3765655c4d5930c24d17193d817ff955d6639c39aff
MD5 7b0cb19d16e688e855ec654adf5f0dc8
BLAKE2b-256 1abeb188eb9ce72159c3204d5c237d945d719be39097e673d68297e22d9ceae9

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