COSMO REALTIME HARNESS

Build realtime agents that see, hear, speak and keep getting better.

One SDK for voice and multimodal agents on every surface. Cosmo handles the transport, model inference, and the improvement loop; you just write the agent's persona, hooks and skills.

PASTE THIS INTO YOUR CODING HARNESS

Set up Cosmo from platform.askcosmo.ai/docs/quickstart/cli, then build me a voice agent.
one session, end to end
live
const client = new RealtimeClient({ token });
const agent = client.agent({ instructions, skills, tools, hooks });
const session = await agent.start();
skills: one menu line per taskPreToolUse · PostToolUse hooksclassifier gates that fail closedexamine_image: full res on demandfull-duplex voicesub-second round-triptyped JSON eventsSessionEnd safety netaudit trailstelephonyauto-reconnectcamera + screen vision
skills: one menu line per taskPreToolUse · PostToolUse hooksclassifier gates that fail closedexamine_image: full res on demandfull-duplex voicesub-second round-triptyped JSON eventsSessionEnd safety netaudit trailstelephonyauto-reconnectcamera + screen vision

BUILD APPS THAT CAN DO ANYTHING

Paste a prompt. Ship an app.

Copy any of these prompts into your favorite coding agent harness and get an app built on the Cosmo SDK.

Form-Check Trainer

Your AI trainer watches your form, counts your reps, and pushes you to your limits.

VisionVoiceCoaching

Screen Copilot

Stop describing the problem. Share your screen and talk it through.

Vision

Support Line

A phone agent that answers calls, looks up accounts with tools, and escalates when it should.

VoiceTelephonyEnterprise

Sous Chef

Point the camera at the pan and just talk. Hands stay busy; the agent keeps up.

VisionVoiceFun

Interview Coach

Rehearse the answer before Friday's interview asks for it.

VoiceCoaching

Sales Roleplay

Reps rehearse the hard objection before the real call. Every rehearsal becomes a trace you can measure.

VoiceEnterpriseCoaching

Language Tutor

Conversation practice with an agent that corrects you mid-sentence, or waits, depending on your setting.

VoiceCoaching

Meeting Notetaker

A headless agent that joins the room, listens, and hands your backend clean structured notes.

VoiceEnterprise

Onboarding Concierge

Sees the user's screen, walks them to their first win.

VisionVoice

Storefront Watcher

A camera feed that speaks up only when something's wrong.

VisionEnterprise

Game NPC

A character players can actually talk to, with a personality, a memory of the run, and in-game tools.

FunVoice

HOW IT WORKS

What happens after session.start()

Your app keeps the experience and the business logic. The harness keeps what makes an agent shippable. Click any tile in the harness to see why it matters.

YOUR APP

mic + camera

capture & publish tracks

session.on(…)

render transcripts & state

tools + hooks

your code, with guardrails around it

audio + video · WebRTC tracks

transcripts · tool calls · errors (typed JSON)

tool results · client state

one room · sub-second round-trip

COSMO HARNESS

live

MODEL INFERENCE

full-duplex speech models

pipelined STT → LLM → TTS

voice + vision, sub-second

rotated · their API quirks never reach your code

ONE AGENT, EVERY SURFACE

Run your agent on every device with a mic or camera.

This console is live: toggle capabilities on the left, switch the model provider on the right, and watch how the code changes. The application lines never move.

Open the quickstart

TypeScriptnpm install cosmo-ai

Pythonpip install cosmo-ai-sdk

SwiftCosmoRealtime · Swift Package

What you compose6/8
1import { RealtimeClient } from "cosmo-ai";
2
3const client = new RealtimeClient({ apiKey: process.env.COSMO_API_KEY });
4
5// Your application. Everything below composes onto this one agent.
6const agent = client.agent({
7 instructions: SUPPORT_PROMPT,
8 // Point it at a model. This is the only provider-specific line.
9 model: "gemini", // swap the model, keep the app
10 tools: [getWeather], // client, server or background
11 skills: [refundsSkill, schedulingSkill], // one menu line each; the prompt stays flat
hooks: [scrubPii, audit], // PreToolUse rewrites/denies · PostToolUse audits
12});
13
14// One session. One lifecycle. One API.
15const session = await agent.start(); // the mic publishes automatically
// Nothing else composed. Flip a capability on; the app around it never moves.
16
17// Capabilities on the live session.
18await session.startScreenShare(); // same call on every surface
19await session.addVideoStream(cameraStream); // any getUserMedia stream
20await session.sendImage({ data: snapshot }); // base64 stills, same session
await session.dial("+15555550123"); // the callee joins the session
21
22for await (const event of session) {
23 render(event); // transcripts, tool calls, one stream
24}
Where it runs
What moved
11Application linesnever change
6Capability linesone call each
1Provider-specificfor all 2
Unchanged You toggled it

PRICING

Pay by the minute.

A realtime minute is a minute of live session: mic open, agent listening, or camera streaming. Build free, scale on usage.

Build

$0

Everything you need to get a session live tonight.

  • 300 realtime minutes free
  • All three SDKs + typed events
  • Tools, vision, and memory included
  • Community support

Scale

Most builders

$0.03/ minute · hosting

Cosmo hosting is metered per live minute; model inference is passthrough at provider rates.

  • No seats, no per-agent fees
  • Volume discounts as you grow
  • Telephony minutes metered separately
  • Priority support

Enterprise

Custom

Dedicated infrastructure and your own improvement loop.

  • Dedicated capacity + SLAs
  • Custom models behind your gates
  • SSO, audit logs, DPA
  • Talk directly to the engineers

Hosting meters only while a session is live. Model inference is billed passthrough: the provider's rates, no markup.
By signing up for Cosmo Platform, you're agreeing to the Terms of Use, Privacy Policy and Acceptable Use Policy.

Developer FAQ

A runtime for realtime voice-and-vision agents: full-duplex transport, model inference, long-term memory, and continual learning behind one API. You define the agent (instructions, skills, tools, hooks) and the harness runs the conversation.

No. Audio and video stream over WebRTC tracks and typed JSON events travel a reliable channel in the same room; the harness runs the media server and owns session negotiation, track publishing, and reconnection. You never touch the media layer.

Closed-weight frontier APIs, open-weight models, or custom Cosmo models: you pick one with a single config field, and the harness absorbs each provider's API idiosyncrasies so swapping never touches the rest of your app. Upstream model sessions rotate automatically mid-call.

Sessions are full-duplex: the agent listens while it speaks, and it yields instantly on barge-in. The harness adds up to 200 ms of overhead on top of model latency, a number that keeps going down.

You register functions with the agent; when the model decides to call one, the call arrives as a typed event, your code runs it, and the result flows back into the conversation. The contract is identical in TypeScript, Python, and Swift.

Yes: telephony is part of the harness. Attach a phone number to an agent and the same session model, tools, and events apply to a phone call as to a browser session.