AgentSessionManager.Adapters.CompositeSessionStore (AgentSessionManager v0.8.0)

Copy Markdown View Source

Combines a SessionStore and an ArtifactStore into a single unified interface.

The CompositeSessionStore delegates session/run/event operations to the configured SessionStore backend and artifact operations to the configured ArtifactStore backend.

Usage

{:ok, session_store} = EctoSessionStore.start_link(repo: MyApp.Repo)
{:ok, s3} = S3ArtifactStore.start_link(bucket: "artifacts")

{:ok, store} = CompositeSessionStore.start_link(
  session_store: session_store,
  artifact_store: s3
)

# Session operations delegate to SessionStore
:ok = SessionStore.save_session(store, session)

# Artifact operations delegate to S3
:ok = ArtifactStore.put(store, "key", data)

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)