adk-lib 1.3.0
Extension of Google ADK with easily configurable toolsets
Requires Python: <4.0,>=3.10

# ADK-Lib: Advanced Agent Development Kit

[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](docs/)

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

```bash
pip install adk-lib
```

### Create Your First Agent

```python
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

- [Installation](#installation)
- [Quick Examples](#quick-examples)
- [Supported Services](#supported-services)
- [Authentication](#authentication)
- [Deployment](#deployment)
- [Advanced Features](#advanced-features)
- [Documentation](#documentation)
- [Contributing](#contributing)

## 🛠 Quick Examples

### Multi-Service Agent

```python
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

```python
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
```python
from adk_lib.auth import HttpAuthManager

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

### OAuth2
```python
from adk_lib.auth import OAuth2Manager

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

### Service Account
```python
from adk_lib.auth import ServiceAccountAuthManager

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

## ☁️ Deployment

### Vertex AI Deployment

```python
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

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

### Instant Learning

```python
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

```python
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

- **[User Guide](docs/user-guide/)**: Comprehensive tutorials and guides
- **[API Reference](docs/api-reference/)**: Detailed API documentation
- **[Examples](examples/)**: Complete example projects
- **[Contributing](docs/contributing/)**: Development and contribution guidelines

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guide](docs/contributing/development-setup.md) for details.

### Development Setup

```bash
# 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](LICENSE) file for details.

## 🆘 Support

- **Documentation**: [docs/](docs/)
- **Issues**: [GitHub Issues](https://github.com/Techolution/adk-library/issues)
- **Discussions**: [GitHub Discussions](https://github.com/Techolution/adk-library/discussions)

## 🗺️ Roadmap

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

---