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


Release history Release notifications | RSS feed

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.19rc1.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.

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.19rc1.tar.gz
Algorithm Hash digest
SHA256 95029f5fb29dd657c35142eea6f4f21eda7f108d505e4567366192b496b99ed1
MD5 0ce1e6cda2bdab02c1b6b906c0d10aed
BLAKE2b-256 b1546d1dc894dd00833b27971a697152f3e7300b96d512eb70588c24b5e96093

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_langchain-1.5.19rc1.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.19rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.19rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 13bdb06cc1c6025c725224dd77546780fff34e7252e74a9c22ac1e35b85c551c
MD5 f19b12753d660a1c4bfbfc39b0b5300f
BLAKE2b-256 877dc8c2b0ccc2b97c9bada07c26292c713ac1336edab1ce404d0e22a9cc37bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_langchain-1.5.19rc1-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