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.2.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.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for adk_session_services-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cd156af1ae86da3a0e0e22b7107418c5ba027b892401d91341128ddaf5c09a80
MD5 cb6d8ff0bc25706ea9aead063e11e0b7
BLAKE2b-256 6a7a267b60a6c91fb0defa907904abb47e640b5b77c4c9a52d526e793eea9ae5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adk_session_services-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f0174b9d535594916f52641fe864b75a72651ecfa268e0bc315689b37869ebb
MD5 ca344cac84e39b5326bacee1409f1241
BLAKE2b-256 1f8f72a657321b4df4d19ff0b00976b28fd0cad7cfbf5410bf84c0210c29423d

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