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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.1.tar.gz
Algorithm Hash digest
SHA256 6b31a9568c35f2cbacd2e0fbb8e59a6d1843616de7db301b9b385a64c4d3baa8
MD5 b6232dc0de019a17f4683f0d9a0269ae
BLAKE2b-256 b7a2d58754ef1e4413ceba6e1950074a18b80f69bc7aa063256915cc8354bdaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e58b6f1e72d3731a906ae24f36b1b43f775edcb55611771094adc396a0f58a42
MD5 d62316ea8af074aeecadd98b26aa6c37
BLAKE2b-256 d4a80c05ee635341e2cbd238279b9c834f10e62b60860f60fc0235d7b4aaff06

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