Wetel
Go back

Building your own admin panel on Wetel's admin API

Updated:

Think of a bank that lets other businesses offer accounts under their own name. The vault, the ledger and the rules about who may touch which account belong to the bank. The counter, the forms and the colour of the walls belong to the business. Customers walk into a shop they recognise, and the money is still kept properly.

Wetel can sit inside a software product in much the same way. Your customers manage their AI employees on a screen inside your product, in your vocabulary, while Wetel runs the agents, the workflows and the separation between customers underneath. The screen talks to Wetel’s admin API.

This post is for a developer or product lead at a software company deciding whether to build that screen: what the admin API exposes, how authentication and per-customer workspaces work, how to generate forms from the live schema, and what you still have to build yourself. Wetel has its own dashboard, and you can use it. This post is about building yours.

What does the admin API expose?

The admin API is the GraphQL surface for creating and editing agents and workflows, as opposed to the runtime surface for starting conversations with an agent that already exists. Wetel’s own dashboard is built entirely on it; nothing there is special-cased or internal-only, so whatever the dashboard does, your screen can do through the same calls.

What it covers, as documented:

mutation CreateWorkflow($input: CreateWorkflowInput!) {
createWorkflow(input: $input) {
id
}
}
mutation UpdateWorkflow($input: UpdateWorkflowInput!) {
updateWorkflow(input: $input) {
id
nodes
edges
}
}
mutation PublishWorkflow($id: Int!) {
publishWorkflow(id: $id) {
id
isPublished
version
}
}

How do my customers’ AI employees stay separate?

One Wetel workspace per customer of yours. Every account belongs to exactly one workspace, and agents, workflows, tools, knowledge bases, sessions and API keys are kept separate per workspace: every request is scoped to the workspace of the signed-in login or the API key, and a request for one workspace cannot see or affect another, whatever ids it guesses. Workspaces share the platform’s database; a dedicated database per workspace is designed but not offered today.

flowchart LR
U["Your customer's staff<br/>sign in to your product"] --> B["Your backend<br/>maps customer to workspace"]
B -- "credentials for workspace A" --> WA["Wetel workspace A"]
B -- "credentials for workspace B" --> WB["Wetel workspace B"]

Two practical consequences:

How does authentication work, and why does the key stay server-side?

Two Wetel credentials matter here, and they unlock different things.

Both stay on your server. The pattern the docs call the gateway: your frontend talks to your backend, your backend looks up the right customer’s credentials and calls Wetel. If a chat needs to run in a browser, only the short-lived, session-scoped token returned when a session starts ever reaches it. An API key in client-side code can be copied by anyone who opens the browser’s developer tools, and it keeps working for as long as it is valid.

Your own users sign in however your product already signs them in; Wetel does not ask you to change that. If you run more than one consumer against the same workspace (a staging copy of your product and production, say), use a named API key per consumer so each can be revoked on its own.

One thing to design around: approval decisions in a workflow are made by a signed-in workspace owner, and an API key cannot decide. If your screen offers an approvals inbox, the person deciding must be acting as an owner of that customer’s workspace. A human is always in charge of an AI employee; your screen is where that person does their job.

Can I generate the editing forms from the live schema?

Yes, and you should. The awkward part of a workflow editor is the property panel: every step type has different settings. Rather than copying those shapes by hand, query nodeConfigSchemas once when the editor loads:

query {
nodeConfigSchemas {
type
schema
}
}

It returns a real JSON Schema (draft 2020-12) for each of the 10 step types that have settings, generated from the backend’s own validation code. It accepts a JWT or an API key. Drive a form generator from it, and a new setting appears in your editor the day it ships, not the day someone notices your copy is stale.

Read the schema the way it is meant to be read. Every property is optional and unknown keys are allowed, because a step’s configuration is deliberately an open bag; use the schema to build forms and check what your user does set, not to reject extra keys. Two things it will not tell you:

The schema gives you fields, not design. Which settings a support lead should see first, and which belong in an advanced drawer, is still your product decision.

What do I still have to build myself?

The parts that are about your product, not the engine. A first working version is three screens:

  1. An agent list and editor. Plain forms over the agent calls. No canvas needed.
  2. A workflow editor. A canvas of steps and connections, with property panels generated from the schemas above.
  3. A test pane. A live conversation with the draft agent, highlighting each step as the event feed reports it, and the run’s trace afterwards.

Around those, you own:

Some things you do not need to rebuild. Outbound calls from workflow steps are already checked against private and internal network addresses on Wetel’s side, whatever your editor lets through. A connector’s key is stored by reference and never returned, so build your connector screen as write-only from the start: re-enter to rotate, never display.

What is not offered?

Plainly, so you can plan around it:

For ready-made roles a workspace owner can hire instead of building an agent from scratch, see hiring a role instead of building one; for who can do what inside one workspace, see workspace owner or member.

To start on your own panel, read the Admin API Overview.


Share this post:

Next Post
Bring your own search: using Wetel's embeddings API with your own data
Previous Post
Giving an AI employee a face: a speaking avatar on your own page