Skip to main content
← All documentationContents ↓

API Reference: Team Agent (Ask Simply)

Drive Ask Simply, the in-app AI agent: manage sessions and messages, approve or reject agent proposals, escalate to human support, and administer knowledge sources.

Overview

Ask Simply is the in-app AI agent built into Simply360. A signed-in user chats with it in a session; each message the user sends starts an agent run in which the agent can call tools from a catalog filtered to that user's permissions. Read-only tools execute directly. Changes are different: instead of writing data on its own, the agent returns a proposal — a structured, risk-labeled description of the change — that the user must explicitly approve before it executes. When the agent cannot help, the user can hand the session off to human support.

The Team Agent API is the surface behind the Ask Simply panel in the webapp and the Simply Anywhere mobile app. It covers three areas:

  • Sessions, messages, and feedback — list, read, and archive sessions; send messages, receive replies, and rate owned assistant messages.
  • Proposals — approve (execute) or reject changes the agent drafted.
  • Human support — check responder availability, create a support handoff, and list a session's handoffs.

Two team-level settings surfaces — knowledge sources and support scope — are privileged administration endpoints.

Complete Team Configuration Changes

When a user asks Ask Simply to change Team configuration, the agent uses the first-class configuration change-set service rather than drafting a chain of unrelated low-level proposals. It can read the permission-filtered configuration catalog, plan one complete desired outcome, present one material review, apply only after the user explicitly approves that exact review, and report durable status by the public change-set Simply ID. Request-local references let one request connect newly created Collections, Fields, reference records, Workspaces, menus, Cards, Data Views, Wizards, Websites, and other supported resources without asking the user to allocate IDs or sequence internal steps.

These tools require edit-level Ask Simply access, configuration:write, and every underlying feature/data permission. The service revalidates current Team authority before execution, enforces managed-Team publication and billing rules, and never accepts an API key or API-key session token. An unchanged accepted operation survives token refresh, reconnects, and later conversations without another approval ceremony. See API, SDK, CLI, and MCP Configuration Change Sets for the shared contract and supported resource vocabulary.

Authoring and checking Wizards

Team Agent authoring tools use the same reviewed proposal flow. Read the current wizard with get_data_wizard, then use the draft_create_data_wizard* or draft_update_data_wizard* tools for the desired root, step, and task changes. Before presenting the result, call the read-only get_data_wizard_readiness tool with the wizard's public Simply ID. It invokes the canonical readiness evaluator for the selected Team and reports reachability, transitions, task execution, actor access, and completion checks.

Authoring must choose the access boundary explicitly. Set the root enumActorAccessModeId to null for a wizard anyone can use without signing in, or to CONSTITUENT_PROTECTED / TEAM_USER_PROTECTED for a protected wizard. Each step also accepts an explicit actor mode; null leaves that step unrestricted within the root boundary and does not open it to anyone without signing in when the root is protected. Define the outgoing transition set, including the first step and terminal steps. For a CREATE task whose result feeds a later UPDATE task in the same run, bind the UPDATE target to the prior task's OUTPUT reference. Set executeWizardInNextAction deliberately to true for tasks intended to persist on Next/Finish. The legacy Vue collect-only mode may use false; SSR/V3 CREATE and UPDATE tasks are not gated by this flag.

Use the sequence get_data_wizard → draft the complete change → present the proposal for approval and apply it → read the saved Wizard again → get_data_wizard_readiness before embedding or publishing. Readiness evaluates persisted configuration; it does not validate an unexecuted proposal or publish it.

A Wizard marked V2 cannot be edited in the Wizard Studio until it is upgraded to the V3 renderer. Call the read-only get_data_wizard_renderer_upgrade_review tool with the wizard's public Simply ID first: it returns readiness checks (step layouts valid, task types render in v3, whether custom CSS needs review), a per-rule review of the Wizard's custom CSS against the v3 markup, what to compare against the current live look, and a reviewFingerprint. Draft the upgrade with draft_upgrade_data_wizard_renderer, echoing that exact reviewFingerprint and an explicit cssReviewAcknowledged boolean (required true when the review found custom CSS to review); the draft is rejected if the Wizard is already v3, the fingerprint is stale, or a readiness check still fails. This tool requires Wizard publish permission (feature permission plus the per-Wizard publish object grant for a non-admin Team User) and is high risk: once approved, the upgrade takes effect immediately on every hosted, embedded, and webapp placement, with no separate publish step. Only a System Admin can return a Wizard to v2, and that downgrade is not exposed to Ask Simply or hosted MCP.

