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.
Creating an agent
Section titled “Creating an agent”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.
The persona prompt
Section titled “The persona prompt”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
personaPromptas the system prompt.openingGreeting(or, without it, a model-written greeting) opens the session. - Workflow attached: the workflow’s
llmnodes never readpersonaPrompt. Each node’s ownsystemPromptorpromptTemplateis its system prompt, so put the persona there. KeeppersonaPromptthe same text so the dashboard shows it.
How to write each kind of prompt is on Persona and Prompt Engineering.
useCase: the AgentUseCase enum
Section titled “useCase: the AgentUseCase enum”useCase selects how a finished session is evaluated: the built-in evaluation prompt and the set of recommendation values the evaluation can return.
| Value | Evaluates | recommendation values |
|---|---|---|
INTERVIEW | the candidate (the default) | hire, maybe, no-hire |
SUPPORT | customer satisfaction | resolved, escalate, follow-up |
SALES | lead quality | qualified, nurture, disqualified |
ONBOARDING | readiness | ready, needs-support, follow-up |
EDUCATION | comprehension | pass, review, fail |
CUSTOM | whatever your own prompt asks | your 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.
Wiring up a workflow
Section titled “Wiring up a workflow”workflowId exists only on updateAgent, so attaching a workflow is three steps:
- Create the agent.
- Create, fill and publish a workflow (Workflows Overview).
- 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.
Voice and avatar configuration
Section titled “Voice and avatar configuration”Text-only integrations can ignore these fields.
| Field | Type | Notes |
|---|---|---|
voiceTier | VoiceTier: STANDARD, WAVENET, NEURAL2, CHIRP3_HD, STUDIO | Voice quality label; default STANDARD. STUDIO is tuned for narration, not dialogue. |
ttsVoice | String | Text-to-speech voice name, for example en-US-Neural2-F. |
ttsLang | String | Language the agent speaks (BCP-47, default en-US). |
sttLanguageCode | String | Language most callers speak; ttsLang when unset. |
sttAlternativeLanguageCodes | [String!] | Up to three other languages to recognise. See Speech-to-text languages. |
speakingRate | Float | 0.25 to 4.0, where 1.0 is normal. |
vadThreshold | Float | Microphone voice-activity threshold, 0.1 to 1.0 (default 0.8). |
avatarBackend | AvatarBackendType | See below. |
avatarGlb | String | 3D model file name, used only with CLIENT_3D. |
avatarGender | AvatarGenderCode: F, M | Default F. |
lipsyncLang | String | Lip-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 }}avatarBackend: avatar rendering options
Section titled “avatarBackend: avatar rendering options”CLIENT_3D(default): the<vai-avatar>component renders the 3D model named byavatarGlbin the browser and lip-syncs it.HOSTED_API: a hosted provider renders a video avatar and streams it to the client. Configure it withavatarBackendConfig, 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.avatarGlbis ignored; the voice fields still apply.SELF_HOSTED_VIDEO_STREAMis reserved and not implemented.
Choosing the model
Section titled “Choosing the model”Every agent runs on the platform’s default model unless you override it.
| Field | Type | Notes |
|---|---|---|
llmModelOverride | String | A model id from the llmModelCatalog query. |
llmProviderOverride | LlmProviderType: WEBBYXAI_HAIKU, GEMINI_DIRECT, BEDROCK_MANTLE | The provider. Normally left unset; see below. |
- Set the model, not the provider. With only
llmModelOverrideset, the agent runs on the provider that serves that model.llmModelCataloglists 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, anllmnode’s ownmodelOverridewins for that node. - Refusals at save time:
createAgentandupdateAgentanswerBAD_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_MANTLEfalls back to the default provider. - Clearing: send
nullfor the field onupdateAgent(orupdateTenant).
Restricting which models a tenant can use
Section titled “Restricting which models a tenant can use”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 }isnullwhen nothing is restricted, or the list of allowed model ids. An entryprovider:<PROVIDER>allows every model of that provider; an empty list allows none.llmModelCatalogreturns 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:
generateTextandstartTextGenerationanswerFORBIDDENnaming the model; anllmnode with a blockedmodelOverridefails, and the failure is in the run’snodeTrace; saving an agent or the workspace override, or publishing a workflow, with a blocked model answersBAD_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.
Restricting one API key
Section titled “Restricting one API key”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
sdkSendMessageturn, every workflowllmnode 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.
namedApiKeysdoes not return a key’s list; ask your Wetel contact which keys are restricted.
Next steps
Section titled “Next steps”- Persona and Prompt Engineering: what to write in the persona and in each
llmnode. - Workflows Overview: the graph that drives a workflow agent.
- Core API Flow:
sdkStart,sdkSendMessageandsdkEndSessionagainst a configured agent. - Agents API reference: every agent operation and the
AgentDtotype.