AI Workbench is the operational backbone of the Foundations programme — a structured leadership development system that equips senior leaders with a personalised AI agent (their AI Agent) that understands their exact role, context, priorities, and working style.
The platform exists to solve a single problem: most AI tools are generic. They require the user to repeatedly provide context. The platform reverses that. Through a structured onboarding interview, the platform builds a precise, role-specific AI agent configuration so that the leader's AI Agent already knows what matters, who the stakeholders are, what to escalate, and how to communicate — before the first real interaction.
A leader who completes the Foundations programme leaves with an AI agent that is already productive from Day 1 — not a blank-slate chatbot, but a configured, role-aware executive-level intelligence.
AI Workbench is organised into six primary operational modules, each accessible from the top navigation. Together they form a complete programme lifecycle management system.
The platform operates on a layered data model. Understanding the hierarchy is key to operating it correctly.
Six core entities form the data backbone of the platform. They describe who the brand belongs to (BrandEntry → Client), who runs the programme (Coach → Cohort), who attends (Participant → Cohort), and what the cohort works through (CohortAgenda → Cohort). Every entity below carries explicit reference fields that wire it to its neighbours.
Defines the visual identity and URL routing for a client — logo, favicon, brand colours, vanity/application subdomains, and the return-to-site link. The brand a workbench "wears".
The organisation enrolled in the Foundations programme. The top-level anchor — everything else (cohorts, participants, coaches, brand) hangs off a client. Carries compliance requirements and which AI agent is available to its people.
A facilitator/coach who runs sessions for a cohort. Can be a Happy (platform) coach or a client-side coach. Carries profile data, headshot, LinkedIn, and the console PIN used to access the Coach Console.
A group of participants from one client running the programme together. The operational unit — has a programme date, a facilitator/coach, a lifecycle status, and the shareable url_code that builds workbench links.
An individual leader within a cohort — the core subject of the programme. Carries identity, role, interview/config status, the url_code that builds their private workbench link, and links to their baseline, builds, notes, goals, and action plan.
The cohort objectives — the ordered agenda sections that structure a cohort's programme day. Each section has a title, an optional linked programme stage (hour1, hour23, week1…), and an ordered list of attached Challenges. Saved as reusable templates via cohort_id = "__template__".
A configurable button that generates a document and delivers it to a destination (My Files, direct download, or a linked challenge). Used to drive dynamic action buttons across the workbench and console. Admin-managed; readable by all.
A BrandEntry themes a Client. The client runs one or more Cohorts, each led by a Coach and filled with Participants. Each cohort has a CohortAgenda — the ordered objectives for the programme day — and each agenda section attaches the Challenges the participants work through. A participant's private workbench URL is built from their cohort's url_code plus their own url_code, and is branded by the client's linked BrandEntry.
A standard programme run follows this sequence. Each step is supported by a specific module in AI Workbench.
The dashboard is the command overview. It is read-only and updates on load.
Use Clients to manage the organisations enrolled in the programme.
Cohorts group participants and track the programme lifecycle stage.
The participant list is the operational hub for facilitators during a live programme.
The AI Interview is the most critical touchpoint in the programme. It is the mechanism by which a generic leader becomes a configured participant with a personalised AI agent.
Important: The interview page at /interview is accessible without an admin login. Share this URL directly with participants. Each session starts fresh by default. Coaches use /facilitator/interview-links to send edit links for existing sessions.
During the interview, a 5-node progress bar displays below the header. Each node shows: completed (cyan checkmark), active (glowing solid), or pending (dimmed). The tracker auto-advances based on the AI agent's message content — no manual input required.
If a participant needs to revisit their interview (e.g. after a review session), a coach uses /facilitator/interview-links to generate a direct edit link that opens their specific session. The interview header shows an amber EDIT MODE badge when in this state. The initial trigger message is automatically hidden from the conversation display.
Coaches can also enter or update interview data manually via a participant's detail page (Interview tab). Each stage has form fields with a COMPLETE STAGE option and a SAVE DRAFT option. Completing all 5 stages marks the interview as complete and sets config_status to pending, ready for configuration generation.
The Agent Configuration is the end product of the interview — a structured block of text that is loaded into the participant's AI agent to give it role-specific context, capabilities, and guardrails.
Once a participant's interview status is COMPLETE, navigate to their detail page, open the Config tab, and click GENERATE AGENT CONFIGURATION. This assembles the configuration script from all five interview stages and saves it as a permanent record.
Click COPY on the Config tab to copy the full script to clipboard. This text is then pasted into the AI agent's system instructions. The configuration can be regenerated at any time. Coach notes and week 1/2 review notes fields are available for Day 3 and enablement use.
Challenges are structured tasks that push participants to practise AI-leverage behaviours in their real work context.
Challenges with client set to Template appear as reusable library items. Use COPY TEMPLATES TO CLIENT to clone the full template library to a specific client and optionally assign them directly to a cohort. This is the recommended fast-setup path for a new client.
Each challenge has two supporting fields: Why This Matters explains the developmental rationale, and Design Logic explains the thinking behind how the challenge is structured. These are visible below each row in the challenge list and guide facilitators in contextualising tasks for participants.
If a challenge involves an AI agent interaction, enable the INVOLVES AI AGENT checkbox and enter the agent name. A LAUNCH button appears in the challenge list, linking directly to the agent's WhatsApp connection URL.
The Instruction Board is the pop-up window a participant sees on the Public Workbench when they open a Task, Challenge, Skill, or Reference assignment. It is the participant's single point of focus for that assignment — everything they need to start work is on the board.
An assignment can carry an Instruction Board image. It is set on the Assignment Manager form using the Instruction Board Image dropdown, which is populated from files tagged Used For: Instruction in the File Manager (Settings). Upload the image there first, set its USE FOR value to Instruction, then select it on the assignment.
When an image is set, the participant's Instruction Board widens to show the image in a panel directly to the right of the board content — at the same height and width as the board itself, under the same window header. Assignments without an image keep the standard single-board layout.
Every goal on the platform is evaluated against the 3P Principles — a value framework that prevents vague, unprovable benefit claims from slipping into a participant's programme. The framework asks a simple question of each goal: does it Protect something that can fail, Produce tangible time or quality gains, or Prove a measurable outcome? A goal must clear at least 4 out of 5 requirements on one pillar to earn that P as its primary classification.
Automated evaluation. When a goal is created — or when its name or baseline changes — the evaluateGoal3P backend function runs automatically. It scores each pillar, assigns primary and secondary P classifications, and drafts a buyer-vocabulary pitch for the matching persona. Admins can then review, adjust the checklist, and approve; participants can refine the pitch wording on their own workbench.
Each pillar is scored out of 5. A score of 4 or 5 qualifies that P as a primary or secondary classification. The card displays a running total out of 15 across all three pillars.
A critical distinction the framework enforces: the assistant configuration itself is infrastructure, not an automation. "We configured your personalised AI agent" is a setup event — it doesn't do a task, it enables the tasks the participant later runs through it. Forcing a P onto the configuration event would be exactly the vague-value-language the framework exists to catch.
Creating the role-based assistant (the mini-me agent build) per participant clears fewer than 4/5 on every pillar:
The 3P value lives in each specific automation or task the configured assistant is set up to execute — which is exactly what Goal records capture: goal_name, baseline, target, and the linked challenge_id.
Those are the records run through evaluateGoal3P, not the configuration event that produced the assistant. A goal like "Automate weekly status reporting" can clear Protect (named failure: missed report), Produce (removes a hand task, frees 5 hours/week), and Prove (baseline: 5 hrs → target 1 hr, auto-measured) — because it describes an actual recurring automation with measurable outcomes.
Why this matters: "Gave you a personalised AI tool" is not provable against any of the fifteen 3P requirements. "Reduced weekly status-report prep from 5 hours to 1 hour, auto-measured, with a coach reviewing before send" clears Protect, Produce, and Prove simultaneously. The framework forces every goal to be stated in the second form — never the first.
Once a goal is evaluated, it enters a coach review workflow tracked by the p_classification_status field:
Admins can fully edit the checklist (toggle any of the 15 items), the primary/secondary P assignment, the pitch persona and text, and the prove metric. Participants on the public workbench can refine the pitch paragraph in their own words — but cannot change the checklist or classification, so the admin's validated scoring stays intact.
For each classified goal, the evaluation drafts a one-paragraph buyer-vocabulary pitch written for the persona that matches the primary P:
The pitch ensures every goal can be communicated in the language of the stakeholder who would sponsor it — turning an internal task into a fundable, defensible value proposition.
This page is specifically designed for facilitators who need to help participants revisit or correct their interview sessions post-delivery.
Only participants who have an existing interview record appear in this list. For each participant, two actions are available:
Note: Edit links reference the participant's OnboardingInterview record ID. If the interview record is deleted, the link will no longer work. Participants who have not yet started an interview do not appear on this page — they should be directed to /interview to begin fresh.
Shields Up is a heightened security mode that adds a cohort-specific verification factor on top of the standard participant access link. When enabled, participants must enter a cohort key before they can reach their workbench.
When to use: Enable Shields Up for high-stakes sessions, sensitive client cohorts, or any time you want to guarantee only the participants in the room can access the platform. It is a manual toggle — it stays on until you turn it off.
When Shields Up is active and a participant opens their workbench link, they are shown a SHIELDS UP — COHORT KEY REQUIRED screen instead of their workbench. They must type the cohort key into the input field and click VERIFY KEY. An incorrect key shows an inline error and lets them retry. A correct key proceeds to the workbench.
Lock vs. Shields Up: The Lock toggle blocks all participant access entirely (a holding screen). Shields Up does not block access — it adds a verification step. Lock takes priority: if both are on, participants see the locked screen, not the key prompt.
Every participant- and coach-facing entry point is reached through a coded front-door URL. The host is the brand's subdomain (either the vanity subdomain or the application subdomain, set on the client's url_mode field), and the path carries the non-guessable codes that grant access without an admin login.
Structure: https://<brand-subdomain>/c/<cohort.url_code>/p/<participant.url_code> for participants, and /c/<cohort.url_code>/coach for coaches. When Shields Up is active, append /s/<frequency>.
The primary participant dashboard — challenges, goals, agent, and milestones.
Both codes are validated by the UrlCodeGuard before the workbench loads. The cohort code resolves the cohort, client, and brand; the participant code resolves the individual record.
The standalone AI onboarding interview — no admin login required. This is the link shared with participants to begin or resume their 5-stage interview.
The same cohort + participant codes are validated first. The interview page loads the participant and cohort context directly, skipping the workbench shell.
The coach-facing roster and live chat dashboard for a cohort. Coaches also need their coach console PIN on entry.
No participant code is required — the cohort code resolves the cohort, client, and brand. The PIN is matched server-side against an active coach's coach_console_pin.
The branded sign-in / access page for participants who need to authenticate rather than use a coded link.
When Shields Up is active, a cohort frequency segment is appended to any participant URL as the verbal second factor.
The shieldFrequency is a 10-character cohort key configured in Front Door Controls. Workbench and interview links both accept the suffix; the coach console does not use it (coaches use their PIN instead).
The <host> is determined per client from their linked BrandEntry:
The Cohorts page builds and copies the full URL pattern for each cohort, substituting the correct host and cohort code while leaving the participant code as a placeholder.
The AI-assisted chat panels available to coaches have been enhanced to act as more effective coaching partners. When a coach opens a chat session tied to a participant and a challenge, the agent is now automatically pre-briefed with rich context from the participant's profile and baseline interview.
The moment a conversation is created, the platform fetches the participant's full record and their ParticipantBaseline and injects the relevant fields into the agent's opening context. The agent receives:
Previously, the agent only knew the participant's name and ID. Coaches had to manually re-explain the participant's situation, pain points, and role before the AI could give relevant advice. Now the agent starts every session already aware of the participant's professional context, their stated friction points, and what they are working on — so its recommendations are immediately specific and actionable.
Example: If a participant's baseline notes mention friction with manual status reporting, and the challenge is about automating a weekly update, the agent can proactively connect the two: "I see from your interview that manual status updates are a major friction point — this challenge is a direct opportunity to address that."
The AI-assisted chat panel is available wherever a coach interacts with an agent-linked challenge or participant session. The context injection happens automatically — there is no setup or manual briefing required from the coach.
The Automation Whiteboard is the participant's canvas inside the Public Workbench. It is where a leader takes one of their Goals and sketches the real-world automation that will deliver it — left to right, source to destination — until there is enough detail on the canvas to fill in the five boxes of a Skill.
The flow: Goal → Whiteboard the automation left-to-right → capture enough to populate the 5-box Skill → package the Skill's files with ParticipantDeliveryPackage.
Every whiteboard belongs to a Goal — the value outcome the participant is chasing. From the Workbench, the participant creates a whiteboard and links it to a Goal. The whiteboard then becomes the working surface for designing the single automation that satisfies that goal. A participant can filter their whiteboards by Goal and keep one canvas per Goal.
The canvas reads left to right, mirroring how work actually flows. Participants drag boxes (steps), text (notes and questions), and headers onto the canvas, then connect them with numbered arrows. The aim is to capture the full journey: where data starts, what happens to it, and where it lands.
All object controls — title, action/type, attribute prompts, content, tags, file attachments, and deletion — live in the Object Inspector side panel that appears when an object is selected. Deleting a whiteboard is a deliberate two-step action (Delete → Yes, delete) located at the bottom of the Canvas Inspector (shown when no object is selected), keeping it clear of the main toolbar to prevent accidental removal.
The whiteboard is not the end product — it is the discovery surface. The participant's objective is to sketch enough real detail that the canvas can be translated into a ParticipantSkill, which is itself a five-box build:
Running the Completeness Check (evaluateWhiteboardCompleteness) compares the canvas against the five-box standard and surfaces exactly what is still missing — shown in the Draw This Next panel — so the participant knows what to add before the skill can be authored. An AI Narrative (generateWhiteboardNarrative) can also be generated to summarise the end-to-end process from the boxes, actions, tags, and arrows.
The canvas is structured by the Workbox Prompts Lookup list (list_name: workbox_prompts), configured in Settings. Each entry is a unit of work that can be assigned to a box or text object and supplies the prompt fields the participant fills in to capture attributable design detail.
How it comes together: selecting an action on a box resolves its group, icon, and prompt set; the matching entry supplies the title prompt and the attribute fields. Change the action and the prompts follow — so the canvas always asks the right questions for the step being drawn. The legacy workbox_type Lookup is retained for reference but is no longer the source of truth — all canvas logic reads directly from workbox_prompts.
A whiteboard can be started from a template and rendered over a custom background image. Both are managed from the Canvas Inspector (the side panel shown when no object is selected).
Both templates and template-scoped backgrounds are gated to admins via the managePublicWhiteboard backend function. Participants can upload their own backgrounds (user-scoped) and select from any available template or background in the Inspector's dropdown.
When the five-box Skill is complete and coach-approved, its constituent files are packaged using the ParticipantDeliveryPackage entity — a participant-scoped, per-file mapping that places each file into the skill's folder structure.
The same packaging model extends to agent projects (delivery_type: agent), which use a numbered folder structure (00_PROJECT_SETUP through 05_TEMPLATES) instead of the skill folders — but the participant skill build is where the whiteboard's work lands.
The Skill Starter is the participant's interactive entry point for building a five-box skill. Instead of facing five empty boxes, a participant picks a Goal or Objective they already care about and drafts a complete skill spec from it — either in one shot with AI, or through a guided coaching conversation that fills the boxes from their own words.
Where it lives: The Draft a Skill button appears on the participant's Build Skills page and in the Skill Service Bay. Every draft is saved as a real ParticipantSkill record — never just chat history.
Every starter field carries a fill state, so the participant can always see what came from them and what came from AI:
Fill states are stored per field on the skill record (in starter_state.fill_states), keyed by box and field — e.g. box1.one_job_statement, box3.sources.
The Check runs against the starter's field checklist: required fields that are not yet Confirmed are reported back as gaps, each with a targeted follow-up question. When every required field is confirmed, the check marks the draft Ready to Use — meaning the participant has stated every required decision themselves.
Ready ≠ Approved. The starter deliberately never uses the word "approved". A ready draft is the participant's own complete design — it still goes through the normal coach review before it can go active. Every skill created through the starter lands in draft build status.
Guided and gap-fill conversations are stored on the skill record as a transcript (starter_state.transcript). Closing the modal mid-conversation is safe — reopening the starter resumes the session exactly where it left off, with fill states and box content intact.
Every starter-drafted skill carries a fixed status boundary note: it is a personal draft that has not been verified, audited, or approved — it is ready to use, adjust, or hand to someone whose judgment the owner trusts. This note is always confirmed-by-default and cannot be authored away.
A starter draft is a real five-box skill: Box 1 (Name & Role), Box 2 (Job Description), Box 3 (Reference Binder), Box 4 (House Rules), and Box 5 (Toolkit) are all authored through the flow, and the resulting record behaves like any other ParticipantSkill — it can be opened in the Skill Service Bay, expanded on the Build Skills page, validated, exported, and linked to a workflow whiteboard. The starter simply makes getting to a complete first draft fast, grounded, and honest about what is assumed versus confirmed.
The buildParticipantAgentComponents backend function is the engine that converts a participant's profile, client context, and selected enhancements into a fully assembled, production-ready agent configuration. It is an admin-only function invoked from the Participant Agent Builder page.
Trigger: An admin clicks Build Agent Components on a participant record. The function receives a single input — participant_id — and returns a saved ParticipantBuildComponents record with the complete configuration.
The function pulls four categories of source data from the platform database:
All gathered source data is assembled into a single structured prompt sent to the platform's LLM integration (InvokeLLM). The prompt instructs the LLM to act as an expert AI agent architect and produce a configuration that is specific to the participant's role, grounded in real data, and free of generic placeholders.
The prompt includes these source sections:
The LLM is asked to generate four structured output blocks, returned as a single JSON object matching a strict response schema:
Before writing the record, the function checks for existing builds for this participant. If previous builds exist, the next version number is incremented (max existing version + 1). A unique config_hash is generated in the format HAI_<last-6-of-participant-id>_v<version>_<timestamp>. This hash anchors the build record and supports versioned rebuilds.
The LLM result and metadata are persisted as a new ParticipantBuildComponents record with:
The function returns { success: true, build: <record> } on success. Any error returns a 500 with the error message.
Enhancements are the guardrails, compliance constraints, and communication styles that shape the agent. They enter the build from two sources:
Source 1 — AgentRole catalog: The matched role template carries its own enhancement_keys array. These are the baseline enhancements appropriate for that role type.
Source 2 — ParticipantBaseline: The participant's own selections from the public workbench About My Role page, stored as enhancement_keys on their ParticipantBaseline record. These include both manual selections and AI-recommended enhancements that were auto-selected when capabilities were generated.
The two arrays are merged and de-duplicated. The combined set is resolved against the full AgentEnhancement catalog to produce complete enhancement records (with descriptions), which are listed in the LLM prompt. The LLM then incorporates these into the guardrails, compliance, and tone blocks of the generated configuration.
This function requires an authenticated admin session. The caller's identity is verified via base44.auth.me() — if no session exists, a 401 is returned. If the user is not an admin, a 403 is returned. There is no public or participant-facing access to this function.
The platform is powered by a set of backend functions — serverless HTTP handlers in base44/functions/. They handle everything the frontend cannot do directly: bypassing RLS for the public workbench, orchestrating multi-step agent builds, reacting to entity events, and serving branded theme scripts. Below they are grouped by purpose, with their access model and key inputs.
These functions run without a logged-in user session. They validate participants using non-guessable URL codes (cohort_code + participant_code) and front-door security toggles — the foundation of the public workbench security model.
The master entry validator for every public workbench and coach console link. Resolves a cohort + participant from their URL codes, applies the Lock and Shields Up front-door toggles, logs the login, and returns the full context bundle (cohort, participant, client, brand, taglines, baseline) needed to render the workbench.
A deliberately public endpoint used to confirm identity before any session is established. Given a cohort code and participant code, returns the minimal participant fields (id, name, job title, client/cohort ids) needed for identity matching — nothing sensitive.
Records or updates a <Mono>ParticipantCohortLogin</Mono> record. On first login it creates the record (first_login_at, session_count = 1); on return visits it bumps last_login_at and increments session_count. Validates that the participant belongs to the given cohort.
These functions serve the participant-facing workbench. None of them require a logged-in user — instead every call is verified by matching participant_id + participant_code (the participant's url_code) as a service role, then performing RLS-locked reads/writes on the participant's behalf.
Returns the filtered set of challenges visible to a participant (task and challenge types only, non-archived, matching their individual/cohort/all assignment) along with their ChallengeCompletion records. Bypasses RLS via the service role.
Returns all agent builds and configurations for a participant, merged from <Mono>ParticipantBuildComponents</Mono> and <Mono>ParticipantProductConfiguration</Mono>, de-duplicated by id and sorted newest version first.
CRUD gateway for participant chat messages. Supports list (all messages), send (creates a participant-sender message, optionally tied to a challenge), and markRead (marks coach/AI messages as read by the participant, scoped or all unread).
CRUD gateway for <Mono>ParticipantNote</Mono> records. Verifies note ownership before update/delete. Creates notes with the participant's cohort/client context and a configurable note type and source.
CRUD gateway for <Mono>Goal</Mono> records. Verifies goal ownership before update/delete. Creates goals with source "manual" and the participant's cohort/client context.
Allows a participant to edit a strict allowlist of fields on their own <Mono>ParticipantBaseline</Mono> record. Currently only <Mono>enhancement_keys</Mono> is permitted — all other fields are stripped. Creates the baseline if one does not yet exist.
Allows a participant to edit the five section-level fields on their own agent configuration: <Mono>agent_declaration</Mono>, <Mono>agent_behavior</Mono>, <Mono>agent_instructions</Mono>, <Mono>tone_settings</Mono>, <Mono>full_config_script</Mono>. Writes to ParticipantProductConfiguration, falling back to ParticipantBuildComponents.
Allows a participant to edit a strict allowlist of fields on their own <Mono>Participant</Mono> record: preferred name, job title, role description, role capabilities/skills, reporting line, direct reports, and headshot URL. All other fields are stripped.
The service-role gateway for the anonymous onboarding interview agent. The agent runs without a user session, so it cannot touch RLS-locked entities directly — every call here is gated by participant_id + participant_code. Actions: lookup, create (idempotent), update (with append-only raw_transcript), and log_event (writes an audit ActivityEvent).
The pipeline that turns interview data and role context into a production-ready agent configuration. Some run as admin-only tools; others run as workflow steps with no user session.
The orchestrator that produces a participant's full agent configuration. Runs the agentMatchmaker, creates a new AgentRole or reuses the matched one, updates the participant's role code, extracts goals from both the interview and the matchmaker recommendation (two separate LLM passes), creates a <Mono>ParticipantProductConfiguration</Mono> record, and marks the onboarding interview complete.
The engine that converts a participant's profile, client context, and merged enhancements into a fully assembled <Mono>ParticipantBuildComponents</Mono> record via a single LLM call. Generates a versioned config hash and persists the declaration, behavior, instructions, and tone blocks. (Detailed in the Agent Build Pipeline section.)
Evaluates a role profile (search mode) or a participant's onboarding interview (participant mode) against the AgentRole catalog and recommends either the best-matching existing role or a new custom role, with capability adjustments, tone/guardrail customizations, recommended enhancements, and first-week priorities. Returns a structured JSON recommendation.
Admin/facilitator function that writes a 3-4 paragraph professional role description for a participant using the LLM with web context enabled. Verifies access to the participant via RLS before generating.
Public-facing role content generator with two modes. Default mode writes a role description (with web context) and persists it to the participant. <Mono>capabilities</Mono> mode generates 8-12 role capabilities, persists them, and recommends a set of agent enhancement keys based on the role and the client's compliance requirements.
Assembles a markdown configuration text from an <Mono>AgentRole</Mono> and its resolved <Mono>AgentEnhancement</Mono> records, then upserts an <Mono>AgentConfigFile</Mono> linked to that role code. Used to keep the library config files in sync with role definitions.
These functions run as workflow steps triggered by entity events or schedules — they have no user session and operate entirely as the service role.
Initialises (or resets) <Mono>ChallengeCompletion</Mono> records for every participant × challenge combination in a cohort. Creates missing records as "not_started" and resets any existing non-not_started records back to "not_started". Triggered when a cohort transitions to in_progress.
Triggered on ChallengeCompletion create/update. On create, copies the tracking_event from the parent Challenge. On status change, syncs the <Mono>progress_percent</Mono> from the matching status Lookup entry. Skips cleanly when there is nothing to update (prevents recursion).
Triggered on ChallengeCompletion update. When the status transitions to "submitted" (Ready for Review) and no review timestamp is set yet, stamps <Mono>review_timestamp</Mono> with the current time. Idempotent — skips if a timestamp is already present.
The central activity-event logger. Runs in two modes: entity automation (triggered by entity events — logs HAIA-FOUND-ONBOARD-INVITE on ParticipantCohortLogin create, and HAIA-FOUND-ONBOARD-COMPLETE when a baseline or interview transitions to complete), and direct invocation (logs an arbitrary event_key with participant/entity context from the UI or other functions).
Returns a JavaScript theme file for a brand entry — colours, logo URL, favicon URL, and CSS custom properties — served as <Mono>application/javascript</Mono> with caching headers. Used to inject per-brand theming into branded workbench surfaces.
Agent Enhancements are the reusable configuration blocks that shape how an agent behaves. Each enhancement has a category, a unique key (prefixed with a category code), a display name, and a description of what it does. When an agent is built, enhancements are resolved and folded into the guardrails, compliance, tone, and behavior blocks of the configuration.
Enhancements are organised into eight core categories, each with a key prefix: ESC- (Escalation), COMM- (Communication), FUP- (Follow-Up), COMP- (Compliance), CONF- (Confidentiality), AUTH- (Authority), BIAS- (Bias & Fairness), and FMT- (Format). A ninth category, SCOPE- (Scope Boundaries), governs the onboarding interview agent specifically.
Situations the agent must flag for human attention rather than handle itself. These define what should always be routed back to the participant or a coach.
How the agent talks — tone, register, and structure of its responses. These shape every output the agent produces.
What the agent does after delivering an answer — whether it proceeds, offers options, checks in, or suggests next steps.
Hard regulatory guardrails the agent must respect. Many of these are tagged with the compliance requirements they apply to (gdpr, soc2, hipaa, pci, sox, ccpa, public).
Categories of information the agent must treat as confidential and never surface in external-facing or broad-distribution material.
How much independent latitude the agent has to act on the participant's behalf — from full autonomy to treating every output as a draft.
Guardrails for any output that evaluates, ranks, or judges people — designed to keep assessments fair, consistent, and traceable.
Structural preferences for how the agent formats its responses — length, prose vs bullets, jargon, templates, and executive summaries.
A category used primarily by the onboarding interview agent. These define how the interviewer handles off-topic requests — decline, defer to the coach, give a fixed brand response, or escalate to a human.
Enhancements enter a build from two sources and are merged (de-duplicated):
The combined set is resolved against the full catalog and listed in the LLM prompt, which folds them into the guardrails, compliance, and tone blocks of the generated configuration. See the Agent Build Pipeline section for the full flow.
The app exposes a Model Context Protocol (MCP) server so AI assistants such as Claude, ChatGPT, and Cursor can access and operate the platform on a user's behalf. The server lives at /api/mcp on the app's published domain and is activated by publishing the app. Assistant connections are authorised through the app's own sign-in (OAuth) — every client must complete the consent flow before it can call any tool.
Two layers of access. The MCP server itself authenticates the human via OAuth sign-in. On top of that, each tool enforces its own role-specific credential. So an assistant always acts as a signed-in user and must supply the right code or secret for the tool it is calling.
Participant-facing tools are gated by the same non-guessable URL codes that power the public workbench. An assistant acting for a participant must supply the participant's cohort_code and participant_code.
Every participant tool verifies the participant_code against the stored url_code on the participant record; a mismatch returns 403. No participant data is reachable without both codes.
Coach access uses the validate_access tool in coach mode. An assistant acting for a coach supplies cohort_code + coach_pin (omitting participant_code). The PIN is matched against an active coach's coach_console_pin. An incorrect PIN is flagged and no coach context is returned.
Operations tools are the most powerful — they build agent configurations, run the role matchmaker, and generate role descriptions. They require the MCP_OPS secret, stored as an app secret and never shipped to the client.
Inside each ops function, the secret is checked against process.env.MCP_OPS. A correct secret authorises the call directly. If the secret is absent, the function falls back to the existing admin-session check — so the in-app admin tools keep working unchanged, while an assistant calling via MCP must present the secret.
Treat MCP_OPS like a password. Anyone with the secret plus a valid app sign-in can run operations tools. Rotate it from the app's secrets settings if it is exposed, and share it only with operations managers who should have that authority.
Beyond the custom tools above, the MCP server auto-exposes every entity (one query_ / create_ / update_ / delete_ tool per entity) and the onboarding interview agent (a message_ tool). These are gated by the signed-in user's row-level security — an operations manager (admin) gets broad access, while other roles see only what their permissions allow. Individual entity and agent tools can be turned off on the app's MCP page without editing code.
Re-authorise after changes. Any change to the exposed tool set (adding an entity, a new agent, or editing the config) invalidates connected clients' tokens — each client must authorise again.