Pydantic AI integration for LiveKit Agents

Đang mở
#8,340 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ai-infra-agents, python
Lĩnh vực
ai

Hướng nghiên cứu

Start with the existing LangGraph adapter in livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/langgraph.py, and with the llm_node() hook the issue mentions, to see how LiveKit's chat history and streamed responses are wired. The first step is agreeing on scope with maintainers, not writing code. Done means an agreed design for a Pydantic AI adapter or a documented example, covering history sync on interruption.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
Feature Type

Would make my life easier

Feature Description

Hi everyone,

I’d like to use a Pydantic AI agent with LiveKit, keeping its tools and logic in Pydantic AI while LiveKit handles speech and turn-taking.

The use case I have in mind is a support assistant available through both web chat and phone calls. It could reuse the same customer lookup and knowledge-base tools across both channels.

I couldn’t find a dedicated Pydantic AI adapter here. A reusable integration would help with streaming responses and keeping conversation history consistent. Interruptions seem particularly important: when LiveKit updates its history after a caller interrupts, Pydantic AI’s history would need to reflect that too.

Workarounds / Alternatives

A custom llm_node() could call Pydantic AI and stream its responses. That seems workable, but applications would still need to handle message conversion, tool-call history, and cancellation.

Having that behavior documented and tested in one place would make this easier to use reliably.

Additional Context

I noticed the existing LangGraph adapter.

Would a similar adapter make sense for Pydantic AI, or would a documented example be a better starting point?

I’d be happy to contribute the implementation, tests, and a small example. I wanted to discuss the approach and agree on a manageable scope before starting.

Ngôn ngữ chính
Python
Star
14.6k
Fork
3.9k
Merge trung bình
2 ngày 20 giờ
Pull request đã merge (30 ngày)
248

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của livekit/agents

Tất cả issue của livekit/agents

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.