A v3 Wizard's look is its Style Kit plus its Wizard style: Style Kit tokens (such as {"token": "color.primary"} or {"token": "spacing.md"}) or bounded literal values per component, device, and surface, never CSS. Read it with get_data_wizard_style, which returns the stored wizardStyleJson, the teamStyleKitSimplyId (null means the Team default), the Style Kit the Wizard renders with, and the CSS each web surface would get. Change it with draft_update_data_wizard (Ask Simply) or draft_update_data_wizard_style (hosted MCP) by sending a complete wizardStyleJson document, null to clear it, and/or a teamStyleKitSimplyId of one of the Team's Style Kits (or null for the Team default). Invalid documents are rejected with INVALID_WIZARD_STYLE and the path of each problem. Once a Wizard has a saved style, its legacy custom CSS stops applying on v3. Each step's showTitle hides or shows that step's title; get_data_wizard_style lists every step's current value. Set it with draft_update_data_wizard_step (Ask Simply) or draft_update_data_wizard_step_show_title (hosted MCP, which changes only that one field); a placement's hide-title option still hides every step title on that placement.

Authentication and Tiers

Fifteen operations are standard tier and four (the /settings endpoints) are privileged. This entire surface is first-party and user-bound. Every route requires the TEAM_AGENT_USE or TEAM_ADMIN_AGENT_USE feature permission, except the four operations on the signed-in person's own proposals (list connected-app proposals, get, approve, and reject a proposal): those serve proposals that connected AI apps draft through the hosted MCP server, so they need no Ask Simply access for such a proposal (see Proposals Drafted by Connected AI Apps). Standard operations accept either a signed-in Cognito user token or an OAuth user token issued to an explicitly allowlisted Simply Anywhere native client with the complete reviewed Ask Simply scope envelope. The privileged settings operations remain Cognito-only. Team API keys (s360_live_...), API-key session tokens, and external OAuth clients cannot use this surface. View-level Ask Simply permission allows question-answering, permitted searches, guidance, and feedback on owned assistant messages. Edit-level Ask Simply permission is also required before the runtime exposes or executes draft_* proposal tools; every proposal still re-checks the caller's underlying feature, edit, and data permissions. The examples below use $S360_ACCESS_TOKEN as a placeholder for an accepted first-party user access token; see Authentication.

  • 403 COGNITO_REQUIRED — caller is not an accepted signed-in first-party user.
  • 403 OAUTH_CLIENT_FORBIDDEN or 403 OAUTH_SCOPE_REQUIRED — an OAuth caller is not an allowlisted native client or lacks the complete Ask Simply scope envelope.
  • 403 TEAM_AGENT_FEATURE_UNAVAILABLE — the team does not have Ask Simply enabled.
  • 403 TEAM_AGENT_PERMISSION_DENIED — the user lacks Ask Simply permission.
  • 403 TEAM_AGENT_SETTINGS_DENIED — settings endpoints additionally require a Team Admin (or edit-level TEAM_ADMIN_AGENT_USE).

If your integration needs programmatic (API-key or agent-driven) access to Simply360 data, use the standard data endpoints or the hosted MCP Server instead; the Team Agent surface is specifically the product's own assistant.

Read-only operational capabilities

Ask Simply and hosted MCP can read Team audit history and its summary, first-party feedback responses and reputation counts, Action Tag analytics, mapping-provider configuration status, and inbound Team availability feed metadata. Each tool uses the existing API permission and scope checks. Mapping administration requires Cognito and Account Details permission. Feedback reads remain unavailable where the Feedback & Reputation workspace rollout is disabled, including production.

