Skip to main content

Use Composio Toolset with LiveKit

Project description

Composio Integration for LiveKit

This package integrates LiveKit with Composio, allowing you to use Composio's powerful toolset within LiveKit's agent framework.

Installation

pip install composio_livekit

Requirements

  • Python 3.9 or higher
  • composio_core >= 0.7.0
  • livekit >= 0.14.0
  • pydantic >= 2.0.0

Usage

Basic Integration

from composio_livekit import ComposioToolSet, Action
from livekit.agents.voice import Agent

# Initialize the toolset
composio_toolset = ComposioToolSet()

# Get specific tools
tools = composio_toolset.get_tools(
    actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER]
)

# Use with LiveKit Agent
class Assistant(Agent):
    def __init__(self):
        super().__init__(
            instructions="You are a helpful voice AI assistant.",
            tools=tools
        )

Complete Example

For a complete example including voice integration, see the demo file in the repository:

from livekit.agents.voice import AgentSession
from livekit.plugins import (
    openai,
    cartesia,
    deepgram,
    silero,
    turn_detector,
)

async def setup_agent_session():
    session = AgentSession(
        stt=deepgram.STT(),
        llm=openai.LLM(model="gpt-4o"),
        tts=cartesia.TTS(),
        vad=silero.VAD.load(),
        turn_detection=turn_detector.EOUModel(),
    )
    
    await session.start(
        room=ctx.room,
        agent=Assistant(),
    )

Features

  • Seamless integration between Composio tools and LiveKit agents
  • Support for all Composio actions and apps
  • Type-safe function signatures
  • Proper handling of array parameters and complex types

License

Apache License 2.0

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

composio_livekit-0.7.16rc1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

composio_livekit-0.7.16rc1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file composio_livekit-0.7.16rc1.tar.gz.

File metadata

  • Download URL: composio_livekit-0.7.16rc1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for composio_livekit-0.7.16rc1.tar.gz
Algorithm Hash digest
SHA256 7247fe4b46ad6b47494c6bf58f609c7cedda6ea03654cfc89b1d9bb351f3ce80
MD5 efc269ada2df3db97b6837b4af93fd29
BLAKE2b-256 2c3a1f149bd8c6a6a0a06f12ddfda4a4a8b6ca8a8096c8d813605be84ed4be57

See more details on using hashes here.

File details

Details for the file composio_livekit-0.7.16rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for composio_livekit-0.7.16rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 07cec06f418ecb007375cadec66dd0a63c7cd41d78e5c034c1e670c794148fd2
MD5 7b63a0d0fb485252f09e64042dde8bf5
BLAKE2b-256 a4736bafa801ee301819be505da136eb0f35b802b8fc8e2de66a95c6d0780989

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