Skip to content

Configuring an Agent

An agent is the record your integration talks to: a name, a persona, the workflow that drives it, and optional voice, avatar and model settings. You create and change agents with a dashboard login (Authorization: Bearer <jwt>); runtime calls such as sdkStart use an API key instead. Both are explained in Authentication, and every request also sends x-huat-platform: customer.

Every operation on this page is listed with its arguments and samples in the Agents API reference.

mutation CreateAgent($input: CreateAgentInput!) {
createAgent(input: $input) {
id
status
}
}
{
"input": {
"name": "Library Assistant",
"position": "Library Concierge",
"personaPrompt": "You are a friendly library assistant. You help people find books, check room availability and use library services. Be concise. If you do not know, say so.",
"useCase": "SUPPORT"
}
}

name, position and personaPrompt are required. useCase defaults to INTERVIEW and voiceTier to STANDARD; every other field has a default too.

personaPrompt is the agent’s system prompt: who it is, its tone, what it will not discuss, and what it does when it does not know. Where it is used depends on whether the agent has a workflow:

  • No workflow attached: every turn is answered directly by the model with personaPrompt as the system prompt. openingGreeting (or, without it, a model-written greeting) opens the session.
  • Workflow attached: the workflow’s llm nodes never read personaPrompt. Each node’s own systemPrompt or promptTemplate is its system prompt, so put the persona there. Keep personaPrompt the same text so the dashboard shows it.

How to write each kind of prompt is on Persona and Prompt Engineering.

useCase selects how a finished session is evaluated: the built-in evaluation prompt and the set of recommendation values the evaluation can return.

ValueEvaluatesrecommendation values
INTERVIEWthe candidate (the default)hire, maybe, no-hire
SUPPORTcustomer satisfactionresolved, escalate, follow-up
SALESlead qualityqualified, nurture, disqualified
ONBOARDINGreadinessready, needs-support, follow-up
EDUCATIONcomprehensionpass, review, fail
CUSTOMwhatever your own prompt asksyour own labels

CUSTOM requires evaluationPromptTemplate (it must contain {transcript}, and may use {subject} and {recommendationLabels}) and evaluationRecommendationLabels. subject names what the sessions are about; position is used when it is empty.

When an evaluation runs: sdkEndSession evaluates before it returns; the dashboard’s endSession and an end_session node with runEvaluation: true evaluate in the background. Read the result with evaluation(sessionId), described in Evaluation and Export.

workflowId exists only on updateAgent, so attaching a workflow is three steps:

  1. Create the agent.
  2. Create, fill and publish a workflow (Workflows Overview).
  3. Attach it:
mutation AttachWorkflow($id: ID!, $input: UpdateAgentInput!) {
updateAgent(id: $id, input: $input) {
id
workflowId
}
}
{ "id": "1", "input": { "workflowId": 1 } }

updateAgent takes id as a separate argument. Send only the fields that change; an omitted field is left unchanged.

Text-only integrations can ignore these fields.

FieldTypeNotes
voiceTierVoiceTier: STANDARD, WAVENET, NEURAL2, CHIRP3_HD, STUDIOVoice quality label; default STANDARD. STUDIO is tuned for narration, not dialogue.
ttsVoiceStringText-to-speech voice name, for example en-US-Neural2-F.
ttsLangStringLanguage the agent speaks (BCP-47, default en-US).
sttLanguageCodeStringLanguage most callers speak; ttsLang when unset.
sttAlternativeLanguageCodes[String!]Up to three other languages to recognise. See Speech-to-text languages.
speakingRateFloat0.25 to 4.0, where 1.0 is normal.
vadThresholdFloatMicrophone voice-activity threshold, 0.1 to 1.0 (default 0.8).
avatarBackendAvatarBackendTypeSee below.
avatarGlbString3D model file name, used only with CLIENT_3D.
avatarGenderAvatarGenderCode: F, MDefault F.
lipsyncLangStringLip-sync language code, default en.

