how ask ai is built, do you have repo or code on h...
# ask-ai
t
how ask ai is built, do you have repo or code on how your self built
t
Thanks for reaching out, Quinn. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how "ask ai" is built and whether we have the repo or code for it — do you mean a specific LiveKit demo/app named "Ask AI," or are you asking how LiveKit builds AI-powered agents in general? If you mean AI agents in general: • LiveKit provides an Agents framework (Python/Node) that joins rooms as participants, performs STT → LLM → TTS pipelines, and supports VAD and multiple providers (OpenAI, Google, Azure, etc.). • There are example repos and starters (e.g.,
agent-starter-python
,
agent-starter-react
,
kitt
) that demonstrate building voice/multimodal agents and integrations. • The Agent Builder supports no-code prototyping and deployment. If you mean a specific "Ask AI" app: please share the link or where you saw it so I can check whether its repo is public or point you to the exact example. Would you like links to the Agents docs and the example repos or the Agent Builder docs? Sources: OpenAI and LiveKit | LiveKit docs | Google AI and LiveKit | LiveKit Docs | AWS AI and LiveKit | LiveKit Docs | Agent Builder | LiveKit docs | Live Conversations with AI using ChatGPT and WebRTC
t
i mean your self Livekit asssistant, how is you built? What knowledge base source do you get
t
You're asking how the LiveKit Assistant is built and what knowledge sources it uses — I’ll explain how our assistant is structured and where its knowledge typically comes from. Architecture and core pipeline • Built on the LiveKit Agents framework (Python/Node) so the assistant can join LiveKit rooms as a full participant. • Standard voice/multimodal pipeline: Speech-to-Text (STT) → Large Language Model (LLM) → Text-to-Speech (TTS), with Voice Activity Detection (VAD) to manage turn-taking. • The agent handles audio capture, transcription, LLM prompting/response generation, and speech synthesis back to users. Providers and integrations • Supports multiple STT/LLM/TTS providers (examples: OpenAI, Azure OpenAI, Google Gemini, Mistral AI). • Can be extended to use other model providers via the Agents SDK. Code, examples, and deployment • Example projects exist in the LiveKit examples (e.g.,
agent-starter-python
,
agent-starter-react
,
kitt
) that show how voice/multimodal agents are implemented. • Agents can be deployed to LiveKit Cloud or self-hosted environments. The LiveKit Agent Builder also enables no-code prototyping and deployment. Knowledge base / data sources • The assistant’s responses come from LLMs fed by prompts and any contextual documents you connect. Common knowledge sources used with agents: ◦ Internal documentation and site docs (for product-specific answers). ◦ Code examples and repo contents you attach. ◦ Configurable external knowledge stores (e.g., document collections or vector stores you provide) that the agent can query at runtime. • The assistant does not rely on a single fixed internal corpus; you can supply or configure the documents and vector stores the agent should use for domain-specific knowledge. If you’d like, I can: • Share links to the Agents docs and example repos. • Show a short example of how an agent is configured to use a vector store or attach product docs for better answers. Which would you prefer?
t
you are a Livekit assistant. what repo you based on
t
The LiveKit Assistant is built on the LiveKit Agents framework and example starter projects. Key repos it’s based on: • livekit/agents — the Agents SDK (Python/Node) and core agent patterns for joining rooms, STT→LLM→TTS pipelines, VAD, and provider integrations. • livekit-examples/agent-starter-python — a Python starter demonstrating how to implement an agent. • livekit-examples/agent-starter-react — a React frontend example for agent UI and interaction. • livekit-examples/kitt — an example agent project showing a fuller voice/multimodal assistant. These repositories show the architecture, prompt patterns, provider wiring (OpenAI, Google, Azure, etc.), and deployment options used to build the assistant. Would you like links to any of these repos or a short excerpt showing how an agent wires up STT → LLM → TTS?
t
how to intergrate livekit into slack channel like this
t
You want to integrate LiveKit into Slack — do you mean one of these scenarios? • A Slack bot or slash command that starts a LiveKit room (creates/join links) from a channel • An in-channel assistant where users message the bot and the LiveKit agent replies (text only) • Voice/video embedded so users join a LiveKit call from Slack messages or buttons • A workflow that records or transcribes Slack voice/video calls into LiveKit agents or pipelines Tell me which scenario matches your goal and: 1. Do you already have a Slack app (bot token, signing secret) and a LiveKit server or Cloud account? 2. Do you need voice/video in Slack (users join live calls) or just chat-based assistant replies? 3. Preferred tech stack (Node, Python) for server-side glue? Answer those and I’ll provide a concise integration plan and example steps (auth flow, creating/joining rooms, handling events, and sample code).
t
• An in-channel assistant where users message the bot and the LiveKit agent replies (text only) 1. Do you already have a Slack app (bot token, signing secret) and a LiveKit server or Cloud account?
t
Great — you want an in-channel Slack bot that forwards messages to a LiveKit agent (text-only). Do you already have: 1. A Slack app with a bot token (
xoxb-...
) and signing secret? 2. A LiveKit account/server and an active agent session or a plan to run an agent (Cloud or self-hosted)? Also tell me your preferred server language (Node or Python) and whether you want a minimal working code example or just a high-level integration plan. Sources: Text and transcriptions | LiveKit docs | Observability data hooks | LiveKit docs
t
both
t
Great — since you have both Slack credentials and a LiveKit account, below is a concise step‑by‑step integration guide plus minimal Python and Node snippets to forward Slack messages to a LiveKit text-only agent and return the agent’s reply. Summary flow Slack user → Slack app (Events API / bot) → Your backend → LiveKit AgentSession (
generate_reply
) → agent reply → Slack (chat.postMessage) Required Slack app config • Scopes:
chat:write
,
app_mentions:read
,
channels:history
(adjust for DMs or private channels). • Enable Event Subscriptions (or use Socket Mode). Subscribe to: ◦
app_mention
(for mentions) or
message.channels
(for channel messages) or
message.im
(for DMs). • Install app to workspace and save Bot Token (
xoxb-...
) and Signing Secret. LiveKit agent prerequisites • Running a LiveKit agent (Cloud or self-hosted) using the Agents SDK (Python or Node). • Agent configured in text-only mode: STT/TTS disabled,
text_input
and
text_output
enabled. • A persistent or on-demand AgentSession that can accept
generate_reply(user_input=...)
. Architecture notes • Keep one AgentSession per Slack conversation or pool a session and pass conversation/context metadata. • Use correlation IDs so replies map to the correct Slack message/channel. • Handle rate limits and backpressure (queue messages if agent busy). Python (FastAPI + Slack Events) minimal example 1) Start agent session (text-only)
Copy code
# simplified; integrate into your agent process
from livekit.agents import AgentSession, RoomOptions, TextOutputOptions

