Technical docs

Ally, the Built-In Platform Assistant

What Ally is

  • Ally is Alloy's built-in internal assistant.
  • The main user entry point is the sidebar `Chats` launcher and the global `Alt+C` shortcut.
  • In the current backend, Ally chat resolves to a per-user Ally AI teammate inside the current organization.

Frontend surface

  • The sidebar `Chats` item is an action entry that opens internal chat directly instead of navigating to a dedicated `/ai` page.
  • `useOpenChat({ peer: 'ally' })` resolves to `openAlly()`. A newly opened panel shows a blank personal Ally chat directly instead of starting in history. An already visible panel stays as it is; an existing floating session is activated or a minimized session restored rather than reset.
  • Shared history remains available, with a `Chat` icon to return to the current chat. On desktop, the composer receives focus once the initial chat view is ready; restored or background floating sessions do not take focus from the active chat.
  • Docs resolves the current user's personal Ally even when it is absent from the active-teammate directory. Expanding a collapsed Docs chat panel starts a fresh personal Ally chat. Universal mobile `Chats` opens `/docs?coworkPanel=chat`; explicit `/docs?coworkPanel=history` links still open history.
  • Ally chat state is scoped per `user + organization`, then restored from persisted snapshots on load.
  • Current view modes:
  • docked panel
  • floating window
  • minimized stack
  • `toggleAlly()` closes Ally only for the current org scope; a minimized Ally session restores instead of closing.

REST and realtime surface

  • Ally is exposed as the signed-in user's personal system employee rather than through a separate Ally chat API.
  • Employee resolution:
  • `GET /api/organizations/{organizationId}/employees/ally`
  • After resolution, Ally uses the shared employee chat base:
  • `/api/organizations/{organizationId}/employees/{employee_id}`
  • Conversation-scoped stopping uses:
  • `POST /api/organizations/{organizationId}/employees/{employee_id}/conversations/{conversation_id}/stop-generation`
  • body: `{ "run_id": "<uuid>" }`
  • Realtime voice session creation uses the employee endpoint:
  • `POST /chat/realtime/employee/create-session/{organization_id}/{employee_id}`

Runtime context

  • Ally uses the shared employee internal-chat pipeline and `Channel.EMPLOYEE_CHAT`, not a separate Ally-only contact-channel type.
  • The Ally employee resolver finds the current user's personal Ally in the requested organization.
  • Runtime context for Ally runs currently includes:
  • `userId`
  • Current Ally contact-channel identity uses the same employee-chat external ID pattern as AI teammates:
  • `emp__{user.id}_{employeeId}`
  • Current conversation lookup is therefore scoped by:
  • user
  • organization
  • resolved Ally employee
  • New or restored user-organization memberships create/update that user's Ally AI teammate through `UserOrganizationService` and the Ally employee helpers.
  • When a per-user Ally is processed, its own model, voice settings, tools, and MCP toolsets are used first. If the canonical system Ally is configured, missing model or voice settings fall back to that system Ally, and tool lists/toolsets are unioned.

Organization action tool

  • Ally can perform organization-scoped actions through the supported system action layer when running in an authorized system context.

Internal-chat behavior notes

  • Ally shares the same internal-chat UX stack as AI teammates:
  • history
  • search
  • rename/delete
  • reply state
  • feedback
  • attachments
  • docked/floating/minimized modes
  • realtime voice
  • Model availability is exposed through:
  • `GET /api/init/internal-chat-capabilities`
  • If the signed-in user has no resolvable personal Ally employee in the organization, Ally employee resolution returns `Ally not found`.
  • In storage sharing UX, Ally is treated as a system storage actor rather than a normal editable share target.
  • Ally's system-only tool surface also includes documentation list/search/read tools through the shared system tool catalog.

Onboarding behavior

  • New self-serve org bootstrap can seed an Ally welcome message.
  • The welcome message is written into the new user's personal Ally conversation by resolving that user's per-user Ally employee in the new org.
  • The current welcome begins with `Welcome — I’m Ally.`.
  • `?onboarding=true` still auto-opens Ally on first load after scoped chat state is restored.
  • Current onboarding redirect target is `/staff?onboarding=true`.
  • See `onboarding.md` for the full signup and invite flow.

Start building your AI team