Voice settings (voiceTier, ttsVoice, ttsLang, sttLanguageCode, sttAlternativeLanguageCodes, speakingRate) apply to the avatar and browser path and, read when a call starts, to phone and voice calls too, but only where the environment has the voice-settings dispatch setting on (on for the test environment, off by default elsewhere) and within the engine limits listed there. The effect has not yet been confirmed by ear on a live call.

agentConfigOptions returns the valid avatarGlb file names and a short list of recommended voices, plus links to the full voice and language catalogues:

query ConfigOptions {
agentConfigOptions {
avatarModels {
filename
label
gender
}
recommendedTtsVoices {
name
languageCode
gender
tier
}
ttsVoiceCatalogUrl
sttLanguageCatalogUrl
}
}
  • CLIENT_3D (default): the <vai-avatar> component renders the 3D model named by avatarGlb in the browser and lip-syncs it.
  • HOSTED_API: a hosted provider renders a video avatar and streams it to the client. Configure it with avatarBackendConfig, a JSON object with the hosted avatar id and model. The hosted provider is set up by Wetel, so ask your Wetel contact before you switch an agent to it. avatarGlb is ignored; the voice fields still apply.
  • SELF_HOSTED_VIDEO_STREAM is reserved and not implemented.

Every agent runs on the platform’s default model unless you override it.

FieldTypeNotes
llmModelOverrideStringA model id from the llmModelCatalog query.
llmProviderOverrideLlmProviderType: WEBBYXAI_HAIKU, GEMINI_DIRECT, BEDROCK_MANTLEThe provider. Normally left unset; see below.
  • Set the model, not the provider. With only llmModelOverride set, the agent runs on the provider that serves that model. llmModelCatalog lists every model per provider with its price and whether it reads images.
  • Resolution order: the agent’s override, then the workspace’s (updateTenant), then the platform default. Inside a workflow, an llm node’s own modelOverride wins for that node.
  • Refusals at save time: createAgent and updateAgent answer BAD_REQUEST, naming the model and the allowed choices, for a model no enabled provider serves, a provider that does not serve the named model, or a model outside the workspace’s allowed list.
  • Fallback: the default provider retries a failed call on a second model, and BEDROCK_MANTLE falls back to the default provider.
  • Clearing: send null for the field on updateAgent (or updateTenant).

By default a workspace may use every model its environment serves. Wetel can restrict a workspace to a list of models on request; you can read the list but not change it.

  • myTenant { allowedLlmModels } is null when nothing is restricted, or the list of allowed model ids. An entry provider:<PROVIDER> allows every model of that provider; an empty list allows none.
  • llmModelCatalog returns only the models the workspace may use, so a model picker built on it never offers a blocked one.
  • A blocked model is refused, never swapped for another: generateText and startTextGeneration answer FORBIDDEN naming the model; an llm node with a blocked modelOverride fails, and the failure is in the run’s nodeTrace; saving an agent or the workspace override, or publishing a workflow, with a blocked model answers BAD_REQUEST. Saving a draft workflow is not checked.
  • Agents and workflows that already use a model you lose are not changed; they fail at run time until someone edits them or the list is extended.

Wetel can also restrict a single named API key to a list of models, on request.

  • A key can only narrow the workspace list: a request may use the models allowed by both lists. A key with no list follows the workspace; an empty list allows none.
  • The restriction follows the session the key started: every later sdkSendMessage turn, every workflow llm node in that session and any sub-agent it calls, even though those calls carry the session token. Direct calls with the key (generateText, startTextGeneration) use it too.
  • It does not apply to dashboard (login) traffic, to sessions started before the restriction, or to the single key from generateApiKey; use named keys.
  • A change applies from the next turn of each session. Refusals look like the workspace ones above.
  • namedApiKeys does not return a key’s list; ask your Wetel contact which keys are restricted.