Skip to main content

LangChain/LangGraph plugin for LiveKit agents

Project description

LangChain plugin for LiveKit Agents

This plugin integrates capabilites from LangChain within LiveKit Agents

Installation

pip install livekit-plugins-langchain

Usage

Using LangGraph workflows

You can bring over any existing workflow in LangGraph as an Agents LLM with langchain.LLMAdapter. For example:

from langgraph.graph import StateGraph
from livekit.agents import Agent, AgentSession, JobContext
from livekit.plugins import langchain

...

def entrypoint(ctx: JobContext):
    graph = StateGraph(...).compile()

    session = AgentSession(
        vad=...,
        stt=...,
        tts=...,
    )

    await session.start(
        agent=Agent(llm=langchain.LLMAdapter(graph)),
    )
    ...

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

livekit_plugins_langchain-1.5.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_langchain-1.5.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_langchain-1.5.0.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.0.tar.gz
Algorithm Hash digest
SHA256 0dea5a587270b271ee45517823e0b986d5ffe0743bcf065a4f3e2c84ca034653
MD5 4efe5c40b4ba19d298777e24880f978c
BLAKE2b-256 0ac1d7abbfa755ac50cbc6d77950fe4a0e0ea762031b61de5363a36fc0a03d1a

See more details on using hashes here.

File details

Details for the file livekit_plugins_langchain-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8cb844c5fed5e8a6a61cc457f3b2887d844a173d22bcc487607068e147e36da
MD5 70b2bba7d4546bd6fbe252ac026c2a19
BLAKE2b-256 e57321fd3ad55baf3731feaa6792aae3551852d67b8142f0ec11a3f6685e3ee9

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