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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.7.tar.gz
Algorithm Hash digest
SHA256 fa6b1dd2331e69e791e473232acc5386a202f1a6cb6187f02bb42ac5178ba856
MD5 52a9d103acdea2b64400a61671497637
BLAKE2b-256 9e31c42b9ad4e1ce6fadede651d0c76ddeaf2c5258c2a40790dd7877c7054563

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_langchain-1.5.7.tar.gz:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 023825b57ecade9d1ed904e19984213846f5d742e13da1d837c8298a48175922
MD5 eeaa2c771d477c49153a0ca310afb003
BLAKE2b-256 953a7bd7b2887ab637a9fbb49a39d0de160d5b0fcd7f310fc00897c32a37d18e

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_langchain-1.5.7-py3-none-any.whl:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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