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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.2.tar.gz
Algorithm Hash digest
SHA256 7cde80af2c487d4267884711a9346043441e548b891ff501d9de88b4df89d767
MD5 0926dac209e55d26ab0ff6776fb038a3
BLAKE2b-256 8766bc8dd62050d307be8652b4abb2fd01374153de098262dd6520c9e3c46951

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 930ba8fb6710375dae120fe30759257f228d9a0142037a7e2f0c26ffcb9d8195
MD5 aba6c274d7a32673646ed01c9a365e41
BLAKE2b-256 01933a8071f98dad9ce6a508a91bba1dbbe5d7e3cb224d416b32b7c691e0c1bf

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