AI agents guideOverview

MediaSFU AI agents guide

AI agents

Agents that listen, see and act, live in your rooms and on your phone lines.

Bring your own speech, language and vision providers. MediaSFU carries the audio and video, runs every turn through the pipeline you choose, calls your tools, and keeps a person one step away.

Try a live agent
  • $0.002 per agent minute
  • Your AI keys, billed by your providers
  • Hand off to a person with context
Example agent turn
From keys to a live agent

Four moves to an agent people can talk to.

This guide follows the same path, one section per move.

  1. 1ConnectAdd your AI providers

    Store STT, LLM, TTS, realtime or vision keys once as credentials, then refer to them by nickname.

  2. 2AttachPut the agent in a room

    Create and join through your backend, mount the SDK headless, and wait for the room socket.

  3. 3RunStart the live buffers

    startDataBuffer sends speech or frames through your pipeline; answers come back as pipelineResult events.

  4. 4OperateWatch each turn, hand off when needed

    Log turns, latency and tool use, and pass a summary to a person when the agent should step aside.

Choose your path

Take the shortest path that still gives you control.

This guide is for building with the SDK. To launch an agent without code, start from one of these.

Watch it done

Watch an agent go live on a phone line.

Tour the agents workspace, then put an agent on a phone line, no code needed. Recorded on the live product.

All video tutorials

A tour of the agents workspace

1 min 21 sEnglish narration, captions in 7 languages

Where AI agents for your website and phone lines are built: templates, the handoff desk, agent settings, AI providers and agency clients.

Chapters
Transcript

The agents workspace is where you build, test and launch AI agents for your website and your phone lines. One menu holds everything an agent needs: its settings, AI providers, phone numbers, keys, recordings and credits. What's next shows the next step to a working agent, and how far along you are.

Start from a template: a receptionist, a support assistant, a scheduler or a sales qualifier. Answer two questions and it's live.

When an agent needs a person, the handoff desk lists the conversations waiting. Read the recent context, then join as a co-pilot or take over the conversation.

Agent configs hold each agent's full settings: who it is, how it talks, what it may do, and when to fetch a human. Agents can use MediaSFU-managed AI, or your own provider accounts: add their keys here.

Running agents for clients? Group each client's numbers and agents, set your price, and see your margin per client. Back on My Agents, pick a template to build your first one.

Put a full agent on your phone line

2 min 22 sEnglish narration, captions in 7 languages

Create an agent in Agents Workspace for the phone, attach it to a line, choose who hears the call first with Ring me first, and see where live calls show up.

Chapters
Transcript

Now give the line a full agent you can reuse. Open Agents Workspace. Create a new agent. It checks for an AI brain first: the Gemini key from the last video. Pick the job. AI Receptionist greets callers, answers the basics and takes messages. Name the business. The agent's name comes from the template. Change it if you like. Write the opening line, or keep the one it suggests. Callers hear this first.

Choose Phone number. The agent is saved first. Then you attach a number, and its prompts carry over. Check the summary: it answers with your Gemini key. Create it.

Now attach it to the phone line. Edit the line. Under Standalone agent, pick Aisha. Now the line follows the agent. Edit the agent later, and the next call uses the change. Save the line. When it rings, the AI agent answers with Aisha's greeting.

To hear calls first yourself, turn on Ring me first. Calls ring you and your team in the app and on the Calls page. Whoever answers first gets the caller. Choose how long it rings. If nobody answers: Answer as usual hands the call to the agent. Or take a voicemail, which is emailed to you. Or tell the caller no one is available. We'll leave it off, so the agent answers straight away.

Live calls show up under Calls. Turn on call support here once. After that, live calls on your lines show on this page, and you can join one to listen in or take over.

Prove it in 30 secondsTalk to a live agent first, then build your own pipeline.
$0.002per agent minuteInfrastructure only. Your STT, LLM and TTS providers bill you directly (bring your own keys)
Built in

What a production agent needs, already in the path.

  • Room, widget or phone entry

    The same pipeline runs behind a headless room, a website widget or a SIP call.

  • Classic or realtime speech

    STT, LLM and TTS with a provider per stage, or one realtime credential that listens and speaks natively.

  • Vision frames

    Camera or screen frames go to a vision model at the rate you choose, with an optional spoken answer.

  • Tools and knowledge

    Vector search, Notion, Airtable, Zendesk, Linear, Calendly, Zapier, Slack and email through MCP.

  • Turn results as events

    Transcripts and results arrive as events on the room socket, ready for your own audit log.

  • Human handoff

    Escalate with the intent, transcript and actions tried, so a person picks up mid-job.

  • Your keys, your bills

    Keys live on your dashboard or are passed per session; each AI provider bills you directly.

  • TypeScript and Dart

    Most samples in this guide come in both, for web and Flutter apps.

Start from working code

Open-source starters that already attach a room and run a pipeline.

Agents custom appsWeb, vision and multimodalVoIP custom appsTelephony