WAJ AI Engine
WAJ AI Engine
The self-hosted agent platform your AI assistant can operate. Build, test and ship agents over MCP, or from a portal. No agent code.
▶ Try the live demo
One click, no sign-up. Build and test agents with the built-in AI assistant. The demo resets every night.

▶ Watch with sound (35 s) · Video tour of every section
Quick start
git clone https://github.com/waj-1/ai-engine.git
cd ai-engine
docker compose upOpen http://localhost:8000. You need Docker and nothing else. The
first-run page asks for the setup code printed by docker compose logs engine,
then creates your admin account and shows your API key. No model key is needed
to start: add one later, or use a local model. The full walkthrough is in
docs/quick-start.md.
More ways to run it: Docker Compose · Coolify · Railway · Render.
The image is published for amd64 and arm64 at ghcr.io/waj-1/ai-engine.
Related MCP server: SideButton
Features
An agent here is a row of configuration: instructions, a model, tools from the MCP servers you connect, and optionally other agents it can hand off to. Changing an agent is an edit, with nothing to rebuild.
Admin portal. Create, edit and publish agents at
/admin. GuideAdmin MCP server. Your AI assistant builds and tests agents at
/mcp, with the same steps as the portal. Connect your AI assistantChat API. Each published agent answers at
POST /v1/agents/{slug}/chat, streamed. Talk to an agentOpenAI-compatible API.
/v1/chat/completionsand/v1/models, so OpenAI SDKs and chat apps can use an agent as a model. docs/openai-compatible.mdVoice. Calls at
WS /v1/agents/{slug}/voicewith Gemini Live or Azure Voice Live. docs/voice.mdKnowledge bases. Upload documents and the agent gets a search tool. Guide
Test suites and model comparison. Measure a change to the instructions or the model before it ships. Test a change
Agent teams. A parent agent hands off to specialist agents. Guide
Local models. A model served by Ollama needs no API key. docs/local-models.md
Claude plugin. Skills that build, test and improve agents from Claude Code. Plugin
This is an early release. What is in this README works today on a fresh database. If it is useful to you, a star helps other people find it.
How it compares
Dify, Flowise and Langflow are mature, much larger projects built around a visual canvas (Flowise was archived in August 2026). This one is young and takes a different route.
WAJ AI Engine | Dify | Flowise | Langflow | |
How you build | Configuration, from a portal or over MCP | Visual workflow canvas | Visual canvas | Visual canvas |
License | Apache-2.0 | Apache-2.0 with added conditions (multi-tenant use, logo) | Apache-2.0, with enterprise directories under a commercial license | MIT |
Maturity | Early release | Since 2023 | Since 2023, archived August 2026 | Since 2023 |
Choose one of them for a drag-and-drop canvas and a large library of ready integrations. Choose this when you want your tools to come from MCP servers, your AI assistant to do the building, and tests in front of every change.
Detailed comparisons: docs/compare/.
Build an agent
In the portal:
Agents › Models › New model: add a model.
Connections › Connect server: the address of an MCP server that exposes your systems. Untick the tools agents should never use.
Agents › New agent: pick a template, name the agent and choose its model. "Support desk" answers at
/v1/agents/support-desk/chat.On the agent: write Instructions, choose Tools & knowledge, and set Status › Active under Settings to publish.
Test, on the agent's page, talks to it, draft or published.
More: create an agent, agent teams, categories.
Talk to an agent
The chat API takes an API key. Use the key from first-run setup, or create one with Chat only access under Settings › API keys.
export AI_ENGINE_API_KEY=wae_...
curl -N http://localhost:8000/v1/agents/demo/chat \
-H "Authorization: Bearer $AI_ENGINE_API_KEY" -H "Content-Type: application/json" \
-d '{"message": "What can you help me with?"}'The reply streams as server-sent events: a session event, the answer in
answer chunks, then usage and done. To continue the conversation, send
the session event's id back as session_id. Each key has its own
conversations, and GET /ai/sessions with the key lists them.
From an OpenAI client: docs/openai-compatible.md
By voice: docs/voice.md
Connect your AI assistant
The admin MCP server at /mcp takes an API key with Full access. Add it
to Claude, Cursor or any MCP client:
{
"mcpServers": {
"waj-ai-engine": {
"type": "http",
"url": "http://localhost:8000/mcp",
"headers": { "Authorization": "Bearer wae_..." }
}
}
}The tools for each build step are listed in docs/connect-your-assistant.md.
Claude Code plugin
The plugin sets the server up and adds skills that build an agent, test it, improve its instructions and compare models:
/plugin marketplace add waj-1/ai-engine
/plugin install waj-ai-engine@waj-ai-engineTest a change before it ships
From Testing in the portal, or over MCP: write test suites (a question, the words or tool calls the answer must contain, or a rubric for a judge model), run them against any agent, draft or published, and compare two runs case by case. A suite can also run against a draft of the instructions without serving it, or on another model.
More: testing guide, the MCP tools for each step.
To run a suite on every pull request, use the GitHub Action: it fails the job when the pass rate drops.
Configuration
docker compose up generates what the stack needs and turns on the chat API
and the MCP server. .env.example lists every variable the engine reads, and
docs/quick-start.md explains the ones
worth knowing. Model providers: Google Gemini, OpenAI, Azure OpenAI,
Anthropic, Ollama, and any OpenAI-compatible endpoint. Running, upgrading and
backing up the stack: docs/deploy/compose.md.
Contributing and security
Issues and pull requests are welcome. See CONTRIBUTING.md, and docs/development.md for how to run the tests. Please report vulnerabilities privately as described in SECURITY.md.
License
Apache-2.0. See LICENSE.
Available Tools
51 toolsagent_typesA
User-defined agent categories ("Support", "Sales", "Internal
tools"): groups for the Agents list, its filter and reporting. A
category is data, not an agent kind — it never changes how an agent
runs, is not part of a promote snapshot, and a fresh install has none.
action: list (every category in order, each with agent_count) |
create (display_name; optional slug, description, color, sort_order) |
update (agent_type + any of display_name, description, color,
sort_order) | delete (agent_type, confirm=true — the agents in it are
NOT deleted, they become uncategorised; without confirm it reports how
many agents that is). Put an agent in a category with
update_profile(agent_type=...) or templates(action="use",
agent_type=...); filter with list_profiles(agent_type=...). Mirrors the
portal's Agents › Categories screen.
Inputs: env, slug, color, action, +5 more. Returns: result
api_keysA
Portal-issued API keys (api_keys table; mirrors Settings > API keys,
via admin.services.api_keys). A key is sent as Authorization: Bearer wae_... to POST /v1/agents/{slug}/chat (scope chat or admin) or to this
MCP server (scope admin only).
action: list (name, key_prefix, scopes, created_at, last_used_at,
expires_at, status = active|expired|revoked; never the key) | create
(name, scopes, expires_in_days) | revoke (key_id; confirm required, takes
effect on the key's next request and cannot be undone).
create returns the key ONCE, in `key`. Only a SHA-256 digest is stored, so
it can never be read again: hand it to the user straight away, and do not
write it to a file, a log or a commit. Keys are per engine instance, not
per environment, so there is no `env`. Creating an `admin` key hands out
full control of this engine. Both writes are audited under the caller.Inputs: name, action, key_id, scopes, +3 more. Returns: result
auditA
agent_audit_log operations (mirrors GET /admin/audit,
GET /admin/audit/{id}, POST /admin/audit/verify). action:
list (optional entity_type filter, newest first, paged via
limit/offset) | get (audit_id) | probe_write (verify is its old,
deprecated name).
probe_write WRITES one row and verifies nothing: like the portal's
"verify" button it records a liveness marker
(record_change(entity_type="agent_audit_log", entity_id=<all-zero
uuid>, action="CALLEE_VERIFY")) proving a superuser can still write to
the log. There is no hash chain to walk.Inputs: env, limit, action, offset, +2 more. Returns: result
bakeoffsA
Generic bake-off: N profile-version variants x M suites of ONE profile (agent_bakeoffs) — spawns one agent_eval_runs row per (variant, suite) via the same start_suite_run trigger_eval_run uses, then rolls the linked runs into a per-suite + aggregated matrix (same shape as eval_runs action=matrix). Mixed read/write tool like eval_suites/eval_schedules — create mutates, list/get are read-only — so left unannotated rather than READ_ONLY (that would misdescribe create).
action=create: name, profile_id, variants (>=2 required, each
{label?, profile_version_id?, model_id?, gen_config?} — gen_config
keys are temperature?/thinking_level?/max_output_tokens?/top_p?; a
blank or duplicate label is auto-defaulted to "variant N" / suffixed
" (2)", " (3)", ... so every matrix row stays distinct), suite_ids
(>=1 — every suite needs an evaluator_model_id set), repeats (per
variant/suite run, clamped 1-20 by create_bakeoff itself — a raw
repeats=500 fans out at most 20x variants x suites runs, not 500x).
Two pre-flight checks run BEFORE anything is written — every suite has
a judge, and every variant's profile_version_id (when given) actually
belongs to profile_id — so a bad input fails with one clear ValueError
instead of a half-spawned bake-off; on success returns
{bakeoff_id, run_ids}.
action=list: recent bake-offs (agent_bakeoffs), decorated with
n_variants/n_suites/_profile_name — does not load linked runs (that's
action=get).
action=get: bakeoff_id -> {bakeoff, matrix, status}. status is
recomputed from the linked agent_eval_runs rows ('complete' iff every
linked run has reached a terminal status, else 'running') unless the
row is already stuck 'errored' (sticky — set when create's pre-flight
or spawn loop failed). Optional suite_id narrows matrix to just that
suite's rows ({"rows": [...]}); omitted, matrix is the full
{"rows": [...], "by_variant": [...]}.Inputs: env, name, limit, action, +6 more. Returns: result
caching_analyticsARead-only
Prompt-cache insights (read from the tracing store): overall cache hit
rate, cache-read tokens, estimated USD saved, a cached-vs-uncached token
time series, and a per-agent cache-hit-rate breakdown. A focused slice of
the Live Monitor / /admin/live/analytics.json for "how much are we saving
from caching / which agents cache well". Cache-read is read from the
auto-instrumented gen_ai.usage.cache_read_input_tokens span attribute
(deduped to the LLM span); hit rate = cache_read / total input tokens.
hours is clamped to [1, 8760]; trace_env (dev|staging|prod|'') scopes to
traces tagged with that environment (environment is the deprecated alias);
env (staging|prod) selects the config branch used to price the savings
estimate.
Inputs: env, hours, trace_env, agent_kind, +1 more. Returns: result
channelsA
agent_channels registry (mirrors /admin/channels*). action: list (optional kind filter — an unrecognized kind is silently ignored, same as the portal's chip filter) | get (channel_id) | create (slug, name, kind, ...) | update (channel_id + fields — same validation as create) | delete (channel_id, confirm=true — soft is_active=false; channels are referenced from traces/log analytics so this never hard-deletes).
Reads AND writes go through the env-branch client (client_for_env),
matching the portal, whose channel writes follow the env switcher
(admin_service_client) since the env-client-symmetry sweep.Inputs: env, kind, name, slug, +12 more. Returns: result
chatA
Run ONE chat turn against an agent through the same path the portal's test-chat widget uses: a POST to the profile's endpoint_path with your operator JWT, collected server-side. Returns {reply, tool_calls, trace_id, session_id, latency_ms, errors, served_by, status}. Pass the returned session_id back to continue the conversation.
Which config answers: profile_id ITSELF — a draft copy or a specialist
answers as itself (X-WAJ-Profile-Id, operator-only, same agent_kind as
the endpoint), exactly like the widget. profile_version_id instead pins a
saved snapshot. Each kind's own body is built for you (the AI-agents
demo's `agent` key + case_id); pass back the returned `state` with
session_id to continue a demo conversation.
env = this process's own environment runs in-process; the other env
goes to its default deployment target (deployment_targets).
tool_calls come from the persisted assistant message (name, input,
output — outputs capped at 2000 chars); trace_id is the turn's trace
(open with traces action=overview / transcript). Both can be null if
the agent doesn't persist/trace that turn; the reply is still
returned. This is a REAL turn: it runs the agent's tools and writes
chat history, as the widget does.Inputs: message (required), profile_id (required), env, state, +6 more. Returns: result
conversation_insightsARead-only
How conversations ended, what they were about and which language
customers used — the Overview's "What happened in conversations" section
(admin.screens.insights.build_insights), same payload: outcomes
(resolved / escalated / abandoned / unknown with count, pct and the
change in points vs the previous period), topics (top labels, merged
across agents), languages, channels (chat/voice), agents (per-agent
outcome mix, resolved %, top topic). available: false = the insights
table could not be read (unknown, not zero); has_data: false = nothing
analysed in the period yet (collecting). Outcomes are an estimate: a
hand-off action in telemetry, else an AI reading of the transcript.
Partner builds only ever see their own agents. Rows come from the
background sweep in core/conversation_insights.py (~30 min after a
conversation goes quiet; the last 30 days are backfilled in batches).
Inputs: period, trace_env, agent_kind. Returns: result
deployment_targetsA
CRUD for deployment targets (agent_deployment_targets) —
per-(environment, label) service URLs the E2E runner and cross-env
promote read instead of AI_AGENT_BASE_URL_* env vars. env selects
which branch DB to operate on (client_for_env); environment is the
row's own environment column (staging|prod, unique together with
label) and defaults to env when omitted. action: list (optional
environment filter) | get (target_id) | create (environment, label,
base_url, ...) | update (target_id + fields) | delete (target_id,
confirm=true). Setting is_default=true clears the default flag on
every sibling row sharing the same environment (only one default per
env), mirroring the portal's /admin/deployments Targets tab.
Inputs: action (required), env, label, confirm, +8 more. Returns: result
diff_profilesARead-only
Field-by-field diff of two profiles a -> b (scalars, tools, data sources, MCP servers, sub-agents, prompt lineage). Pass the pair as ids=[a, b] (the convention every pair-taking tool shares) or as profile_a/profile_b.
Inputs: env, ids, profile_a, profile_b. Returns: result
drift_checkARead-only
Check whether each agent profile's SERVED prompt (resolved through
prompt_version_ids — not the newest version) passes
core.prompt_validator.validate_prompt — the same gate
admin_mcp/tools_configure.py's publish path runs before a write — plus a
registry of config levers whose wrong value is silent
(voice_config.barge_in_enabled, voice_config.answer_watchdog_sec,
memory_config.enabled on a voice profile, ... — voice_config is FLAT since
2026-08-17; the old voice_config.live.* paths are what an unmigrated row
still stores, not where a lever is read from). A served prompt DIFFERING
from the repo constant is expected under DB-authoring (prompts change
through MCP/API/DB, never a merge) and shows as info when the
validator has real rules to check it against, warning when it does
not (unconfirmed, not proven safe). What is still critical is the
served version FAILING validation outright — the modern shape of "is my
merged prompt fix actually live?": every scripts/seed_*.py /
admin/seed_*.py is insert-if-missing, so once a row exists a seeder can
NEVER push a repo edit into it, and a profile can stay pinned to a bad
version indefinitely unless something checks for it. Findings whose summary carries
"[INCIDENT LEVER LEFT ENGAGED]" are config levers pulled during a past
incident and never restored — a different failure mode from "never
configured" and worth flagging louder; summary.incident_levers_engaged
counts them. want_diff=False by default: a prompt diff can be large and
half Arabic, expensive to put in an LLM's context — pass true only when
you need the actual text delta. profile/agent_kind optionally narrow the
findings (profile matches the exact agent_profiles.slug a finding is
about; agent_kind matches that slug's agent_kind per the check
registry — best-effort, only as complete as PROMPT_CHECKS' coverage).
Every fetch is scoped to ONE agent_profiles.environment — this process's
own — and the AI project is a single DB holding every environment's rows,
so drifted: 0 describes that environment and nothing else. The audited
value is returned as audited_environment; quote it whenever you report a
verdict. Read-only: this reports drift, it does not fix it — publish the
fix with prompts action=serve / update_profile.
Inputs: profile, want_diff, agent_kind. Returns: result
e2e_runsA
E2E test runs against a deployed environment (agent_e2e_runs).
action: trigger (profile_id, env — runs the profile's active eval
suite(s) scenario-by-scenario against its live endpoint_path in
env, judge-scored when the suite has an evaluator_model; launches
a background job and returns job_id immediately) | get (run_id) |
list (recent, optional profile_id filter).
Inputs: env, limit, action, run_id, +1 more. Returns: result
env_varsA
CRUD for agent_env_vars — a third env-var lookup location (behind
os.environ) resolved by core.env_resolver. env selects which branch
DB to operate on (client_for_env); row_environment is the row's own
environment column and defaults to env when omitted (environment is
its deprecated alias, still accepted). Secret rows
(is_secret=true) are masked to "••••" in list/get output AND in audit
before/after payloads, exactly like the portal's /admin/env Variables
tab. action: list (optional environment filter) | get (var_id;
reveal=true bypasses the mask and returns the real value, additionally
audited as action="reveal") | create (environment, name, value,
source, description, is_secret) | update (var_id + fields — pass
value="" to clear a stored value) | delete (var_id, confirm=true).
Inputs: action (required), env, name, value, +8 more. Returns: result
eval_runsARead-only
Eval-run results. action: list (recent, filter suite_id/profile_id;
rows include profile_id, schedule_id, bakeoff_id, profile_version_id so
a run can be traced back to what spawned/pinned it) |
get (run_id → status, score, the schedule_id/bakeoff_id/
profile_version_id linkage, and results_summary {scenarios, passed,
failed, pass_rate, failing[]} — each failing case carries trace_ids, the
agent's own traces for it (read them with the traces tool); include_results=true adds every
scenario's full result) |
report (suite_id → pass-rate trend over days) |
compare (run_ids=[baseline, ..., latest] — 2 or more runs; run_id +
run_b still works for a pair) → every scenario labelled
held | gained | regressed | still_failing (plus new | dropped when a
scenario is missing from one side), baseline → latest run, with a
per-run vs_baseline trail and labels counts; regressions sort
first. Also runs (summaries), matrix (the portal's N-column
pass-rate / latency / cost comparison) and, for a pair, a/b. |
matrix (run_ids[] or suite_id → per-(suite,variant) and per-variant roll-up
of mean score, pass-rate, p50/p95 latency & TTFT, tokens, cost) |
overview (the portal's Testing Overview: one card per agent with its
verdict and a row per text suite plus one kind="voice" row rolling up
its voice checks — score = share of checks whose latest call passed,
target 1.0).
Voice checks are runs too: list/get/compare accept voice-check run ids
(every row carries `kind`: text | voice; a voice run's `results` are its
checked call steps). compare refuses a mix of text and voice runs.Inputs: env, days, kind, limit, +7 more. Returns: result
eval_schedulesA
agent_eval_schedules CRUD + run-now. action: list | create / update (FULL replace of the schedule's config — mirrors the portal's edit form, which always resubmits every field; pass every field you want kept, not just the ones changing). profile_id, when supplied, DERIVES agent_kind via _sync_agent_kind (overriding any agent_kind also passed) the same way eval_suites binds a profile — a stale/unresolvable profile_id is ignored (falls back to whatever agent_kind was passed, if any) rather than erroring, mirroring the portal's schedule form. source=suite requires suite_id; source=live_chats requires agent_kind (directly or via profile_id) and judge_model — expectations, left blank, default to that agent_kind's standard judge rubric instead of erroring. delete (schedule_id, confirm=true) | fire (schedule_id — runs it now via the same launcher trigger_eval_run uses, then rolls last_run_at/next_run_at forward from cadence). cadence: manual | daily | weekly | monthly (next_run_at is computed from cadence; manual schedules never auto-fire).
Inputs: action (required), env, name, source, +12 more. Returns: result
eval_suitesA
agent_eval_suites CRUD + scenario import + repo re-sync. action:
list | get |
create (name; EITHER profile_id — agent_kind is then DERIVED from that
profile via _sync_agent_kind, overriding any agent_kind also passed, and
an unresolvable profile_id errors — OR agent_kind directly, one of this
build's suite kinds (legacy/no-profile path, unchanged); runner_kind
defaults 'chat' ('voice_live' grades a whole duplex-voice conversation —
see docs/admin-portal/03-test.md#voice-eval-suites-runner_kind-voice_live;
any other kind is a plugin's own runner, see 03-test.md);
default_context, when supplied, is stored as-is (e.g. a voice_live
suite's {"voice": {"mode": "sim", ...}}; runner knobs read from it:
concurrency (1-8 scenario attempts at once, default 4 — set 1 for
scenarios that must not overlap) and fail_on_tool_error (true = any
error-shaped tool result fails the scenario)); pass_threshold defaults 0.7,
is_active defaults false unless set true — mirrors the portal's "create
suite" dialog; scenarios, when supplied, are stored with the new suite,
each needing a question as in import_scenarios) | update (suite_id + only the fields supplied change;
profile_id, when supplied, re-derives and overwrites agent_kind the same
way as create; clear_profile=true UNBINDS an existing profile instead —
sets profile_id to NULL and leaves agent_kind untouched (the suite goes
back to being manually-managed, same as one that was never bound),
mirroring the portal edit form's "— none —" Profile option; a non-empty
profile_id takes priority over clear_profile if both are somehow passed;
with neither supplied, profile_id is left alone (back-compat for callers
that never mention profile_id at all); runner_kind, when supplied, must
be one of this build's runner kinds; name, when supplied non-blank, renames
the suite; scenarios, when supplied, REPLACES the whole array) |
import_scenarios (suite_id, scenarios — each needs a question; an
optional name is what the portal shows for the case (the question is
shown without one); a missing id is auto-slugified from the name, else
the question — APPENDS to the existing array,
doesn't replace it) | sync_from_repo (name = the suite's name field in
admin.seed_eval_suites._SUITES (the plugin's specs) — NOT suite_id, since the repo constant
has no suite_id; seeders are insert-if-missing, so a repo edit to an
already-seeded suite's scenarios/runner_kind/default_context/
pass_threshold never reaches a live DB on its own. Without confirm:
dry-run — resolves the repo entry and the existing DB row by name and
returns a diff summary (scenario id adds/removes, changed-scenario
count, and whether runner_kind/default_context/pass_threshold differ)
without writing anything. With confirm=true: applies the repo's
scenarios + runner_kind + default_context + pass_threshold onto the
existing row. Errors if no suite with that name exists yet in the DB
(this re-syncs an existing seeded row, it does not create one) or if
name isn't a known _SUITES entry).
Inputs: action (required), env, name, confirm, +10 more. Returns: result
fork_profileA
Fork a profile into a new staging draft (slug auto-suffixed). env
is the branch the SOURCE profile is read from. The copy carries the
source's model, prompt-version pins (the same version rows — not
copies), tool/KB/legacy-MCP id lists, sub-agents, endpoint and
voice/memory config. It does NOT copy the join-table attachments — MCP
attachments (what binds tools at runtime) and platform skills — so
re-attach them with profile_attachments. It starts as status='draft'
and delegatable=false, so it serves nothing until activated/promoted.
Inputs: profile_id (required), env. Returns: result
get_profileARead-only
Full config of one profile (by profile_id, or agent_kind+slug+env): the row plus resolved names for its tools, data sources, MCP servers, models, and prompt-version pins. When looked up by agent_kind without a slug, restricts to status="active" (matching what the portal serves) so the result is deterministic even if drafts/forks share the agent_kind; passing an explicit slug bypasses that filter and can return any status.
Returns BOTH the legacy `mcp_servers` label list (resolved from
`mcp_server_ids[]`, still driving the dark-launch snapshot) and the new
`mcp_attachments` (resolved from `agent_profile_mcp_servers`, the join
the flag-on resolver reads — see
core/agent_profile.py::_fetch_mcp_attachments). The two can disagree
while a profile still carries old labels; `mcp_attachments` is the
source of truth. `agent_type` is the agent's
user-defined category ({slug, display_name, color}) or null.
`fields` trims the raw `profile` row to the named columns (the row
carries large JSON blobs — voice_config, memory_config,
input_validators); the resolved label lists are always returned.
Prompt TEXT is not here — prompts(action="get", profile_id=...)
returns the served prompt content.Inputs: env, slug, fields, agent_kind, +1 more. Returns: result
jobsA
admin_jobs tracker (mirrors the Jobs tab of /admin/live + the
polling/cancel routes). env selects the branch the tracker rows live
on: an env-pinned spawn (the e2e_runs trigger, voice_scenarios run —
both wrap use_env(env)) writes its admin_jobs row to that env's branch,
so get/list/cancel must resolve the SAME one — pass the env the job was
triggered for. Single-DB deployments (cross-env vars unset) fall back
to the local branch, where any env value works. action: list
(status/kind filters — an invalid filter value returns an empty list
rather than erroring, same as the portal) | get (job_id) | cancel
(job_id — cooperative: flips status='cancelled' if the job is still
queued/running; cancel_applied=false means it had already finished.
Always audits the operator's intent, unconditionally, same as the
portal).
Inputs: env, kind, limit, action, +2 more. Returns: result
kb_sourcesA
CRUD + inline upload for the KB registry (agent_data_sources).
action: list | get | create (name, kind, ...; pgvector sources default
to the shared ai_kb_embeddings/ai_kb_pages tables when config.table is
omitted) | update (source_id + fields) | delete (source_id,
confirm=true — detaches from every profile's data_source_ids, then
hard-deletes) | upload_document (source_id, filename, content — stages
a page row and queues background chunk/embed ingestion; pgvector
sources only; refused with what to set when no embedding model is
configured). list also returns embedding: the model in force.
Inputs: action (required), env, kind, name, +12 more. Returns: result
list_profilesARead-only
List agent profiles in an environment (staging|prod), optionally
filtered by agent_kind, status (active|draft|specialist|archived|
template) and/or category (agent_type). Returns id, kind, slug, status,
model ids, endpoint, served version pin and agent_type (the agent's
category slug, or null) — paged by limit/offset (total, has_more say
what was cut).
Inputs: env, limit, offset, status, +2 more. Returns: result
list_usersARead-only
Portal users (the user table the portal's sign-in checks, newest
first) with their is_superuser flag. Read-only twin of users(action="list") — safe for a
host to auto-approve. Grant/revoke with users(action="set_superuser").
Inputs: limit, superusers_only. Returns: result
live_analyticsARead-only
Live KPI dashboard data (read from the tracing store): volume, cost,
latency percentiles, error rate, per-agent/channel breakdowns, top tools.
Same payload as /admin/live/analytics.json. hours is clamped to
[1, 8760]; status must be success | error | '' (both = no filter).
trace_env (dev|staging|prod|'') scopes to traces tagged with that
environment — unlike env elsewhere, this isn't restricted to staging|prod
since traces can carry a dev tag too (environment is the
deprecated alias). With tracing off (no tracing store configured) the
numbers are empty and notice says so. The per-bucket time series (series, buckets) is
dropped unless include_series=true — the totals and breakdowns answer
most questions and the series is the bulk of the payload.
Inputs: hours, status, channel, trace_env, +3 more. Returns: result
mcp_flag_parityARead-only
For every active agent profile in env, resolve its tool set the way
the runtime does (pool_for_kind + AgentProfileLoader.load_active +
resolve_mcp_tools_for_profile) and report what actually binds — the
health check to run right after profile_mcp_attachments action=set, to
confirm the wiring resolves rather than trusting the write succeeded.
Same payload/logic as GET /admin/api/mcp-flag-parity. Degrades
per-profile: one bad profile is reported with an error, never crashes
the whole report. CAVEAT: an unreachable external MCP endpoint (e.g. a
down partner sandbox) shows up as FEWER bound tools, not an error — the
resolver swallows that failure so one flaky external MCP can't take
down tool resolution for every profile. A low tool count on an
external-source profile means "check the endpoint is reachable", not
necessarily "the attachment is wrong".
Inputs: env. Returns: result
mcp_serversA
CRUD + bundle-membership for the MCP-server registry (agent_mcp_servers / agent_mcp_tools / agent_profile_mcp_servers): both kinds of server, bundles and external endpoints.
A server row is either source="external" (a live MCP endpoint reached
over transport/endpoint, optionally filtered by the legacy server-level
tool_subset) or source="bundle" (a named group of agent_tools wired via
agent_mcp_tools membership; no endpoint/transport of its own). Built-in
bundles (is_builtin=True) are seeder-managed and read-only here —
update/delete/members all refuse them with the same message the portal
uses. The reserved `__builtin__:` name prefix can't be claimed via
create/update either.
action:
list — every server (both sources).
get (mcp_server_id) — the row + `members` (bundle membership, as
[{tool_id, python_name, position}]) + `attached_count` (profiles
wired to this server via agent_profile_mcp_servers).
create (source="bundle"|"external", name, ...) —
external needs endpoint (+ transport, default "http"; optional
auth_env_var/tool_subset/context_fields);
bundle needs name (+ optional usage_guidance/context_fields);
member_tool_ids seeds agent_mcp_tools membership in the given
order (validated against non-deprecated agent_tools first).
update (mcp_server_id + fields) — name/transport/endpoint/
auth_env_var/usage_guidance/tool_subset/context_fields/is_active.
Refused for is_builtin rows.
delete (mcp_server_id, confirm=true) — detaches the id from every
profile's legacy mcp_server_ids[], deletes its agent_mcp_tools and
agent_profile_mcp_servers rows, then the server itself. Refused
for is_builtin rows.
members (mcp_server_id, member_tool_ids) — reconciles a BUNDLE's
agent_mcp_tools membership: delete-all then re-insert in the given
order (position 0..N-1). Only valid for source="bundle"; refused
for is_builtin rows.
discover (endpoint, auth_env_var) — live tools/list probe of a
candidate external endpoint, SSRF-guarded (blocks loopback/
link-local/cloud-metadata hosts unless MCP_ALLOW_LOCAL_ENDPOINTS
is set truthy). Read-only — no DB write, no audit. Always returns
an {"ok": bool, "tools": [...], "error", "error_class"} envelope,
never raises.
Unknown action: list | get | create | update | delete | members |
discover.
Inputs: action (required), env, name, source, +11 more. Returns: result
memoryA
Per-user memory + per-agent memory_config (mirrors /admin/memory). action: get_config (agent_kind -> the active profile's memory_config, defaults-merged) | set_config (agent_kind, config: a nested memory_config dict — same shape agent_profiles.memory_config stores; unlike the HTML form this skips the checkbox/flat-field parsing layer since a tool call already supplies structured JSON) | list (agent_kind, user_id: uuid or email -> that user's ai_user_memory rows) | add (user_id: uuid or email, content, agent_kind; business_id where the build's plugin has businesses) | assign (memory_id, agent_kind=custom: — move a custom-kind memory that belongs to no agent yet to that agent) | edit (memory_id, content — re-embeds via the same embedder the runtime uses; proceeds without an embedding if the embed call fails, same as the handler) | pin (memory_id, pinned=true/false) | delete (memory_id, confirm=true — soft-archive, status='archived').
Each generic agent keeps its own memories: pass agent_kind
`custom:<slug>` (the value the Memory screen's picker uses) to list or
add one agent's. `list` for such an agent also returns
`unassigned_memories`: the user's custom-kind rows saved before memories
were kept per agent, which no agent recalls until assigned.
get_config/set_config target "the active profile for agent_kind in env"
by default. Pass `profile_id` to read/write one SPECIFIC profile's
memory_config instead — a draft, a fork, or a voice specialist (the
voice brain's memory_config lives on the specialist row, which the
agent_kind lookup never reaches). list returns at most `limit`
memories (default 50).Inputs: env, limit, action, config, +8 more. Returns: result
mentionablesARead-only
The @-mention catalog for a profile's system prompt: its own tools, MCPs, and KBs (names usable as @[tool|mcp|kb:name] tokens). Scoped to the profile — no org-wide/cross-tenant catalog.
Inputs: profile_id (required), env. Returns: result
modelsA
Agent-model registry (agent_models). action: list | get | create (name, provider, model_string, ...) | update (model_id + fields) | promote (model_id, target_env) — clones the model to the sibling env, idempotent on (name, environment).
Inputs: action (required), env, name, model_id, +7 more. Returns: result
profile_attachmentsA
Attach or detach individual tools, KB sources, MCP servers, skills or
sub-agents on a profile WITHOUT re-sending the whole list. add keeps
every existing item (and its order/tool_subset) and appends the new
ids; remove drops only the given ids. Re-adding an attached id or
removing one that isn't attached is a no-op, reported in unchanged.
Every id is validated before any write (unknown/deprecated tools,
missing KB sources/profiles, non-attachable MCPs, non-platform or
wrong-kind skills are refused with nothing written). Same audit trail
and cache invalidation as the replace-all paths, which still work:
update_profile(tool_ids=...), profile_mcp_attachments(set),
profile_skill_attachments(set).
Returns {kind, profile_id, items: [...] (after), added, removed,
unchanged}.Inputs: kind (required), profile_id (required), env, ids, +2 more. Returns: result
profile_mcp_attachmentsA
Manage a profile's MCP attachments (agent_profile_mcp_servers — the
source the flag-on MCP resolver reads). action:
list → current attachments + the attachable MCP set for this profile;
set → REPLACE the profile's attachments with attachments, a list of
{mcp_server_id, tool_subset?} (tool_subset omitted/null = all of the
MCP's tools). Detaches any MCP not in the list. Each MCP must be
attachable (scope-visible) and every pinned tool_subset name must
be one of that MCP's real tools; validated before any write.
No confirm gate — matches the portal, which reconciles this join
freely (it's reversible config, not a destructive delete).Inputs: profile_id (required), env, action, attachments. Returns: result
profile_skill_attachmentsA
List or replace a profile's PLATFORM skill attachments (agent_profile_skills — the set the runtime catalogs each turn). action: list → current attachment rows in position order; set → REPLACE the join with skill_ids in order (position = index). Only active platform skills (business_id null) matching the profile's agent_kind attach; tenant skills resolve dynamically and are never pinned. No confirm gate — reversible config, matching the portal. To add/remove ONE skill without re-sending the list, use profile_attachments(kind="skills").
Inputs: profile_id (required), env, action, skill_ids. Returns: result
profile_versionsA
Per-(profile, environment) version history + served-version pin — the MCP surface for the agents screen's version bar (save / view / pin / restore), delegating to admin.services.profile_versions so the portal and MCP stay in lockstep (the eval-work lesson). Mixed read/write (list/view read; save/restore/pin mutate) — left unannotated rather than READ_ONLY, same reasoning as prompts/models/tools.
action:
list — version history for profile_id in env, newest first:
[{version_id, version_number, promoted_at, notes, is_served}].
view (version_id) — that version's resolved config snapshot.
version_id must belong to profile_id (same ownership guard
restore/pin use) — errors otherwise.
save (notes optional) — snapshot the profile's CURRENT live/draft
config into a brand-new version via the same
runtime.compiler.compile_profile_snapshot promote uses; does NOT
change what's served. Returns {version_id, version_number}.
restore (version_id) — copy that version's config back onto the live
draft row (identity fields agent_kind/slug/display_name/
description untouched), filtering out any tool/data-source/
MCP-server/model/prompt-version reference that no longer exists in
this env (reported in `dropped`); never changes served_version_id
— save afterwards to turn "editing a copy of vN" into a new
version. Returns {restored, dropped}.
pin (version_id, or "" to clear) — set/clear
agent_profiles.served_version_id, the exact
agent_profile_versions snapshot AgentProfileLoader serves for this
profile+env (clearing reverts to default resolution). Returns
{served_version_id}.
diff (version_id → that version vs the LIVE/draft row; or
ids=[version_a, version_b] → two saved versions) — the portal's
version-diff view: {changes: ["model_main_id: 'x' -> 'y'",
"tools: +a, -b", ...]}; include_detail=true adds the full
structured diff. Read-only.
All writes run inside use_env(env) so reused portal service code
resolves the right env branch, and are audited by
admin.services.profile_versions itself (its own record_change calls —
no separate MCP-level audit, so a save/restore/pin produces exactly
one audit_log row, not two). ValueError from the service layer
(profile/version not found, or a version_id that belongs to a
different profile) surfaces as the standard err() payload via
@tool_errors.Inputs: action (required), profile_id (required), env, ids, +3 more. Returns: result
promote_profileADestructive
Promote a profile to target_env (staging|prod): eval-gate check, cross-env write, compile-on-promote snapshot.
DRY-RUN BY DEFAULT. Without confirm=true nothing is written: you get
{"confirmed": false, "would": ..., "preview": {changes, eval_gate,
prompt_tool_mismatch, blockers}} — a plain list of what the promote
would change in target_env (model, prompt versions, tools, KB, MCP
attachments, sub-agents; or "creates a NEW profile"), and what would
block it. Re-call with confirm=true to apply.
With confirm=true: a failing eval gate comes back as {error:
eval_gate_failed, score, threshold, hint} — fix and re-run evals, or
re-call with force=true AND confirm=true (audited override).Inputs: profile_id (required), target_env (required), env, force, +1 more. Returns: result
promotion_statusARead-only
The staging-vs-prod promotion board (the portal's /admin/env Promote
tab) as data: per agent_kind, the staging and prod profile rows (slug,
status, served version pin), each one's latest eval vs its suite
threshold, and promotable — true when a staging row passes (or has
no) eval gate. Read-only; promote with promote_profile.
Inputs: agent_kind. Returns: result
prompt_optimizeA
LLM-assisted prompt rewrite from a failing eval run — the portal's
/admin/prompts/{id}/optimize, non-streaming. Same helpers: the failing
scenarios of run_id and the prompt's newest version go into
build_optimizer_meta_prompt, and model_id writes the rewrite.
Returns {proposal: {content, chars}, diff_stat (vs the current newest
version), validation: {problems}, failing_scenarios}. With
confirm=true the proposal is saved IN-PROCESS as version N+1 (so a
half-Arabic body never round-trips through the client) after the same
validation gate create_version uses; it is NOT served until you pin it
(prompts action=serve). Takes as long as one LLM call.Inputs: run_id (required), model_id (required), prompt_id (required), env, +4 more. Returns: result
promptsA
Prompt text + prompt-version operations. action: get — the FULL TEXT of one version: by version_id | prompt_id (+ version_number, default newest) | profile_id + prompt_key (the version that profile SERVES — what callers actually get). Returns {prompt_id, slug, agent_kind, version_number, prompt_version_id, content, notes, chars, is_served?}. max_chars truncates. list — prompt slots with short previews: profile_id → that profile's pinned prompts (key, version, preview); agent_kind → every agent_prompts slot of that kind with its newest version's preview; prompt_id → that prompt's versions with previews. list_versions (prompt_id) — versions without content (legacy shape). create_version (prompt_id, content, notes; for a custom agent pass profile_id + content instead — its own prompt is used and the new version is pinned in the same call) | serve (pin a version on a profile: profile_id, prompt_key, version_id) | diff — ids=[version_id_a, version_id_b] (or prompt_id + version_a + version_b numbers): a unified diff (capped at 400 lines) + diff_stat; include_content=true adds both bodies | publish_from_repo (see below). To rewrite a prompt from a failing eval run, use the prompt_optimize tool.
publish_from_repo is the way to get a repo prompt constant onto a live
stack: it imports the constant itself (so a half-Arabic body never
passes through the MCP client/shell, where quoting would corrupt it),
diffs it against what's actually served, and — with confirm — inserts
the new version and repoints in one call.
Params: `constant` (dotted path, must resolve under the
`runtime.prompts` package — e.g.
"runtime.prompts.agents_demo.SUPPORT_SYSTEM_PROMPT"); `prompt_id` to target
directly, OR `profile_id` + `slug` to resolve one (looked up as the
`agent_prompts` row for `(that profile's agent_kind, slug)`, same
(agent_kind, slug) keying seed_prompts.py uses); `profile_id` +
`prompt_key` (default "system") for the repoint target; `notes`
(optional — if omitted, the CURRENTLY SERVED version's notes are
carried onto the new one, so publishing a chat prompt fix never
accidentally reuses a voice profile's notes string or vice versa, a
known seeding gotcha); `confirm` (default False).
Behavior: if the served version's content already equals the constant,
returns `{"already_current": True, ...}` and writes nothing. Without
confirm, returns a dry run — current version number/id, a `diff_stat`
(char counts + first differing line — never the prompt body), AND a
`validation` block (the same problems a confirmed call would be
checked against, so a human sees red flags before deciding to
confirm). With confirm, VALIDATES the constant's content
(core.prompt_validator.validate_prompt) before writing anything —
inserts version N+1 via the same path create_version uses and
repoints via the same path serve uses, and returns
`{"published": True, ...}`.
VALIDATION GATES EVERY WRITE PATH — create_version, serve and
publish_from_repo's confirm branch all run
`core.prompt_validator.validate_prompt` before writing. An
error-severity problem (a size-budget breach, a missing/reverted
bilingual half, or a descriptive-instead-of-imperative `ask_agent`
instruction — see that module) REFUSES the write and returns
`{"error": ..., "problems": [...]}` with nothing inserted or repointed.
`serve` is included deliberately: pinning an existing bad version onto
a profile is the same failure as publishing a new bad one.
`override_validation` (default False) forces a write through a
validation failure. It is deliberately a TWO-flag act — it does
nothing without `confirm=true` too — and every override is recorded
via `actor_audit` (action="validation_override", carrying the full
problem list) so a forced publish stays visible in the audit trail
even though it succeeded. `create_version` and `serve` validate with no
named repo constant to check size/bilingual rules against (they accept
arbitrary content with no such provenance) — only the universal
`ask_agent`-imperative rule runs there; `publish_from_repo` resolves a
canonical name from `constant` and gets the full check.Inputs: action (required), env, ids, slug, +15 more. Returns: result
provider_keysA
Model provider keys stored encrypted (table provider_keys; the portal's
Settings > Model keys). A stored key is used before the provider's
environment variable (GOOGLE_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY,
AZURE_OPENAI_API_KEY). No action ever returns a key: only its hint (last
four characters), who set it and when.
action: list (per provider: source = portal | environment | none, the
stored default key and named credentials; can_store is false, with the
reason in problem, when the server has no SECRET_KEY) | set (provider +
value, optional name; refused when SECRET_KEY is unset: a key is never
stored as plain text) | remove (provider, optional name, confirm=true;
the provider falls back to its environment variable) | test (provider,
optional name: asks the provider for its model list and returns
{ok, source, detail}, with the provider's own error on failure).
Inputs: action (required), env, name, value, +2 more. Returns: result
pytest_runsA
Pytest suite runs (agent_test_runs). action: trigger (suite ∈ smoke|unit_runtime|unit_admin|all — launches a background job and returns job_id IMMEDIATELY; this differs from the portal's /admin/tests page, which blocks the HTTP request until pytest finishes — poll via jobs action=get or pytest_runs action=get) | get (run_id) | list (recent runs). The trigger runs in this engine's own container against the local checkout (not env-scoped, unlike the eval/e2e tools' env= param) and returns a job_id to poll via the jobs tool.
Inputs: env, limit, suite, action, +1 more. Returns: result
runtime_flagsARead-only
Process-visible values of a small curated list of container-level
flags THIS process was booted with — plain os.getenv reads, not routed
through core/env_resolver.py, so they are invisible to the env_vars tool
and /admin/env-vars (which CRUD the agent_env_vars table, a different
read path entirely). Flags, not secrets — nothing on this list is
sensitive, and it must stay that way; never add a secret-valued var
here. Chiefly for VOICE_LIVE_SIM_ENABLED: endpoints/voice_live.py reads
it with a bare os.getenv, so a voice-eval sim run against a stack
without it set silently degrades to a real billable provider session
instead of erroring — check this before trusting a sim run's cost
profile. value is null when the var is unset on this process (not the
same as being set to an empty string).
Inputs: no named parameters. Returns: result
searchARead-only
Global search: screens and tabs, agents, models, tools, toolsets,
knowledge bases, skills, channels, tests, team, conversations and the
people in them (masked), Help/docs sections. Prefix > actions, @
people, ? docs. Returns {results: [{group, type, label, context,
sublabel, href, ...}]} ranked, max limit (<= 30). Same rows as
/admin/search.json.
Inputs: q (required), env, limit. Returns: result
skillsA
Manage agent skills (versioned instruction bundles with progressive disclosure — catalog in-prompt, bodies via the read_skill tool). action: list (all skills; filter with agent_kind/business_id) | get (skill + versions + latest version's resources; needs skill_id) | create (needs slug, display_name, description, agent_kind, content; optional business_id for a tenant skill, always_on) | update (metadata patch; needs skill_id — also archive/unarchive by passing status="archived"|"active"|"draft" and/or is_active; setting status="archived" forces is_active=False alongside it, mirroring the portal's "Archive skill" button (admin/skill_handlers.py::skill_archive), which always writes both columns together since core/skills.py's live resolver requires BOTH is_active=True AND status="active" to serve a skill) | create_version (needs skill_id, content; optional notes) | list_resources (skill_id [+ version_id]) — the version's bundled files (filename, content_type, size; no bodies) | add_resource (skill_id, filename, content [+ version_id, content_type]) — attach a file the agent can read on demand; same 64 KB cap and replace-by-filename behaviour as the portal | delete_resource (skill_id, resource_id, confirm=true).
Inputs: action (required), env, slug, notes, +15 more. Returns: result
templatesA
Protected catalog of forkable agent templates ("architecture molds"). action: list (browse the molds) | get (template_id → full config) | use (template_id + display_name → fork the mold into a NEW named draft agent; composite molds fork their sub-agent templates too; optional as_subagent_of=<profile_id> wires the new agent into that parent's sub-agents; optional model_id sets the new agent's model instead of the template's; slug, left blank where generic agents are on, is made from the name — "Support desk" -> support-desk; optional agent_type= files the new agent under that category, and an unknown category refuses the call before anything is created). Templates are read-only — there is no create/edit/delete.
Inputs: env, slug, action, model_id, +4 more. Returns: result
test_fixturesA
test_fixtures vault (mirrors the fixtures section of /admin/tests + GET /admin/test-fixtures/export) — real JWTs/UUIDs/secrets an operator records for pytest/eval runs against auth-gated endpoints. jwt/secret kinds are masked "••••" in list output and audit payloads (reuses test_fixtures_handlers.mask verbatim); export reveals real values, same as the .env.test download it mirrors. action: list (env) | create (name, kind, value, description) | update (fixture_id + fields) | delete (fixture_id, confirm=true) | export (env -> {"lines": ["WAJ_TEST<UPPER_NAME>=", ...]}).
Inputs: env, kind, name, value, +4 more. Returns: result
toolsA
agent_tools registry. Only kind="http" tools are writable here — Python tools are source-of-truth in code, same rule the portal enforces. action: list | get | create (python_name, description, endpoint_url, ...) | update (tool_id + HTTP config and/or metadata fields) | delete (tool_id, confirm=true — soft delete via is_deprecated) | dry_run (tool_id to test a saved tool, or endpoint_url/http_method/auth_env_var/timeout_seconds/argument_schema to test an unsaved config; args = sample kwargs).
`usage_guidance` (free text) and `context_fields` (JSON object) are
optional agent_tools columns consumed by the MCP tool resolver;
create/update accept them when supplied (usage_guidance empty→omit,
context_fields None→omit — no further validation).Inputs: action (required), env, args, scope, +15 more. Returns: result
tracesARead-only
Trace explorer (mirrors /admin/observability/explorer). action:
search (filters -> recent traces, newest first, paged by limit/offset:
{traces, total, offset, limit, has_more, notice, ...}) |
get (trace_id -> span tree) | span (trace_id + span_id -> full span
detail) | transcript (trace_id -> persisted conversation turns +
tool calls) | overview (trace_id -> session, per-tool rollup, errors) |
session (session_id -> that chat session's traces, newest first — the
portal's /admin/sessions/{id} lookup) | audio (trace_id, or session_id
-> call-recording METADATA for that conversation: duration, status and
the portal path of the playable WAV; never the audio bytes).
hours (search only) is clamped to [1, 8760]; status must be
success | error | ''; tool (search only) narrows to traces that called
that tool by name. search always returns tool_filter_applied: if a
tool filter was requested and this is false, the tracing store's
match query failed and traces is the UNNARROWED list for the window — do
not treat it as "every trace called tool".
Inputs: env, tool, hours, limit, +10 more. Returns: result
trigger_eval_runA
Fire an eval run and return its run_id immediately (background job). source=suite grades suite scenarios (optional variant overrides for model/prompt/gen-config comparisons; prompt_overrides maps a prompt to the version NUMBER to test instead of the pinned one, e.g. {"system": 3} for this agent's own instructions or {"<agent_kind>/": 3} — an entry naming no such prompt or version is refused, never ignored; repeats 1-20 for consistency; concurrency 1-8 = how many scenario attempts run at once (0 = the suite's default_context.concurrency, else EVAL_CONCURRENCY, else 4; voice_live suites always run one at a time); profile_version_id pins the run to one promoted profile snapshot, e.g. a bake-off variant — must belong to profile_id and the suite needs an evaluator model; voice_mode picks sim/live transport for a runner_kind=voice_live suite, overriding the suite's default_context.voice.mode — leave blank to use the suite default, which itself defaults to sim. live is a REAL, billable provider call and is manual-trigger-only: this tool (a human/agent calling it directly) is allowed, but a schedule or bake-off requesting live is rejected by _voice_live_guard). source=live_chats grades real recent chats — judge_model and expectations are REQUIRED there. Poll with eval_runs action=get.
Inputs: profile_id (required), env, top_p, source, +18 more. Returns: result
update_profileA
Update an agent profile's config. Only supplied fields change; list fields REPLACE the stored list (to add/remove ONE tool, KB source, MCP server, skill or sub-agent without re-sending the rest, use profile_attachments). Same audit trail as the portal.
`env` is the config branch the row is looked up in. `row_environment`
MOVES the row's own environment column (rarely what you want — promote
with promote_profile instead); `environment` is its deprecated alias.
`status`: one of active | draft | archived | specialist ('template' is
refused — that status is seeder-managed, fork one instead via
templates(action='use')). Setting status='active' is refused if
another row already serves this profile's (agent_kind, environment) as
status='active' + is_active=true — deactivate/archive that row first;
the core loader has no deterministic tie-break between two active rows.
`delegatable`: opt this profile in (or out) of being exposed to its
parent as an ask_<slug> delegation tool at runtime.
`agent_type`: the agent's user-defined category, by slug (manage the
list with agent_types). Organisational only — it does not change how
the agent runs, takes effect at once in every environment's row of the
same agent, and needs no promote.
`voice_config` is a FLAT block of voice settings since 2026-08-17 (the
duplex keys — barge_in_enabled, answer_watchdog_sec, agent_profile_slug,
persona_prompt_slug, the budget/ceiling knobs — sit at the top level; there
is no `live` sub-object any more). Both voice arguments REFUSE a top-level
`live` key: the runtime's compat shim resolves a nested block ALONE, so
re-creating one does not add a setting, it hides every flat key and takes
the agent's voice config offline silently.
`voice_config` REPLACES the entire column — passing
`{"barge_in_enabled": true}` WIPES every other voice key
(answer_watchdog_sec, agent_profile_slug, budget/ceiling knobs, ...),
and nothing reports it. Use
`voice_config_patch` instead to set one lever: it's deep-merged onto the
profile's CURRENT voice_config (nested dicts merged key-by-key; a
`null` value in the patch deletes that key; scalars/lists replace
wholesale) — see `admin.services.profiles.deep_merge_voice_config`. A row
still carrying the pre-unification nested shape is promoted to flat before
the merge, so patching also repairs it.
Passing both `voice_config` and `voice_config_patch` in the same call is
refused; pick one.Inputs: profile_id (required), env, status, tool_ids, +16 more. Returns: result
usersA
Admin users. action: list (users with superuser flag — or use the
read-only list_users tool) | set_superuser (user_id + grant=true/false,
confirm required — this grants/revokes FULL admin+MCP access).
Unannotated (mixed read/write): list no longer trips a host's
destructive-action prompt, set_superuser is still confirm-gated.
Inputs: grant, limit, action, confirm, +1 more. Returns: result
voice_budgetsA
Per-tenant daily duplex-voice allowances (ai_voice_budgets, audio seconds/day). action: list (each row includes used_today) | get | set (business_id + daily_seconds; upsert — business_id may be any tenant id, non-UUIDs are mapped to the same derived row the voice edge charges) | delete (tenant falls back to the engine default, VOICE_LIVE_DAILY_SECONDS). Mirrors the portal's Duplex-voice budgets card (on any realtime model's detail page — the allowance is per TENANT, not per model; POST /admin/voice-budgets is still the write route).
Inputs: action (required), env, note, business_id, +1 more. Returns: result
voice_insightsARead-only
Duplex-voice latency rollup — the Live Monitor's voice card
(admin.screens.observability.load_voice_live_insights): sessions,
assistant turns, tool calls, barge-ins, and p50/p95 of end-of-turn ->
first audio, end-of-turn -> spoken answer, delegate wall time and brain
LLM time, over the last hours (clamped to [1, 8760]). ch_ok: false +
notice means the tracing store was unreachable or is not set up
(numbers are blanks, not
zeros). For one call's audio use traces(action="audio").
Inputs: hours, trace_env. Returns: result
voice_scenariosA
Live duplex-voice acceptance scenarios (ai_voice_scenarios) — the
portal/MCP surface over admin/voice_scenario_runner.py. action:
list | get (slug) | set (slug + agent_kind + steps; upsert — step types:
say / expect_transcript / expect_frame / http_check / wait, shapes in the
runner's module docstring) | delete (slug) | run (slug; launches a
background job that places a REAL call against the engine's own
/voice/live — or target ws(s)://; headers are per-invocation HTTP
headers forwarded to the WS connection AND merged into each http_check
step's own headers — the way to carry a portal login cookie or other
secret for a deep protected-flow scenario without ever storing it on the
scenario row) | runs (recent results, optional slug filter). Runs need
AZURE_SPEECH_KEY on the service (else they land as status=skipped).
Inputs: env, slug, limit, notes, +9 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 51 tools
Despite 51 tools, each mostly targets a distinct resource or lifecycle stage (profiles, prompts, tools, MCP servers, KBs, skills, evals, analytics), and the descriptions explicitly disambiguate the known overlaps (profile_attachments vs profile_mcp_attachments/profile_skill_attachments, runtime_flags vs env_vars, live_analytics vs caching_analytics vs voice_insights). The real fuzzy pairs are users(action=list) vs list_users, and mentionables vs get_profile's resolved label lists, plus the several attachment paths that all touch the same join tables. An agent can recover from the descriptions, but misselection between attachment tools and between the analytics slices is plausible.
Two competing families coexist: verb_noun operations (update_profile, fork_profile, trigger_eval_run, promote_profile, diff_profiles) and bare resource nouns driven by an `action` parameter (prompts, tools, mcp_servers, eval_runs, traces, memory, jobs, chat). On top of that sit one-off shapes like mentionables, drift_check, mcp_flag_parity, profile_mcp_attachments and profile_skill_attachments, so the verb is sometimes in the name and sometimes in the argument. Everything is snake_case and readable, but the convention is not predictable from the name alone.
51 tools is double the already-heavy 25-tool threshold and sits at the rubric's extreme end, which makes enumeration and selection costly for a calling agent even though each tool covers a real domain. The surface would be far more usable split into namespaced servers (agents/prompts, evals, observability, platform config). The breadth reflects genuine product scope rather than padding, which keeps it off a 1.
Coverage is unusually thorough: full CRUD everywhere (profiles, prompts, tools, MCP servers, KBs, skills, suites, schedules, channels, env vars, deployment targets, users, API keys, audit) plus lifecycle operations (fork, promote, version pin/restore, dry runs) and diagnostics (drift_check, mcp_flag_parity). Gaps are minor: there is no blank-slate profile creation (only fork_profile or templates action=use) and no prompt deletion, both workable around. No dead ends for the core agent-authoring and eval workflows.
Maintenance
Related MCP Connectors
Free social platform for AI agents — boards with tool-call receipts; MCP server + REST API.
MCP server for building and testing AI agents with multi-model experimentation and insights.
The cloud for agents. Tools for AI agents to register, build, and deploy other agents. Zero human required.
AI agent registry — search, discover, register, and connect agents via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables deployment of autonomous AI agents with memory and tool execution capabilities through a WebSocket-based MCP protocol. Provides production-ready infrastructure with REST API access, persistent state management, and extensible function registry for building self-hosted AI systems.-

SideButtonofficial
AlicenseNot gradedqualityCmaintenanceOpen source AI agent platform with MCP server, browser automation, knowledge packs, and workflow engine. Works with Claude Code, ChatGPT, Cursor, and any MCP client.6Apache 2.0- FlicenseCqualityAmaintenanceSelf-hosted, source-available AI workflow automation platform. Build multi-agent, RAG, and tool-using pipelines on a visual canvas and publish any workflow as an MCP server (stdio/SSE/Streamable HTTP). Also an MCP client via the agent node.21,851-
- AlicenseNot gradedqualityCmaintenanceA self-hosted MCP server that gives AI agents controlled access to a machine: filesystem, shell, background processes, git, web fetching and persistent key-value memory.GPL 3.0