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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.6.4.tar.gz
Algorithm Hash digest
SHA256 eebcaaeb1a2c38706ca7ed84cf01c8e708c22bd3545f8393b5ded2005a917409
MD5 6715b916ac817dcc5114b49d8c7efb58
BLAKE2b-256 a9db343590d7f7bbd511e68be9b8e8faab8d596621b7fbe8d42112196780d701

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 abc2fe2ed6a6d1e532e89ec94375fadd18e3f858bc2a616a3e963e7f1928ec11
MD5 fd4e4629b551e5b0fa4cd7069922b1d4
BLAKE2b-256 fae7bceed9311375f2d81ff79a2e4b56edbbd54c7066f365095cfd8a4dddff87

See more details on using hashes here.

Provenance

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