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

Uploaded Python 3

File details

Details for the file livekit_plugins_langchain-1.5.0rc1.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.0rc1.tar.gz
Algorithm Hash digest
SHA256 8ca572b2437e43b912bd6eefc30aef25b84bf02614658b99f873bf0749eb789a
MD5 b2f9dabc35d96bf55a8444d0276bc8d4
BLAKE2b-256 235eac27d118b19b6292508e61dd9f3f9f1ab3e4c451b5fc8e48d547d64c8343

See more details on using hashes here.

File details

Details for the file livekit_plugins_langchain-1.5.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6efbf6e6b5f39f9078ab3e94b62332b0f1d6446c809827a439e2f852cf746e4
MD5 16847d690a76eee7bcc28d8afab0a3e7
BLAKE2b-256 0175b85fc425303a04e184ae95dda7de89bb4884c71c688a065a23f870b38e93

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