The capability names are list_team_audit_log, get_team_audit_log_summary, list_feedback_responses, get_reputation_summary, get_action_tag_analytics, get_mapping_configuration, and list_ical_feeds. Lists return at most 50 items with offsets up to 10,000. Audit reads accept public actor and Collection Simply IDs, table, action and dates; the Collection filter covers current record membership, not deleted historical membership. Feedback rating bands filter within the selected page, so the total precedes that rating filter. Reputation counts come from separate reads and are not an atomic snapshot. Action Tag analytics defaults to 30 days, permits at most 93 days, and retains the API's lifetime interaction metrics alongside period-based metrics.

These tools never expose mapping keys or credential paths, audit value snapshots, feedback free text, visitor URLs, feed URLs, tokens or calendar events. Feed metadata is for inbound Team availability feeds on a permitted integration; personal connected calendars and personal iCal feeds remain unavailable to AI. Feed creation time and public ID are null until the source is provisioned. These reads do not create proposals or require action confirmation codes.

Endpoints

MethodPathTierPurpose
GET/v1/team-agent/sessionsstandardList the current user's Ask Simply sessions.
GET/v1/team-agent/sessions/{sessionSimplyId}standardGet one session with its messages.
GET/v1/team-agent/runs?idempotencyKey={key}standardDiscover the current user's run created for a send-message request key.
GET/v1/team-agent/runs/{runSimplyId}standardPoll one owned run's accumulated progress and persisted messages.
GET/v1/team-agent/runs/{runSimplyId}/streamstandardStream resumable safe activity and provisional answer chunks for one owned run.
POST/v1/team-agent/runs/{runSimplyId}/cancelstandardStop one owned run at its next safe point; returns at once and is idempotent.
PUT/v1/team-agent/sessions/{sessionSimplyId}/archivestandardArchive a session.
POST/v1/team-agent/messagesstandardSend a message; starts a new session when none is given.
POST/v1/team-agent/messages/{messageSimplyId}/feedbackstandardCreate or replace the current user's rating for an owned assistant message.
GET/v1/team-agent/connected-app-proposalsstandardList the current user's pending proposals drafted by connected AI apps.
GET/v1/team-agent/proposals/{proposalSimplyId}standardGet one of the current user's proposals, from Ask Simply or a connected AI app.
POST/v1/team-agent/proposals/{proposalSimplyId}/approvestandardApprove and execute a proposal.
POST/v1/team-agent/proposals/{proposalSimplyId}/rejectstandardReject a draft proposal.
GET/v1/team-agent/support/availabilitystandardResolve human-support availability for the current user.
POST/v1/team-agent/support/handoffsstandardCreate a support handoff from a session.
GET/v1/team-agent/sessions/{sessionSimplyId}/support-handoffsstandardList a session's support handoffs.
GET/v1/team-agent/settings/knowledge-sourcesprivilegedList the team's Ask Simply knowledge sources.
PUT/v1/team-agent/settings/knowledge-sourcesprivilegedUpdate the team's knowledge sources.
GET/v1/team-agent/settings/support-scopeprivilegedList the local support-agent scope.
PUT/v1/team-agent/settings/support-scopeprivilegedUpdate the local support-agent scope.

Sessions

Sessions belong to the user who created them and have status ACTIVE or ARCHIVED. Listing is paginated (limit 1–100, default 25; offset default 0). The session detail includes the message history; each message carries its role (USER, ASSISTANT, or SYSTEM), content, source references, UI intents, tool calls, proposals, the run's resulting control state, and the current user's nullable feedback.

const sessions = await s360.teamAgent.listSessions({ limit: 25 });

const detail = await s360.teamAgent.getSession('TAGS-1234-ABCD');
console.log(detail.data.session.title, detail.data.session.status);

await s360.teamAgent.archiveSession('TAGS-1234-ABCD');
curl -s "https://api.simply360.app/v1/team-agent/sessions?limit=25" \
  -H "Authorization: Bearer $S360_ACCESS_TOKEN"

curl -s -X PUT "https://api.simply360.app/v1/team-agent/sessions/TAGS-1234-ABCD/archive" \
  -H "Authorization: Bearer $S360_ACCESS_TOKEN"

