Skip to documentation content
Docs
Documentation navigation
Tutorial
7 min to complete

Create your first agent

Configure a small TalkIt agent and prepare it for its first test conversation.

UpdatedByTalkIt Docs team
On this page

This tutorial walks through a minimal agent configuration and the checks to make before a first test conversation.

Use a test workspace

Create experimental agents in a test workspace until their instructions and channel behavior have been reviewed.

Before you begin

You need access to a TalkIt workspace and permission to create agents.

Create the agent

  1. Open Agents in your TalkIt workspace.
  2. Select New agent.
  3. Name the agent Customer support.
  4. Add a concise instruction describing when the agent should answer and when it should escalate.

Connect a browser client

The TalkIt JavaScript SDK exposes separate clients for text chat and voice calls. Both clients obtain a short-lived session grant from an authenticated endpoint in your application:

chat.ts
import { createTalkitChat } from '@talkit-llc/talkit-js'

async function getSessionGrant() {
  const response = await fetch('/api/talkit/session-grants/text', { method: 'POST' })
  if (!response.ok)
    throw new Error('Unable to create a TalkIt text session grant.')
  return response.json()
}

const chat = createTalkitChat({
  baseUrl: 'https://your-talkit-host.example',
  getSessionToken: getSessionGrant,
})

await chat.connect()
call.ts
import { createTalkitCall } from '@talkit-llc/talkit-js'

async function getSessionGrant() {
  const response = await fetch('/api/talkit/session-grants/voice', { method: 'POST' })
  if (!response.ok)
    throw new Error('Unable to create a TalkIt voice session grant.')
  return response.json()
}

const call = createTalkitCall({
  baseUrl: 'https://your-talkit-host.example',
  getSessionToken: getSessionGrant,
})

await call.start()

Keep credentials outside browser code

Create Website session grants on your trusted backend. Never commit a Website client secret or return it to the browser; the browser should receive only the short-lived grant.

Choose a test channel

Use Web Chat for the fastest browser-based test. Confirm the welcome message and escalation behavior before sharing the widget.

Use a dedicated WhatsApp test number and template set so experiments do not reach production customers.

Test the result

Start a test conversation and confirm that the agent:

  • follows its main instruction
  • asks for missing context
  • escalates outside its permitted scope

For the supported developer interfaces, continue to TalkIt developer entry points.

Was this page helpful?

Page feedback is not available right now.