Python Guides

These guides walk through an incremental Python integration path for LangChain/LangGraph developers:

  • Start from a minimal working chat app
  • Turn on memory-service features one by one
  • Keep code changes small and explicit using checkpoint-based diffs

Each guide references runnable checkpoints under python/examples/langchain/doc-checkpoints/ and includes site-tests-backed curl scenarios.

Prerequisites

Before starting, complete Python Dev Setup and ensure Memory Service + Keycloak are running. Also complete Step 2 on that page (build local memory-service-langchain wheel + UV_FIND_LINKS); this is temporary until the package is released.

Tutorial Path

Getting Started

Build a minimal Python agent, then enable memory-backed conversations.

Conversation History

Record USER/AI turns in the history channel and expose read APIs.

Add indexed history content and conversation search.

Conversation Forking

Pass fork metadata and list conversation forks.

Response Recording and Resumption

Stream responses and support resume-check, resume, and cancel.

Sharing

Add memberships and ownership transfer APIs.

Reference

Client Configuration

Environment variables, explicit config, and from_env() factory usage.

Dev Setup

Reproducible uv workflow, Dockerized dependencies, and fast Python-only docs tests.