[{"data":1,"prerenderedAt":592},["ShallowReactive",2],{"docs-page:en:platform:unversioned:create-first-agent":3},{"page":4,"pageRef":532,"space":533,"edition":538,"spaceOptions":541,"versionOptions":560,"resolvedAuthors":561,"navigation":564},{"id":5,"title":6,"authors":7,"badges":9,"body":10,"contentType":516,"deprecatedSince":517,"description":518,"docId":519,"durationMinutes":215,"extension":520,"introducedIn":517,"meta":521,"navigation":126,"path":522,"releaseVersion":517,"removedIn":517,"seo":523,"spaceId":524,"status":525,"stem":526,"tags":527,"updatedAt":530,"version":517,"__hash__":531},"docs_en\u002Fdocs\u002Fcreate-first-agent.md","Create your first agent",[8],"talkit-docs",[],{"type":11,"value":12,"toc":507},"minimark",[13,17,25,30,33,37,69,73,76,450,455,458,462,476,480,483,495,503],[14,15,16],"p",{},"This tutorial walks through a minimal agent configuration and the checks to make before a first test conversation.",[18,19,22],"doc-callout",{"title":20,"type":21},"Use a test workspace","warning",[14,23,24],{},"Create experimental agents in a test workspace until their instructions and channel behavior have been reviewed.",[26,27,29],"h2",{"id":28},"before-you-begin","Before you begin",[14,31,32],{},"You need access to a TalkIt workspace and permission to create agents.",[26,34,36],{"id":35},"create-the-agent","Create the agent",[38,39,40],"doc-steps",{},[41,42,43,52,59,66],"ol",{},[44,45,46,47,51],"li",{},"Open ",[48,49,50],"strong",{},"Agents"," in your TalkIt workspace.",[44,53,54,55,58],{},"Select ",[48,56,57],{},"New agent",".",[44,60,61,62,58],{},"Name the agent ",[63,64,65],"code",{},"Customer support",[44,67,68],{},"Add a concise instruction describing when the agent should answer and when it should escalate.",[26,70,72],{"id":71},"connect-a-browser-client","Connect a browser client",[14,74,75],{},"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:",[77,78,81,299],"doc-tabs",{"default":79,"items":80,"variant":63},"chat","chat:Text chat,voice:Voice call",[82,83,85],"template",{"v-slot:chat":84},"",[86,87,98],"pre",{"className":88,"code":89,"filename":90,"highlights":91,"language":97,"meta":84,"style":84},"language-ts shiki shiki-themes github-light github-dark","import { createTalkitChat } from '@talkit-llc\u002Ftalkit-js'\n\nasync function getSessionGrant() {\n  const response = await fetch('\u002Fapi\u002Ftalkit\u002Fsession-grants\u002Ftext', { method: 'POST' })\n  if (!response.ok)\n    throw new Error('Unable to create a TalkIt text session grant.')\n  return response.json()\n}\n\nconst chat = createTalkitChat({\n  baseUrl: 'https:\u002F\u002Fyour-talkit-host.example',\n  getSessionToken: getSessionGrant,\n})\n\nawait chat.connect()\n","chat.ts",[92,93,94,95,96],1,10,11,12,13,"ts",[63,99,100,121,128,144,178,193,213,228,234,239,256,268,274,280,285],{"__ignoreMap":84},[101,102,106,110,114,117],"span",{"class":103,"line":92},[104,105],"line","highlight",[101,107,109],{"class":108},"szBVR","import",[101,111,113],{"class":112},"sVt8B"," { createTalkitChat } ",[101,115,116],{"class":108},"from",[101,118,120],{"class":119},"sZZnC"," '@talkit-llc\u002Ftalkit-js'\n",[101,122,124],{"class":104,"line":123},2,[101,125,127],{"emptyLinePlaceholder":126},true,"\n",[101,129,131,134,137,141],{"class":104,"line":130},3,[101,132,133],{"class":108},"async",[101,135,136],{"class":108}," function",[101,138,140],{"class":139},"sScJk"," getSessionGrant",[101,142,143],{"class":112},"() {\n",[101,145,147,150,154,157,160,163,166,169,172,175],{"class":104,"line":146},4,[101,148,149],{"class":108},"  const",[101,151,153],{"class":152},"sj4cs"," response",[101,155,156],{"class":108}," =",[101,158,159],{"class":108}," await",[101,161,162],{"class":139}," fetch",[101,164,165],{"class":112},"(",[101,167,168],{"class":119},"'\u002Fapi\u002Ftalkit\u002Fsession-grants\u002Ftext'",[101,170,171],{"class":112},", { method: ",[101,173,174],{"class":119},"'POST'",[101,176,177],{"class":112}," })\n",[101,179,181,184,187,190],{"class":104,"line":180},5,[101,182,183],{"class":108},"  if",[101,185,186],{"class":112}," (",[101,188,189],{"class":108},"!",[101,191,192],{"class":112},"response.ok)\n",[101,194,196,199,202,205,207,210],{"class":104,"line":195},6,[101,197,198],{"class":108},"    throw",[101,200,201],{"class":108}," new",[101,203,204],{"class":139}," Error",[101,206,165],{"class":112},[101,208,209],{"class":119},"'Unable to create a TalkIt text session grant.'",[101,211,212],{"class":112},")\n",[101,214,216,219,222,225],{"class":104,"line":215},7,[101,217,218],{"class":108},"  return",[101,220,221],{"class":112}," response.",[101,223,224],{"class":139},"json",[101,226,227],{"class":112},"()\n",[101,229,231],{"class":104,"line":230},8,[101,232,233],{"class":112},"}\n",[101,235,237],{"class":104,"line":236},9,[101,238,127],{"emptyLinePlaceholder":126},[101,240,242,245,248,250,253],{"class":241,"line":93},[104,105],[101,243,244],{"class":108},"const",[101,246,247],{"class":152}," chat",[101,249,156],{"class":108},[101,251,252],{"class":139}," createTalkitChat",[101,254,255],{"class":112},"({\n",[101,257,259,262,265],{"class":258,"line":94},[104,105],[101,260,261],{"class":112},"  baseUrl: ",[101,263,264],{"class":119},"'https:\u002F\u002Fyour-talkit-host.example'",[101,266,267],{"class":112},",\n",[101,269,271],{"class":270,"line":95},[104,105],[101,272,273],{"class":112},"  getSessionToken: getSessionGrant,\n",[101,275,277],{"class":276,"line":96},[104,105],[101,278,279],{"class":112},"})\n",[101,281,283],{"class":104,"line":282},14,[101,284,127],{"emptyLinePlaceholder":126},[101,286,288,291,294,297],{"class":104,"line":287},15,[101,289,290],{"class":108},"await",[101,292,293],{"class":112}," chat.",[101,295,296],{"class":139},"connect",[101,298,227],{"class":112},[82,300,301],{"v-slot:voice":84},[86,302,306],{"className":88,"code":303,"filename":304,"highlights":305,"language":97,"meta":84,"style":84},"import { createTalkitCall } from '@talkit-llc\u002Ftalkit-js'\n\nasync function getSessionGrant() {\n  const response = await fetch('\u002Fapi\u002Ftalkit\u002Fsession-grants\u002Fvoice', { method: 'POST' })\n  if (!response.ok)\n    throw new Error('Unable to create a TalkIt voice session grant.')\n  return response.json()\n}\n\nconst call = createTalkitCall({\n  baseUrl: 'https:\u002F\u002Fyour-talkit-host.example',\n  getSessionToken: getSessionGrant,\n})\n\nawait call.start()\n","call.ts",[92,93,94,95,96],[63,307,308,320,324,334,357,367,382,392,396,400,415,424,429,434,438],{"__ignoreMap":84},[101,309,311,313,316,318],{"class":310,"line":92},[104,105],[101,312,109],{"class":108},[101,314,315],{"class":112}," { createTalkitCall } ",[101,317,116],{"class":108},[101,319,120],{"class":119},[101,321,322],{"class":104,"line":123},[101,323,127],{"emptyLinePlaceholder":126},[101,325,326,328,330,332],{"class":104,"line":130},[101,327,133],{"class":108},[101,329,136],{"class":108},[101,331,140],{"class":139},[101,333,143],{"class":112},[101,335,336,338,340,342,344,346,348,351,353,355],{"class":104,"line":146},[101,337,149],{"class":108},[101,339,153],{"class":152},[101,341,156],{"class":108},[101,343,159],{"class":108},[101,345,162],{"class":139},[101,347,165],{"class":112},[101,349,350],{"class":119},"'\u002Fapi\u002Ftalkit\u002Fsession-grants\u002Fvoice'",[101,352,171],{"class":112},[101,354,174],{"class":119},[101,356,177],{"class":112},[101,358,359,361,363,365],{"class":104,"line":180},[101,360,183],{"class":108},[101,362,186],{"class":112},[101,364,189],{"class":108},[101,366,192],{"class":112},[101,368,369,371,373,375,377,380],{"class":104,"line":195},[101,370,198],{"class":108},[101,372,201],{"class":108},[101,374,204],{"class":139},[101,376,165],{"class":112},[101,378,379],{"class":119},"'Unable to create a TalkIt voice session grant.'",[101,381,212],{"class":112},[101,383,384,386,388,390],{"class":104,"line":215},[101,385,218],{"class":108},[101,387,221],{"class":112},[101,389,224],{"class":139},[101,391,227],{"class":112},[101,393,394],{"class":104,"line":230},[101,395,233],{"class":112},[101,397,398],{"class":104,"line":236},[101,399,127],{"emptyLinePlaceholder":126},[101,401,403,405,408,410,413],{"class":402,"line":93},[104,105],[101,404,244],{"class":108},[101,406,407],{"class":152}," call",[101,409,156],{"class":108},[101,411,412],{"class":139}," createTalkitCall",[101,414,255],{"class":112},[101,416,418,420,422],{"class":417,"line":94},[104,105],[101,419,261],{"class":112},[101,421,264],{"class":119},[101,423,267],{"class":112},[101,425,427],{"class":426,"line":95},[104,105],[101,428,273],{"class":112},[101,430,432],{"class":431,"line":96},[104,105],[101,433,279],{"class":112},[101,435,436],{"class":104,"line":282},[101,437,127],{"emptyLinePlaceholder":126},[101,439,440,442,445,448],{"class":104,"line":287},[101,441,290],{"class":108},[101,443,444],{"class":112}," call.",[101,446,447],{"class":139},"start",[101,449,227],{"class":112},[451,452,454],"h3",{"id":453},"keep-credentials-outside-browser-code","Keep credentials outside browser code",[14,456,457],{},"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.",[451,459,461],{"id":460},"choose-a-test-channel","Choose a test channel",[77,463,466,471],{"default":464,"items":465},"web","web:Web chat,whatsapp:WhatsApp",[82,467,468],{"v-slot:web":84},[14,469,470],{},"Use Web Chat for the fastest browser-based test. Confirm the welcome message and escalation behavior before sharing the widget.",[82,472,473],{"v-slot:whatsapp":84},[14,474,475],{},"Use a dedicated WhatsApp test number and template set so experiments do not reach production customers.",[26,477,479],{"id":478},"test-the-result","Test the result",[14,481,482],{},"Start a test conversation and confirm that the agent:",[484,485,486,489,492],"ul",{},[44,487,488],{},"follows its main instruction",[44,490,491],{},"asks for missing context",[44,493,494],{},"escalates outside its permitted scope",[14,496,497,498,58],{},"For the supported developer interfaces, continue to ",[499,500,502],"a",{"href":501},"api-reference","TalkIt developer entry points",[504,505,506],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":84,"searchDepth":130,"depth":130,"links":508},[509,510,511,515],{"id":28,"depth":123,"text":29},{"id":35,"depth":123,"text":36},{"id":71,"depth":123,"text":72,"children":512},[513,514],{"id":453,"depth":130,"text":454},{"id":460,"depth":130,"text":461},{"id":478,"depth":123,"text":479},"tutorial",null,"Configure a small TalkIt agent and prepare it for its first test conversation.","create-first-agent","md",{},"\u002Fdocs\u002Fcreate-first-agent",{"title":6,"description":518},"platform","published","docs\u002Fcreate-first-agent",[528,529],"agents","getting-started","2026-08-12","wrnIZFPdsnruO5h1m1k-vV8pDWBOkt6wqIZjKEEto5o",{"spaceId":524,"versionId":517,"docId":519},{"id":524,"title":534,"description":535,"route":536,"searchScope":537},"Platform","Product concepts, setup guidance, and troubleshooting for the TalkIt platform.","\u002Fen\u002Fdocs\u002Foverview","space",{"id":517,"label":517,"isCurrent":126,"indexing":539,"currentRoute":540},"index","\u002Fen\u002Fdocs\u002Fcreate-first-agent",[542,543,548,552,556],{"id":524,"label":534,"route":536,"isActive":126},{"id":544,"label":545,"route":546,"isActive":547},"api","API","\u002Fen\u002Fdocs\u002Fapi\u002Fapi-overview",false,{"id":549,"label":550,"route":551,"isActive":547},"sdk","SDK","\u002Fen\u002Fdocs\u002Fsdk\u002Fjavascript-sdk",{"id":553,"label":554,"route":555,"isActive":547},"integrations","Integrations","\u002Fen\u002Fdocs\u002Fintegrations\u002Fconnect-web-chat",{"id":557,"label":558,"route":559,"isActive":547},"changelog","Changelog","\u002Fen\u002Fdocs\u002Fchangelog\u002F2026-08-12",[],[562],{"id":8,"name":563},"TalkIt Docs team",[565,575,583],{"id":529,"title":566,"pages":567},"Getting started",[568,573],{"docId":569,"title":570,"route":536,"pageRef":571,"contentType":572},"overview","TalkIt platform overview",{"spaceId":524,"versionId":517,"docId":569},"concept",{"docId":519,"title":6,"route":540,"pageRef":574,"contentType":516},{"spaceId":524,"versionId":517,"docId":519},{"id":576,"title":577,"pages":578},"developer-reference","Developer reference",[579],{"docId":501,"title":502,"route":580,"pageRef":581,"contentType":582},"\u002Fen\u002Fdocs\u002Fapi-reference",{"spaceId":524,"versionId":517,"docId":501},"reference",{"id":584,"title":585,"pages":586},"troubleshooting","Troubleshooting",[587],{"docId":588,"title":589,"route":590,"pageRef":591,"contentType":584},"agent-not-responding","Agent does not respond","\u002Fen\u002Fdocs\u002Fagent-not-responding",{"spaceId":524,"versionId":517,"docId":588},1792741581324]