Each session in the list includes lastAnswerPreview: one plain-text line (at most 140 characters) from its latest Ask Simply answer, with Markdown and common HTML tags removed, or null when the session has no answer yet or the start of its answer has no readable text. Use it for a chat list; read the session for the full answer. Older servers leave the field out.

Run Discovery, Streaming, and Polling

POST /v1/team-agent/messages persists the turn and returns 202 with status: "RUNNING", a null assistantMessage, and the runSimplyId to poll before the model is invoked by the durable continuation worker. A terminal idempotency replay may instead return 201 with the already-persisted assistant message. A client should generate one idempotencyKey per user send and prefer the runSimplyId returned by the POST. If the POST remains pending beyond a short grace period or fails with an ambiguous timeout or connection error, begin request-key discovery. GET /v1/team-agent/runs?idempotencyKey=... can return 404 TEAM_AGENT_RUN_NOT_FOUND during the short interval before the run row is visible; keep polling with bounded backoff. Once either the POST or discovery returns a runSimplyId, poll GET /v1/team-agent/runs/{runSimplyId} until terminal. Both run lookups are scoped to the current team and creating user, and use the same response shape.

const idempotencyKey = crypto.randomUUID();
const post = s360.teamAgent.sendMessage({
  message: 'How many wizard submissions came in this week?',
  idempotencyKey,
});

const reply = await post;
if (reply.data.status === 'RUNNING') {
  let run = await s360.teamAgent.getRun(reply.data.runSimplyId);
  while (run.data.status === 'RUNNING') {
    await new Promise((resolve) => setTimeout(resolve, 1500));
    run = await s360.teamAgent.getRun(reply.data.runSimplyId);
  }
  console.log(run.data.status, run.data.runtimeEvents);
} else {
  console.log(reply.data.assistantMessage.content);
}

// If `post` instead times out or loses its connection, keep the same key and
// retry findRunByIdempotencyKey(idempotencyKey) with bounded backoff before
// deciding whether to resend the same body with that same key.

The run response envelope's data contains runSimplyId, sessionSimplyId, status, startedAt, nullable completedAt, nullable safe error, ordered accumulated runtimeEvents, the persisted userMessage, nullable assistantMessage, and controlState. Event payloads and errors are redacted for the public boundary; diagnostic payloads, raw provider errors, prompts, and internal numeric IDs are never returned.

For an attended RUNNING turn, prefer GET /v1/team-agent/runs/{runSimplyId}/stream. It returns text/event-stream and named ready, activity, assistant.delta, assistant.reset, final, and safe non-durable error events. Durable events use the SSE id: as an opaque public cursor and also carry id, sequence, and occurredAt. Delivery is at least once: keep one seenEventIds set, reconnect with the last durable ID, and do not require sequence numbers to be contiguous. Last-Event-ID is canonical; the equivalent after query is available when a client cannot set that header. If both are present they must match.

assistant.delta contains coalesced visible answer text, a public candidateSimplyId, and a zero-based chunkIndex. It is provisional, not a persisted assistant message. If the model later requests a tool or restarts that generation, assistant.reset tells the client to remove only that candidate and return to its writing state. A final event contains the canonical persisted assistant message. After final, or after falling back because the stream is unavailable or malformed, read the ordinary run endpoint once and reconcile from that authoritative JSON response. The normal polling response deliberately excludes high-volume delta/reset rows so provisional text cannot crowd safe activity out of its bounded event list.

const seenEventIds = new Set<string>();
let after: string | undefined;
let provisional = '';

for (let connection = 0; connection < 2; connection += 1) {
  try {
    let terminal = false;
    for await (const event of s360.teamAgent.streamRun(reply.data.runSimplyId, {
      after,
      seenEventIds,
    })) {
      if (event.type === 'activity' || event.type === 'assistant.delta' || event.type === 'assistant.reset' || event.type === 'final') {
        after = event.id;
      }
      if (event.type === 'assistant.delta') provisional += event.text;
      if (event.type === 'assistant.reset') provisional = '';
      if (event.type === 'activity') console.log(event.runtimeEvent.eventType);
      if (event.type === 'final') {
        console.log(event.assistantMessage.content);
        terminal = true;
        break;
      }
      if (event.type === 'error' && !event.retryable) {
        terminal = true;
        break;
      }
    }
    if (terminal) break;
  } catch {
    // One bounded reconnect resumes after the last durable cursor. A product
    // client should then degrade to its normal getRun polling path.
  }
}

