Skip to main content

A Python package providing additional service implementations for the Google ADK framework (Redis, etc)

Project description

adk-session-services

Session service implementations for Google's Agent Development Kit (ADK). Provides persistent session storage backends as drop-in replacements for ADK's BaseSessionService.

Features

  • Redis — Persistent session storage via Redis with support for app-level and user-level state layering.
  • Firestore — (Planned) Persistent session storage via Google Cloud Firestore.

Installation

pip install adk-session-services

Quick Start

Redis

from adk_session_services.redis_session import RedisSessionService

service = RedisSessionService("redis://localhost:6379")

session = await service.create_session(
    app_name="my-app",
    user_id="user-123",
)

Redis Key Schema

All keys are prefixed with adk:sessions::

Key pattern Type Purpose
{app}:{user}:{session}:meta Hash Session metadata
{app}:{user}:{session}:state String (JSON) Session state dict
{app}:{user}:{session}:events List (JSON) Ordered event log
{app}:{user}:sessions Set Session IDs per user/app
{app}:app_state Hash App-level state (shared across users)
{app}:{user}:user_state Hash User-level state (shared across sessions)

Development

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

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

# Run tests
pytest

# Format
black src/ && isort src/

# Type check
mypy src/

License

MIT

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_session_services-0.1.4.tar.gz (235.2 kB view details)

Uploaded Source

Built Distribution

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

adk_session_services-0.1.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file adk_session_services-0.1.4.tar.gz.

File metadata

  • Download URL: adk_session_services-0.1.4.tar.gz
  • Upload date:
  • Size: 235.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for adk_session_services-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6ad0ad43cfeeea5ab474c999ce9c0c5bf6abd1c591180b95efe82352b551d984
MD5 b80363c53ce11235dce454a2385f3d26
BLAKE2b-256 ed2e6c01065bba39d52e3b4ad19c074458b413258355ef5bb01ddb1022221b1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for adk_session_services-0.1.4.tar.gz:

Publisher: release.yml on tiyee/adk-session-services

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file adk_session_services-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for adk_session_services-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f0464b5163957463e4e384f9690d4d11de07cee6c5a272e39c6b62d26e1856c
MD5 1e91e8527d8574ee815b2b9d8e611383
BLAKE2b-256 18b091591e1a1f0c31db3eb836fa0d7d7079a1ddce46afb2e746e9f29dda38b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for adk_session_services-0.1.4-py3-none-any.whl:

Publisher: release.yml on tiyee/adk-session-services

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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