Catalog PyPI
PACKAGE EXPLORERView in registry

adktools

PyPI

Utilities for building Agent Development Kit (ADK) applications

adkagentaigoogletools
Versions collected1
Direct dependencies3From release 0.1.2
Last observed20 Oct, 19:37 UTC

README

Version 0.1.2 documentation

ADK Tools

PyPI version License: MIT

A collection of utilities and patterns for building agents with Google's Agent Development Kit (ADK).

Installation

pip install adktools

Features

  • @adk_tool decorator: Standardize your ADK tools with consistent error handling and response formatting
  • Domain error models: Create rich, domain-specific error types that automatically convert to standard responses
  • Tool discovery: Automatically find all tool functions in your modules
  • Response utilities: Standardized success and error response generation
  • Type safety: Comprehensive typing support for better IDE integration

Quick Start

Basic Tool Creation

from adktools import adk_tool
from pydantic import BaseModel

class WeatherResult(BaseModel):
    location: str
    temperature: float
    conditions: str

@adk_tool
def get_weather(location: str) -> WeatherResult:
    """Get current weather for a location."""
    # Your implementation here
    return WeatherResult(
        location=location,
        temperature=72.5,
        conditions="Sunny"
    )

Domain-Specific Error Handling

from adktools import adk_tool
from adktools.models import DomainError
from typing import Literal, Union
from pydantic import BaseModel

class TimeResult(BaseModel):
    timezone: str
    datetime: str
    is_dst: bool

class InvalidTimezoneError(DomainError):
    timezone: str
    error_type: Literal["invalid_timezone"] = "invalid_timezone"

@adk_tool(
    name="get_time",
    description="Get the current time in a specified timezone."
)
def get_current_time(timezone: str) -> Union[TimeResult, InvalidTimezoneError]:
    try:
        # Implementation...
        if timezone == "invalid":
            return InvalidTimezoneError(
                timezone=timezone,
                error_message=f"Unknown timezone: {timezone}"
            )
        
        return TimeResult(
            timezone=timezone,
            datetime="2025-04-12T12:34:56",
            is_dst=True
        )
    except Exception as e:
        # The decorator will catch and format any exceptions
        raise RuntimeError(f"Error getting time: {str(e)}")

Tool Discovery

from adktools import discover_adk_tools
from google.adk.agents import Agent

# Import your modules containing tools
import myagent.weather_tools
import myagent.time_tools

# Create an agent with auto-discovered tools
agent = Agent(
    name="my_assistant",
    description="A helpful assistant",
    tools=discover_adk_tools(myagent.weather_tools)
)

# Or discover tools across multiple modules
all_tools = discover_adk_tools_in_modules([
    myagent.weather_tools,
    myagent.time_tools
])

Documentation

The @adk_tool Decorator

The decorator standardizes ADK tool responses and provides additional metadata for tools:

@adk_tool  # Simple usage
def simple_tool(param: str):
    # Implementation...

@adk_tool(
    name="custom_name",  # Override function name
    description="Custom description",  # Override docstring
    detailed_errors=True  # Include stack traces in errors
)
def custom_tool(param: str):
    # Implementation...

Response Models

ADK Tools provides standardized response models:

from adktools.models import ErrorResponse, SuccessResponse, DomainError

# Success response
success = SuccessResponse(result={"key": "value"})
# Or without data
empty_success = SuccessResponse()  # result is optional

# Error response
error = ErrorResponse(error_message="Something went wrong")

# Domain-specific error base class
class MyCustomError(DomainError):
    error_type: Literal["custom_error"] = "custom_error"
    error_message: str  # Matches ErrorResponse field name
    additional_field: str

Helper Functions

from adktools import success_response, error_response

# Create success response dictionary
response = success_response({"data": "value"})
# {"status": "success", "result": {"data": "value"}}

# Create success response without data
empty_response = success_response()
# {"status": "success"}

# Create error response dictionary
response = error_response("Something went wrong")
# {"status": "error", "error_message": "Something went wrong"}

Response Format

By default, ADK Tools uses the following standardized response formats:

Success Response

{
  "status": "success",
  "result": { ... } // Optional result data
}

Error Response

{
  "status": "error",
  "error_message": "Description of what went wrong"
}

This consistent response format makes it easy for agents to handle tool responses predictably.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Downloads & popularity

