Agent Builder & Governance Console
Overview
Kelly Agent Builder is a Busabase Cloud App-in-Skill. Its canonical product
surface is the AirApp in Busabase, not a separate local-data product. The
same Hono source supports an explicitly requested local preview with OAuth
connection bootstrap. It is a platform team's governance console for a
catalog of mock agent configs. It never provisions or calls a real agent —
every action reads or writes a Busabase Base record. This is a generic,
brand-free tool: teams define a name, a trigger/intent description, a set of
allowed tools (from a fixed catalog), an approval flag, and a monthly call
quota, and this console tracks status and usage and gates the risky
transition (draft → live) behind required-field validation.
Default behavior is AirApp-first. Unless the user explicitly asks only for
explanation, update Busabase directly and give the user the clickable AirApp
URL. Start localhost only when local preview/debugging is explicitly
requested; it uses the same Busabase resources and never offers another data
provider.
Mandatory Dependencies
- Read and follow
$kelly-app-skill-creator for product behavior, visual
quality, responsive layout, and the complete canonical content/kelly-agent-builder-app/ artifact.
- Read and follow
$busabase for connection, target Space, node discovery,
ChangeRequests, review, and merge behavior.
- Read and follow
$busabase-app-creator for resource modeling, AirApp
runtime limits, security, validation, and deployment.
If a dependency is unavailable, preserve this skill's local artifact and
product contracts, stop before the unavailable Busabase operation, and report
the exact missing dependency. Do not invent a second data backend.
App UI Screenshots
Boundary
- This is a mock governance console. It never provisions, deploys, or
calls any real agent, model, or external tool. The "allowed tools"
checklist is a fixed local catalog (
content/kelly-agent-builder-app/app/js/tool-catalog.js) used only
for governance bookkeeping — selecting a tool here does not grant or invoke
it anywhere.
- The AirApp reads and writes Busabase records only; it must not call any
other remote system.
- No brand-specific integration exists or is implied.
Busabase Resources
Two Bases under one application Folder (kelly-agent-builder), declared in
content/kelly-agent-builder-app/app/js/config.js and the generated template sidecars under content/:
agents: agent-id, name, trigger-description, allowed-tools (JSON
array), approval-required, monthly-quota, calls-this-month,
owning-team, status, created-at, updated-at.
settings: one row per kind — kelly-agent-builder-onboarding (presence
marks setup complete; this skill has no external accounts or secrets to
configure) and kelly-agent-builder-lock.
Resources provision lazily through an idempotent Busabase ChangeRequest the
first time the app runs in a Space; see references/agent-config-schema.md
for exact field shapes and governance rules.
Authentication
Busabase authentication is ambient inside the deployed AirApp, which must not
show OAuth, API-key, Base URL, provider, hosting, or Space controls.
Standalone loopback preview uses browser OAuth without exposing tokens; after
OAuth it auto-selects a single/open-source Space or requires a native
selector when several Spaces are accessible.
Demo Mode
?demo=1 opens a deterministic, fully offline mock catalog (8 agent
configs spanning draft/live/paused/archived, one over-quota, one missing an
owning team) for documentation and screenshots.
lang=en or lang=zh forces UI chrome language for screenshots.
- Demo mode never reads or writes Busabase.
Governance Rules
Read references/agent-config-schema.md before editing the app or its
domain logic. In short:
- Draft → live is only allowed when
name, trigger_description, at
least one allowed_tools entry, non-empty owning_team, and
monthly_quota > 0 are all present. This is enforced in
content/kelly-agent-builder-app/app/js/providers/busabase-provider.js#activateAgent — the browser
form disables the button too, but the provider is the source of truth.
- Archive is allowed from any status. Archived agents become read-only.
- Pause is only allowed from
live.
- Needs attention = a draft with missing required fields, OR an agent
(any status) with no owning team, OR a quota-reached live agent
(
calls_this_month >= monthly_quota — reached, not strictly exceeded), OR
approval_required: true with no owning team assigned.
- Update validation: an edit that would leave an already-
live agent
missing any required field (e.g. clearing owning_team or
allowed_tools) is rejected, the same gate activate uses. Draft agents
remain freely editable.
Local App
content/kelly-agent-builder-app/app/index.html + content/kelly-agent-builder-app/app/app.js + content/kelly-agent-builder-app/app/styles.css +
content/kelly-agent-builder-app/app/i18n/messages.js: zero-build vanilla frontend with hash routing
(#/overview, #/catalog, #/agent/:id, #/agent/new, #/settings).
content/kelly-agent-builder-app/app/js/agent-model.js: pure governance rules
(missingRequiredFields, isQuotaReached, deriveAgent, summarize,
lifecycle transitions) shared by the busabase and demo providers.
content/kelly-agent-builder-app/app/js/providers/: busabase-provider.js (reads/writes via
busabase-sdk) and demo-provider.js (deterministic, read-only).
content/kelly-agent-builder-app/app/js/tool-catalog.js: the fixed tool catalog (web_search,
code_exec, file_read, file_write, send_email, calendar,
crm_lookup, db_query, slack_post, http_request).
content/kelly-agent-builder-app/server.js: thin Hono OAuth bootstrap + same-origin /api/v1 proxy to
Busabase — no business logic.
Safety
- Never provision or call a real agent, tool, or external system from this
skill's app.
- Keep
owning_team values as free text; do not validate against a real
directory service.
Completion Criteria
Finish only when:
- the skill contains the complete canonical
content/kelly-agent-builder-app/ project and
pnpm --dir content/kelly-agent-builder-app dev remains supported;
- all persistent config and agent data use
busabase-sdk and the declared
resource map — no local JSON, browser storage, or provider choice;
- local setup offers Cloud/custom URL OAuth plus the explicit Demo path,
while a deployed AirApp uses its ambient session;
- Overview, Catalog, Agent detail, and Help & Settings render on desktop and
phone widths;
pnpm --dir content/kelly-agent-builder-app run check and node --test pass.
1---2name: kelly-agent-builder3description: Busabase-backed App-in-Skill low-code agent configuration and governance console for a platform team. Use when the user invokes $kelly-agent-builder or /kelly-agent-builder, wants to review or edit a catalog of mock LLM agent configs, check quota usage, find configs that need attention, move a draft to live, pause a live agent, or archive an agent. Mock config/governance console only — it never provisions or calls any real agent.4---56# Agent Builder & Governance Console78## Overview910Kelly Agent Builder is a Busabase Cloud App-in-Skill. Its canonical product11surface is the AirApp in Busabase, not a separate local-data product. The12same Hono source supports an explicitly requested local preview with OAuth13connection bootstrap. It is a platform team's governance console for a14catalog of **mock** agent configs. It never provisions or calls a real agent —15every action reads or writes a Busabase Base record. This is a generic,16brand-free tool: teams define a name, a trigger/intent description, a set of17allowed tools (from a fixed catalog), an approval flag, and a monthly call18quota, and this console tracks status and usage and gates the risky19transition (draft → live) behind required-field validation.2021Default behavior is AirApp-first. Unless the user explicitly asks only for22explanation, update Busabase directly and give the user the clickable AirApp23URL. Start localhost only when local preview/debugging is explicitly24requested; it uses the same Busabase resources and never offers another data25provider.2627## Mandatory Dependencies28291. Read and follow `$kelly-app-skill-creator` for product behavior, visual30 quality, responsive layout, and the complete canonical `content/kelly-agent-builder-app/` artifact.312. Read and follow `$busabase` for connection, target Space, node discovery,32 ChangeRequests, review, and merge behavior.333. Read and follow `$busabase-app-creator` for resource modeling, AirApp34 runtime limits, security, validation, and deployment.3536If a dependency is unavailable, preserve this skill's local artifact and37product contracts, stop before the unavailable Busabase operation, and report38the exact missing dependency. Do not invent a second data backend.3940## App UI Screenshots4142<table>43 <tr>44 <td width="50%"><img src="assets/screenshots/overview.webp" alt="Agent Builder overview"></td>45 <td width="50%"><img src="assets/screenshots/catalog.webp" alt="Agent Builder catalog"></td>46 </tr>47 <tr>48 <td><strong>Overview</strong><br>Governance summary: live agent count, aggregate quota usage, and a list of agents that need attention with reasons.</td>49 <td><strong>Catalog</strong><br>Sortable, searchable table of every agent config with status badges, owning team, and quota usage.</td>50 </tr>51 <tr>52 <td width="50%"><img src="assets/screenshots/agent-detail.webp" alt="Agent Builder agent detail"></td>53 <td width="50%"></td>54 </tr>55 <tr>56 <td><strong>Agent detail / edit</strong><br>Tool checklist, quota input, approval toggle, owning team field, trigger/intent textarea, status, and lifecycle actions (activate / pause / archive).</td>57 <td></td>58 </tr>59</table>6061## Boundary6263- This is a **mock** governance console. It never provisions, deploys, or64 calls any real agent, model, or external tool. The "allowed tools"65 checklist is a fixed local catalog (`content/kelly-agent-builder-app/app/js/tool-catalog.js`) used only66 for governance bookkeeping — selecting a tool here does not grant or invoke67 it anywhere.68- The AirApp reads and writes Busabase records only; it must not call any69 other remote system.70- No brand-specific integration exists or is implied.7172## Busabase Resources7374Two Bases under one application Folder (`kelly-agent-builder`), declared in75`content/kelly-agent-builder-app/app/js/config.js` and the generated template sidecars under `content/`:7677- `agents`: `agent-id`, `name`, `trigger-description`, `allowed-tools` (JSON78 array), `approval-required`, `monthly-quota`, `calls-this-month`,79 `owning-team`, `status`, `created-at`, `updated-at`.80- `settings`: one row per `kind` — `kelly-agent-builder-onboarding` (presence81 marks setup complete; this skill has no external accounts or secrets to82 configure) and `kelly-agent-builder-lock`.8384Resources provision lazily through an idempotent Busabase ChangeRequest the85first time the app runs in a Space; see `references/agent-config-schema.md`86for exact field shapes and governance rules.8788## Authentication8990Busabase authentication is ambient inside the deployed AirApp, which must not91show OAuth, API-key, Base URL, provider, hosting, or Space controls.92Standalone loopback preview uses browser OAuth without exposing tokens; after93OAuth it auto-selects a single/open-source Space or requires a native94selector when several Spaces are accessible.9596## Demo Mode9798- `?demo=1` opens a deterministic, fully offline mock catalog (8 agent99 configs spanning draft/live/paused/archived, one over-quota, one missing an100 owning team) for documentation and screenshots.101- `lang=en` or `lang=zh` forces UI chrome language for screenshots.102- Demo mode never reads or writes Busabase.103104## Governance Rules105106Read `references/agent-config-schema.md` before editing the app or its107domain logic. In short:108109- **Draft → live** is only allowed when `name`, `trigger_description`, at110 least one `allowed_tools` entry, non-empty `owning_team`, and111 `monthly_quota > 0` are all present. This is enforced in112 `content/kelly-agent-builder-app/app/js/providers/busabase-provider.js#activateAgent` — the browser113 form disables the button too, but the provider is the source of truth.114- **Archive** is allowed from any status. Archived agents become read-only.115- **Pause** is only allowed from `live`.116- **Needs attention** = a draft with missing required fields, OR an agent117 (any status) with no owning team, OR a quota-reached live agent118 (`calls_this_month >= monthly_quota` — reached, not strictly exceeded), OR119 `approval_required: true` with no owning team assigned.120- **Update validation**: an edit that would leave an already-`live` agent121 missing any required field (e.g. clearing `owning_team` or122 `allowed_tools`) is rejected, the same gate `activate` uses. Draft agents123 remain freely editable.124125## Local App126127- `content/kelly-agent-builder-app/app/index.html` + `content/kelly-agent-builder-app/app/app.js` + `content/kelly-agent-builder-app/app/styles.css` +128 `content/kelly-agent-builder-app/app/i18n/messages.js`: zero-build vanilla frontend with hash routing129 (`#/overview`, `#/catalog`, `#/agent/:id`, `#/agent/new`, `#/settings`).130- `content/kelly-agent-builder-app/app/js/agent-model.js`: pure governance rules131 (`missingRequiredFields`, `isQuotaReached`, `deriveAgent`, `summarize`,132 lifecycle transitions) shared by the busabase and demo providers.133- `content/kelly-agent-builder-app/app/js/providers/`: `busabase-provider.js` (reads/writes via134 `busabase-sdk`) and `demo-provider.js` (deterministic, read-only).135- `content/kelly-agent-builder-app/app/js/tool-catalog.js`: the fixed tool catalog (`web_search`,136 `code_exec`, `file_read`, `file_write`, `send_email`, `calendar`,137 `crm_lookup`, `db_query`, `slack_post`, `http_request`).138- `content/kelly-agent-builder-app/server.js`: thin Hono OAuth bootstrap + same-origin `/api/v1` proxy to139 Busabase — no business logic.140141## Safety142143- Never provision or call a real agent, tool, or external system from this144 skill's app.145- Keep `owning_team` values as free text; do not validate against a real146 directory service.147148## Completion Criteria149150Finish only when:151152- the skill contains the complete canonical `content/kelly-agent-builder-app/` project and153 `pnpm --dir content/kelly-agent-builder-app dev` remains supported;154- all persistent config and agent data use `busabase-sdk` and the declared155 resource map — no local JSON, browser storage, or provider choice;156- local setup offers Cloud/custom URL OAuth plus the explicit Demo path,157 while a deployed AirApp uses its ambient session;158- Overview, Catalog, Agent detail, and Help & Settings render on desktop and159 phone widths;160- `pnpm --dir content/kelly-agent-builder-app run check` and `node --test` pass.