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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.6.tar.gz
Algorithm Hash digest
SHA256 a3415d7d9b8913216d544a09735021b1ac429814f880cc1d71f1a4b24f1264d6
MD5 dbe0d38927e575d7deefba0975d70b5d
BLAKE2b-256 6ee9c1bcbc1eb8105e19182842d485f4ade9aec024505a42836618f62fa5b426

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4e25f8dfbd7fcb46262c1f66f4342c2f2b42072977eb2dee0af2cd9d685ba1bf
MD5 a0b57ca5a01c048bb525d6eb43cd094d
BLAKE2b-256 4e7bdb1be372d457e294b3d8bc5d76aeb15f88e4729fd3b8676e8b13ce14208d

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