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.3.12.tar.gz (5.2 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.3.12-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.3.12.tar.gz
Algorithm Hash digest
SHA256 5188090d6f2d20c44e4538cbb327d6695ae4edf61b21278877cfe6eefcc36e68
MD5 003cbc72b47f8fdb0b7483f04769b7df
BLAKE2b-256 5ba6d545a1c7f845fa49820395aaeeed54518da15a65ce5a0dafb788985ab9a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.3.12-py3-none-any.whl
Algorithm Hash digest
SHA256 66b5a4244e3d7cbaa322f82d53d4f872606a7a910affe45122a828a9e7b8b2b0
MD5 dd244f4513ac868f97900ead4070c78c
BLAKE2b-256 2c28ac987f7d4b1f03e4c672ca4c84c959a3c2f6009772d44ba890cf548bc564

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