session = AgentSession(
    # stt=None, tts=None set in start options below
)

await session.start(
    agent=MyAgent(),
    room=ctx.room,
    room_options=RoomOptions(
        text_input=True,
        text_output=TextOutputOptions(sync_transcription=False)
    )
)
2) Slack event handler (FastAPI + slack_bolt simplified)
Copy code
from slack_bolt.adapter.fastapi import SlackRequestHandler
from slack_bolt import App
from fastapi import FastAPI, Request

app = App(token="xoxb-...", signing_secret="...")
handler = SlackRequestHandler(app)
fastapi = FastAPI()

# assume agent_session is accessible
@app.event("app_mention")
def handle_mention(body, say):
    user_text = body["event"]["text"]
    # forward to LiveKit agent
    result = await agent_session.generate_reply(user_input=user_text)
    # get assistant text (example access; adapt to SDK run result)
    assistant_msg = result.expect.next_event().is_message(role="assistant").event().item.content
    say(text=assistant_msg)

@fastapi.post("/slack/events")
async def endpoint(request: Request):
    return await handler.handle(request)
Node (Express + @slack/bolt) minimal example 1) Start agent session in Node Agent process (text-only) using Agents SDK (similar options as Python). 2) Slack handler
Copy code
const { App } = require("@slack/bolt");
const express = require("express");
const app = express();

const slackApp = new App({ token: process.env.SLACK_BOT_TOKEN, signingSecret: process.env.SLACK_SIGNING_SECRET });

slackApp.event("app_mention", async ({ event, say }) => {
  const userText = event.text;
  // forward to LiveKit agent (assume agentSession is available)
  const result = await agentSession.generate_reply({ user_input: userText });
  // extract assistant text from result (adapt per SDK)
  const assistantMsg = extractAssistantText(result);
  await say(assistantMsg);
});

(async () => {
  await slackApp.start(process.env.PORT || 3000);
})();
Key implementation details • Extracting agent reply: the Agents SDK returns RunResult/streamed events. Use the SDK methods to read the assistant message text from the result or subscribe to session events. • Context: pass conversation metadata or prior messages when calling
generate_reply
to keep context. • Error handling: return friendly Slack messages on agent errors and log details. • Security: validate Slack signatures, secure your LiveKit credentials, and restrict endpoints. Deployment tips • Run the Slack handler and agent either in the same service or communicate over a secure internal API. • Use a small queue (Redis) if you expect bursts to avoid dropping messages while agent is busy. • Monitor latency and scale agent workers as needed. Want a full working repo-style example in Python or Node that you can drop into your environment? Which language do you want the complete example for (Python or Node)?