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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.8.tar.gz
Algorithm Hash digest
SHA256 82b59ae89755607acf377ab76fd37b6df438e9e53afb29781f3fa69eb9465fdc
MD5 17ef09285ac0ba72b3e39a6115af1614
BLAKE2b-256 c5ee57bd1c56283490456cdad422238454b72b2d0437e78f926ea34c4f4af615

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for livekit_plugins_langchain-1.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 74c22b5510bf69a6bc8bca2d78ff5e17d6252dd164a5236f7bb7b1574d28b14f
MD5 9b49304b9edcb70b3a2d48e3f079863e
BLAKE2b-256 4bb713f67e08e2f06b80b8e5d2e39de6069b8aa2f7e48d25c5d3c9eb8cf90b22

See more details on using hashes here.

Provenance

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