const canonical = await s360.teamAgent.getRun(reply.data.runSimplyId);
console.log(canonical.data.assistantMessage?.content);
curl -N "https://api.simply360.app/v1/team-agent/runs/RUNS-1234-ABCD/stream" \
  -H "Accept: text/event-stream" \
  -H "Authorization: Bearer $S360_ACCESS_TOKEN" \
  -H "X-Team-Id: TEAM-1234-ABCD" \
  -H "Last-Event-ID: EVNT-1234-ABCD"

This stream is intentionally absent from hosted MCP. MCP and API-key callers do not carry the first-party user-owned Ask Simply session identity required by the route; use the standard data APIs and hosted MCP tools for external AI clients.

StatusClient behavior
RUNNINGContinue polling. New runtime events accumulate in sequence order.
WAITINGStop polling and render the persisted assistant message plus its resumable control state, such as clarification or proposal approval.
COMPLETEDStop polling and replace progress UI with the persisted assistant message.
FAILEDStop polling and show error.userVisibleSummary. Do not display or infer a raw provider error.
CANCELLEDStop polling. The run will not produce additional work.

If the original POST times out or loses its connection, do not create a new request key. Discover the run first. If no run becomes visible after a bounded discovery window, retry the same POST body with the same key: a running run returns the canonical 202 RUNNING response, a completed or waiting run replays its persisted 201 response without duplicate model spend, and a failed run returns its persisted safe failure as a 409. To intentionally try again after a failure, let the user edit or confirm the message and send it with a new key.

Send a Message

Send the user's message and receive either the terminal reply or a pollable background handoff in the same call. Omit sessionSimplyId to start a new session; include it to continue an existing one. The optional contextSnapshot tells the agent what the user is currently looking at (route, page title, selected records or resource, active filters) so answers can be grounded in the current screen. Data View Studio, Automation Builder, Outgoing Message Studio, and Document Studio contribute strict versioned context contracts through the Ask Simply rail. Each contract reports only bounded, sanitized builder state and derives canEdit from current feature-edit permission; route queries, document/message content, recipient details, credentials, and internal numeric IDs are excluded. Pass a client-generated idempotencyKey (normally a UUID, at most 64 characters) so discovery and retries refer to the same logical send without creating a duplicate run or duplicate model spend.

Exact “how many” questions use the permission-aware count_data_records read tool, which applies metadata or readable custom-field filters in one Collection and returns the exact matching total with a bounded metadata-only evidence page. Natural-language search_team_records remains a relevance-oriented discovery tool and is never treated as exhaustive. For questions that cross linked Collections, Ask Simply first resolves the related public record Simply IDs and then uses the bounded in relationship filter. It must not add separate batch counts when a target record could link to more than one batch; if the complete relationship filter exceeds the bound and uniqueness is not guaranteed, it reports that the exact total could not be established. When the schema exposes lifecycle fields, wording such as “purchased,” “paid,” or “completed” must be matched to a confirmed stored status so requested, failed, unpaid, draft, or abandoned records are not counted.

TypeScript SDK

const reply = await s360.teamAgent.sendMessage({
  message: 'Archive the duplicate contact record for Dana Wells.',
  idempotencyKey: crypto.randomUUID(), // retry-safe: a repeat with the same key replays the original run
  // sessionSimplyId omitted: starts a new session
});

if (reply.data.status === 'RUNNING') {
  let run = await s360.teamAgent.getRun(reply.data.runSimplyId);
  while (run.data.status === 'RUNNING') {
    await new Promise((resolve) => setTimeout(resolve, 1500));
    run = await s360.teamAgent.getRun(reply.data.runSimplyId);
  }
  console.log(run.data.assistantMessage?.content);
} else {
  console.log(reply.data.assistantMessage.content);
  console.log(reply.data.controlState?.stateType); // e.g. AWAITING_PROPOSAL_APPROVAL
}

