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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.5.tar.gz
Algorithm Hash digest
SHA256 fd6296b1f6f6c380d33a942af7f8b94af0958672eac7dfe7cc32c346c78909bf
MD5 1b5b79f0763b9b47dec3b37ea2027775
BLAKE2b-256 bf81f71d765b622af18ab543a26c74d518b5a8ee432ca065443e4dbd949811f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6b1e4d9456a81fb78ddb5203df38c31bc43e8f15a4b0bbf11c79fc1898bc5c1c
MD5 49bb8dceae4549ebbc266d6ada0f4770
BLAKE2b-256 81ff6d59917fad3fb86e7fdd06bc4d2c00b01b1224713270f8ccbd3476f563cc

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