Skip to main content
A complete build. By the end, a real phone number is answered by an agent that knows your policies, can look up and book appointments, and hangs up properly.

What we’re building

Answers the phone

Inbound, in Finnish and English.

Knows the policies

Opening hours, cancellations, insurance — from a corpus.

Books appointments

A real HTTP tool against your system.

Ends cleanly

The hangUp system tool.
1

Pick a language and voice

Listen to each previewUrl at phone quality before deciding. A voice that reads well in a list can sound thin on a narrowband call.
2

Create the agent

Why these settings:
  • firstSpeaker: agent — inbound callers expect to be greeted
  • interruptible: false — the greeting cannot be talked over, so a recording notice is actually heard
  • temperature: 0 — a receptionist should answer the same question the same way
  • maxDuration: 600 — ten minutes is generous for reception; the 50-minute default lets a stuck call burn credits
  • inactivityTimeout: 20 + prompt — twenty seconds of silence gets a spoken check-in, not a silent disconnect
The agent speaks Finnish here, so greeting and kbSearchAnnouncement are written in Finnish. They are spoken verbatim and never translated.
3

Add the knowledge

Create a corpus in the dashboard and upload your policy documents — PDFs, pasted text, or a URL to crawl.Wait until every source shows PROCESSED. Testing before then produces an agent that correctly says it cannot find something, which looks like a bug but is the system telling the truth.Then link it:
The agent now has a search_... tool automatically. You do not configure it.
kbSearchAnnouncement — “Hetkinen, katson asiaa.” — is spoken before each search. Retrieval takes a moment, and silence on a phone call feels much longer than it is.
4

Add the booking tool

Build it as in the authenticated tool example, then attach it along with hangUp:
Without hangUp the agent cannot end a call. It finishes talking and waits, and the caller sits in silence wondering whether to hang up. This is the single most common omission on a first agent.
5

Test before the number is live

Connect with the SDK and try to break it — in Finnish, because that is what callers will speak:
6

Put it on the phone

Then call it yourself. Phone audio is narrowband and unflattering — check the greeting still sounds right, there is no long gap before it speaks, and it handles background noise.To unassign, send { "agentId": null }.

Then iterate

Change one thing at a time and say why:
Every change that actually changes something creates a version. Six weeks later “made it friendlier” tells you nothing; the note above tells you everything.
Version snapshots capture the personality fields, language, and voice — not tool assignments, corpora, or call settings. Restoring an old version brings back the older wording but leaves today’s tools and timeouts in place.

Reading the calls

A call is finished once endTime is populated. /calls uses cursor pagination (cursor / pageSize), not page / limit like the rest of the API.
There is no webhook for call events — poll GET /calls with a cursor rather than polling each call individually.