1downloads
1-day window · source-reported counts20 Oct 2026
24120
2026-07-23: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-07-23–2026-07-232026-07-24: 15 · observed 2026-10-21T10:21:14.8928397Z · period 2026-07-24–2026-07-242026-07-27: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-07-27–2026-07-272026-07-28: 8 · observed 2026-10-21T10:21:14.8928397Z · period 2026-07-28–2026-07-282026-07-29: 8 · observed 2026-10-21T10:21:14.8928397Z · period 2026-07-29–2026-07-292026-07-30: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-07-30–2026-07-302026-07-31: 4 · observed 2026-10-21T10:21:14.8928397Z · period 2026-07-31–2026-07-312026-08-01: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-02–2026-08-022026-08-03: 4 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-03–2026-08-032026-08-04: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-04–2026-08-042026-08-05: 24 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-05–2026-08-052026-08-06: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-06–2026-08-062026-08-07: 10 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-07–2026-08-072026-08-08: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-08–2026-08-082026-08-09: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-09–2026-08-092026-08-10: 18 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-10–2026-08-102026-08-13: 4 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-13–2026-08-132026-08-14: 10 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-14–2026-08-142026-08-16: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-16–2026-08-162026-08-17: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-17–2026-08-172026-08-18: 15 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-18–2026-08-182026-08-20: 11 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-20–2026-08-202026-08-21: 10 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-21–2026-08-212026-08-23: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-23–2026-08-232026-08-24: 18 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-24–2026-08-242026-08-25: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-25–2026-08-252026-08-26: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-26–2026-08-262026-08-28: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-28–2026-08-282026-08-30: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-30–2026-08-302026-08-31: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-08-31–2026-08-312026-09-01: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-01–2026-09-012026-09-03: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-03–2026-09-032026-09-05: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-05–2026-09-052026-09-07: 5 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-07–2026-09-072026-09-08: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-08–2026-09-082026-09-09: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-09–2026-09-092026-09-10: 7 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-10–2026-09-102026-09-11: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-11–2026-09-112026-09-12: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-12–2026-09-122026-09-15: 8 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-15–2026-09-152026-09-16: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-16–2026-09-162026-09-17: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-17–2026-09-172026-09-21: 4 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-21–2026-09-212026-09-22: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-22–2026-09-222026-09-23: 5 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-23–2026-09-232026-09-24: 5 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-24–2026-09-242026-09-25: 6 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-25–2026-09-252026-09-26: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-26–2026-09-262026-09-27: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-27–2026-09-272026-09-28: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-28–2026-09-282026-09-29: 4 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-29–2026-09-292026-09-30: 8 · observed 2026-10-21T10:21:14.8928397Z · period 2026-09-30–2026-09-302026-10-01: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-01–2026-10-012026-10-03: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-03–2026-10-032026-10-05: 4 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-05–2026-10-052026-10-06: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-06–2026-10-062026-10-07: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-07–2026-10-072026-10-08: 4 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-08–2026-10-082026-10-09: 5 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-09–2026-10-092026-10-10: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-10–2026-10-102026-10-11: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-11–2026-10-112026-10-12: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-12–2026-10-122026-10-13: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-13–2026-10-132026-10-14: 3 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-14–2026-10-142026-10-15: 14 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-15–2026-10-152026-10-16: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-16–2026-10-162026-10-17: 2 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-17–2026-10-172026-10-20: 1 · observed 2026-10-21T10:21:14.8928397Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 69 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2012026-10-21T10:21:14.8928397Z
2026-10-17 – 2026-10-1722026-10-21T10:21:14.8928397Z
2026-10-16 – 2026-10-1612026-10-21T10:21:14.8928397Z
2026-10-15 – 2026-10-15142026-10-21T10:21:14.8928397Z
2026-10-14 – 2026-10-1432026-10-21T10:21:14.8928397Z
2026-10-13 – 2026-10-1332026-10-21T10:21:14.8928397Z
2026-10-12 – 2026-10-1212026-10-21T10:21:14.8928397Z
2026-10-11 – 2026-10-1122026-10-21T10:21:14.8928397Z
2026-10-10 – 2026-10-1022026-10-21T10:21:14.8928397Z
2026-10-09 – 2026-10-0952026-10-21T10:21:14.8928397Z
2026-10-08 – 2026-10-0842026-10-21T10:21:14.8928397Z
2026-10-07 – 2026-10-0722026-10-21T10:21:14.8928397Z
2026-10-06 – 2026-10-0622026-10-21T10:21:14.8928397Z
2026-10-05 – 2026-10-0542026-10-21T10:21:14.8928397Z
2026-10-03 – 2026-10-0312026-10-21T10:21:14.8928397Z
2026-10-01 – 2026-10-0122026-10-21T10:21:14.8928397Z
2026-09-30 – 2026-09-3082026-10-21T10:21:14.8928397Z
2026-09-29 – 2026-09-2942026-10-21T10:21:14.8928397Z
2026-09-28 – 2026-09-2822026-10-21T10:21:14.8928397Z
2026-09-27 – 2026-09-2722026-10-21T10:21:14.8928397Z
2026-09-26 – 2026-09-2612026-10-21T10:21:14.8928397Z
2026-09-25 – 2026-09-2562026-10-21T10:21:14.8928397Z
2026-09-24 – 2026-09-2452026-10-21T10:21:14.8928397Z
2026-09-23 – 2026-09-2352026-10-21T10:21:14.8928397Z
2026-09-22 – 2026-09-2232026-10-21T10:21:14.8928397Z
2026-09-21 – 2026-09-2142026-10-21T10:21:14.8928397Z
2026-09-17 – 2026-09-1732026-10-21T10:21:14.8928397Z
2026-09-16 – 2026-09-1622026-10-21T10:21:14.8928397Z
2026-09-15 – 2026-09-1582026-10-21T10:21:14.8928397Z
2026-09-12 – 2026-09-1212026-10-21T10:21:14.8928397Z
2026-09-11 – 2026-09-1132026-10-21T10:21:14.8928397Z
2026-09-10 – 2026-09-1072026-10-21T10:21:14.8928397Z
2026-09-09 – 2026-09-0912026-10-21T10:21:14.8928397Z
2026-09-08 – 2026-09-0832026-10-21T10:21:14.8928397Z
2026-09-07 – 2026-09-0752026-10-21T10:21:14.8928397Z
2026-09-05 – 2026-09-0522026-10-21T10:21:14.8928397Z
2026-09-03 – 2026-09-0312026-10-21T10:21:14.8928397Z
2026-09-01 – 2026-09-0112026-10-21T10:21:14.8928397Z
2026-08-31 – 2026-08-3132026-10-21T10:21:14.8928397Z
2026-08-30 – 2026-08-3022026-10-21T10:21:14.8928397Z
2026-08-28 – 2026-08-2822026-10-21T10:21:14.8928397Z
2026-08-26 – 2026-08-2612026-10-21T10:21:14.8928397Z
2026-08-25 – 2026-08-2512026-10-21T10:21:14.8928397Z
2026-08-24 – 2026-08-24182026-10-21T10:21:14.8928397Z
2026-08-23 – 2026-08-2332026-10-21T10:21:14.8928397Z
2026-08-21 – 2026-08-21102026-10-21T10:21:14.8928397Z
2026-08-20 – 2026-08-20112026-10-21T10:21:14.8928397Z
2026-08-18 – 2026-08-18152026-10-21T10:21:14.8928397Z
2026-08-17 – 2026-08-1722026-10-21T10:21:14.8928397Z
2026-08-16 – 2026-08-1622026-10-21T10:21:14.8928397Z
2026-08-14 – 2026-08-14102026-10-21T10:21:14.8928397Z
2026-08-13 – 2026-08-1342026-10-21T10:21:14.8928397Z
2026-08-10 – 2026-08-10182026-10-21T10:21:14.8928397Z
2026-08-09 – 2026-08-0922026-10-21T10:21:14.8928397Z
2026-08-08 – 2026-08-0822026-10-21T10:21:14.8928397Z
2026-08-07 – 2026-08-07102026-10-21T10:21:14.8928397Z
2026-08-06 – 2026-08-0622026-10-21T10:21:14.8928397Z
2026-08-05 – 2026-08-05242026-10-21T10:21:14.8928397Z
2026-08-04 – 2026-08-0422026-10-21T10:21:14.8928397Z
2026-08-03 – 2026-08-0342026-10-21T10:21:14.8928397Z
2026-08-02 – 2026-08-0212026-10-21T10:21:14.8928397Z
2026-08-01 – 2026-08-0112026-10-21T10:21:14.8928397Z
2026-07-31 – 2026-07-3142026-10-21T10:21:14.8928397Z
2026-07-30 – 2026-07-3022026-10-21T10:21:14.8928397Z
2026-07-29 – 2026-07-2982026-10-21T10:21:14.8928397Z
2026-07-28 – 2026-07-2882026-10-21T10:21:14.8928397Z
2026-07-27 – 2026-07-2722026-10-21T10:21:14.8928397Z
2026-07-24 – 2026-07-24152026-10-21T10:21:14.8928397Z
2026-07-23 – 2026-07-2322026-10-21T10:21:14.8928397Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.212 Apr 20253

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
chrishayuk/adktools

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:281664aca93632ced001a1be4d98713bc64a965524d4b7fbb9d5088a42cef772