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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.3.tar.gz
Algorithm Hash digest
SHA256 e2182614a90b6ffc3c54c710c7969513296d2be7f869e421306ffebc1aefe38a
MD5 22bc83429eab8f61ef1a0d812b6f1e05
BLAKE2b-256 74328d778088227108af83a4887ddd1f5e5195adc7f43f58a1669175dec2d064

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 71c7748ce4cb8f856aad4de4566b7166c50aa97b912395ab09a66c7181070fb3
MD5 b7362f7b916ecee804408370aca0063a
BLAKE2b-256 3c78d74d3b6b8d8089616475d6905c64cc24012fb922fe4dc24b35e79d2e6c6c

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