My LiveKit agent is deployed in our AWS, we only u...
# ask-ai
h
My LiveKit agent is deployed in our AWS, we only use LiveKit Cloud as a WebSocket server Is the concurrent agent sessions limit only for agents deployed on LiveKit Cloud? If the limit isn't applied to my self hosted agent, does that mean my self hosted agent can handle over 5 concurrent agent sessions if I'm on Build plan?
t
Thanks for reaching out, tri.nguyen. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks so much for reaching out! I wanted to clarify that the concurrent agent sessions limit is specifically for agents running on the LiveKit Cloud infrastructure. Since your agent is self-hosted and just uses LiveKit Cloud as a WebSocket server, this limit doesn’t actually apply to your setup. What this means is your self-hosted agent can comfortably handle more than 5 concurrent sessions, even if you're on the Build plan. That said, it’s good to keep in mind that usage of LiveKit Cloud’s media transport services—like bandwidth and signaling—might still be subject to billing or account-level quotas. Sources: Deploying to custom environments | LiveKit Docs | LiveKit Pricing
h
my agent has a document ingestion function using pydantic ai , i want to know should i keep it in my agent or separate like in next app.
t
It's recommended to separate the document ingestion function into another application, such as a Next.js app, rather than keeping it within your LiveKit agent. This approach aligns with LiveKit's architectural patterns and offers several benefits: • Performance Optimization: LiveKit agents are optimized for real-time processing, while document ingestion can be resource-intensive and may interfere with the agent's responsiveness. • Scalability: Separating ingestion allows you to scale document processing independently without affecting agent performance. • Security: A Next.js app can securely handle file uploads, document storage, and token management. • Development Flexibility: This separation allows frontend and agent developers to work independently, streamlining workflows. For communication, you can use RPC calls between the Next.js app and the agent. This setup ensures each component focuses on its core strengths while maintaining flexibility and scalability. Sources: complex-agents/drive-thru/frontend/README.md | client-sdk-js | livekit/livekit_composite | DeepWiki | agents/src/index.ts | server-sdk-js | livekit/livekit_composite | DeepWiki