cURL

curl -s -X POST "https://api.simply360.app/v1/team-agent/messages" \
  -H "Authorization: Bearer $S360_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sessionSimplyId": "TAGS-1234-ABCD",
    "message": "How many wizard submissions came in this week?"
  }'

The 201 terminal replay and 202 running response envelopes contain:

FieldDescription
sessionThe session (created or continued).
userMessageThe stored user message.
assistantMessageThe non-null persisted reply for a 201 terminal replay; exactly null for a 202 RUNNING handoff.
runSimplyIdIdentifier of the agent run that produced the reply or should be polled after a handoff.
statusCOMPLETED or WAITING for 201; RUNNING for 202.
availableToolsNames of the tools available to this user in this run (permission-filtered).
controlStateWhat the conversation is waiting on, if anything (see below).
runtimePrompt/context-builder/redaction/control-flow version stamps for the run.

The controlState.stateType values are READY, AWAITING_PROPOSAL_APPROVAL, AWAITING_CLARIFICATION, BACKGROUND_TASK_PENDING, SUPPORT_HANDOFF_AVAILABLE, and FAILED. When the state is AWAITING_PROPOSAL_APPROVAL, controlState.pendingProposalSimplyIds lists the proposals waiting on the user.

Message Feedback

Rate an owned assistant message with UP or DOWN and an optional comment of at most 1,000 characters. The first request creates the current user's feedback row and returns 201; later requests replace its rating and comment and return 200. Omitting comment, passing null, or passing blank text clears the previous comment. The feedback row keeps the same simplyId across updates.

const result = await s360.teamAgent.submitMessageFeedback('AGMS-1234-ABCD', {
  rating: 'DOWN',
  comment: 'The answer cited an outdated policy.',
});

console.log(result.data.created, result.data.feedback.rating);
curl -s -X POST "https://api.simply360.app/v1/team-agent/messages/AGMS-1234-ABCD/feedback" \
  -H "Authorization: Bearer $S360_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "rating": "DOWN", "comment": "The answer cited an outdated policy." }'

Only the user who owns the message's session, in the same team, can rate it or read the resulting feedback. User-authored messages, another user's or team's messages, deleted sessions, and unknown messages all return the same 404 TEAM_AGENT_MESSAGE_NOT_FOUND response. Session and run responses expose only the current user's feedback; they never expose another user's row or internal numeric IDs.

UI Intents

Assistant messages can include uiIntents: small, client-renderable actions that point back to Simply360 surfaces the user is allowed to open. Read tool results derive OPEN_RECORD, OPEN_DATA_VIEW, OPEN_DATA_CARD, OPEN_TEAM_WORKSPACE, and OPEN_ADMIN_BUILDER intents from their source references when a canonical route exists. Builder intents remain permission-scoped; for Collection-level shortcuts the server chooses a section the caller can actually access, such as Settings, Schema, Layout, Data Views, Permissions, or Duplicate Detection.

PREFILL_SUPPORTED_BUILDER is a web-only handoff for an unsaved builder draft. The first supported persistence-free target is Outgoing Message Studio. Its strict version-1 builderPrefill contains details, content, and an optional schedule, but never recipients or resolved audience data. The webapp places the payload in tab-scoped storage under a cryptographically random, five-minute, single-use nonce; only that nonce enters the route query, and the builder deletes it before parsing. A dirty builder asks before replacement. Nothing is persisted until the user performs the builder's normal save action. Data View prefill remains a typed contract but is not exposed as a tool because the current Data View Studio cannot host a new unsaved Data View without first creating a row.

Web clients should render intents with a routeName as navigation actions using the supplied public *SimplyId route params. Simply Anywhere opens record intents natively; Data View, Card, Workspace, admin-builder, and prefill intents are rendered as web-only actions until equivalent native surfaces exist. UI intents do not execute writes and are billing-neutral.

Continue reading in API Reference: Team Agent (Ask Simply): Proposals, Support, and Knowledge Sources.

↑