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.3.tar.gz (235.1 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.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: adk_session_services-0.1.3.tar.gz
  • Upload date:
  • Size: 235.1 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.3.tar.gz
Algorithm Hash digest
SHA256 517cd714804f4b7c5b1a4460a5137def4376db636e3df5c0e8d2288d1a05eacc
MD5 011444ce9faf39b4afbd4c23743069b4
BLAKE2b-256 bb01294e56690dd021917bf1f0554025718be07cb6b6f7969d0431a0a8599019

See more details on using hashes here.

Provenance

The following attestation bundles were made for adk_session_services-0.1.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for adk_session_services-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 78315feb16e60164344e8b28c18c3dc69032cb379b10e57ac6e351b5c321fdc3
MD5 2c23febffa67afe21ff0754c62e13602
BLAKE2b-256 1cb67b74a20016c8ee4cc1c457247d52df22267bad00c7a76a22190982c5bb34

See more details on using hashes here.

Provenance

The following attestation bundles were made for adk_session_services-0.1.3-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