Skip to main content

KAgent LangGraph Integration

This package provides LangGraph integration for KAgent with A2A (Agent-to-Agent) server support. It implements a custom checkpointer that persists LangGraph state to the KAgent REST API, enabling distributed agent execution with session persistence.

Features

  • Custom Checkpointer: Persists LangGraph checkpoints to KAgent via REST API
  • A2A Server Integration: Compatible with KAgent's Agent-to-Agent protocol
  • Session Management: Automatic session creation and state persistence
  • Event Streaming: Real-time streaming of graph execution events
  • FastAPI Integration: Ready-to-deploy web server for agent execution

Quick Start

from kagent.langgraph import KAgentApp
from langgraph.graph import StateGraph
from langchain_core.messages import BaseMessage
from typing import TypedDict, Annotated, Sequence

class State(TypedDict):
    messages: Annotated[Sequence[BaseMessage], "The conversation history"]

# Define your graph
builder = StateGraph(State)
# Add nodes and edges...

# Create KAgent app
app = KAgentApp(
    graph_builder=builder,
    agent_card={
        "name": "my-langgraph-agent",
        "description": "A LangGraph agent with KAgent integration",
        "version": "0.1.0",
        "capabilities": {"streaming": True},
        "defaultInputModes": ["text"],
        "defaultOutputModes": ["text"]
    },
    kagent_url="http://localhost:8083",
    app_name="my-agent"
)

# Build FastAPI application
fastapi_app = app.build()

Architecture

The package mirrors the structure of kagent-adk but uses LangGraph instead of Google's ADK:

  • KAgentCheckpointer: Custom checkpointer that stores graph state in KAgent sessions
  • LangGraphAgentExecutor: Executes LangGraph workflows within A2A protocol
  • KAgentApp: FastAPI application builder with A2A integration
  • Session Management: Automatic session lifecycle management via KAgent REST API

Configuration

The system uses the same REST API endpoints as the ADK integration:

  • POST /api/sessions - Create new sessions
  • GET /api/sessions/{id} - Retrieve session and events
  • POST /api/sessions/{id}/events - Append checkpoint events
  • POST /api/tasks - Task management

Deployment

Use the same deployment pattern as kagent-adk samples with Docker and Kubernetes.

Metadata

Release files for kagent-langgraph 0.10.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kagent-langgraph 0.10.5
File Size Uploaded Provenance Actions
kagent_langgraph-0.10.5.tar.gz 16.5 kB Without provenance Details for kagent_langgraph-0.10.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kagent-langgraph 0.10.5
File Interpreter ABI Platform Actions
kagent_langgraph-0.10.5-py3-none-any.whl Python 3 none any Details for kagent_langgraph-0.10.5-py3-none-any.whl

Total release size: 33.4 kB

Release files / kagent_langgraph-0.10.5.tar.gz

Download URL kagent_langgraph-0.10.5.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f34a85df9910c785b03524ae3eeea8d4097dd0696f6a24a5532c95e3c2b28e5c
BLAKE2b-256 checksum
How to use checksums
f7ed07e721a769055e873ec5a6d9eac47ebaeed1c48101535fd602702e4ce9fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / kagent_langgraph-0.10.5-py3-none-any.whl

Download URL kagent_langgraph-0.10.5-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c3bae4df7501d8a0ecc59cb528e995657ac253f82a5d03e3213361a6940333e
BLAKE2b-256 checksum
How to use checksums
6b44d25fc54df23e578782a1b460bc5d9b62f345976eb72214438e86056fd362
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for kagent-langgraph 0.10.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page