AlmondTill/G3N API

On this page

askConsultation

mutation · in the family Work and notes

What it does

Ask Aldric one question in a consultation — the reply may include a drafted plan of records to create.

Ask Aldric ONE question in a Consultation: appends your question, composes the STORED summary + the last 12 turns verbatim + your attached materials' STORED extractions (EXTRACT-THEN-COMPOSE — mint/confirm them with wizardType 'consultation' first; only YOUR OWN confirmed materials compose), asks the platform-keyed model, and appends the reply. When the un-summarized tail outgrows the window, the older turns FOLD into the stored summary FIRST (its own metered call — the memory is visible on the record, never hidden model state). A drafted plan in the reply is validated against the LIVE registry + wire schema as it lands — invalid steps arrive MARKED, never repaired; nothing real is created by asking (takeConsultationPlan mints the walk). Refuses INTEGRATION/UNAVAILABLE keyless · RATE_LIMIT/THROTTLED past the 30/hour allowance · CONFLICT/REF_STATE on a non-open consultation · the honest transcript-full refusal naming the follow-on cure. Every made call meters (at.ai.call.v1 — surfaces office.consultation + office.consultation_summary). Requires authentication (user sessions) + the record's current revision.

What happens

Your question and the reply both land on the transcript. Aldric reads the stored summary, the recent turns, and any materials you attach (their stored extractions — files are never re-read). When the conversation grows long, the older turns fold into the stored summary first — visible on the record, never hidden. A drafted plan is checked immediately; steps that do not check out arrive marked, never silently fixed. Each ask is a metered AI call with an hourly allowance per person.

Careful

Nothing real is created by asking — a drafted plan only becomes records after you take, review, approve, and realize it yourself.

Who may call it

Capability area: Work and notes — Tasks, notes, messages, dashboards and the everyday tools every staff member keeps.

Arguments

NameTypeRequiredNotes
inputAskConsultationInput AskConsultationInput!yesNo further notes.

Returns

AskConsultationResult AskConsultationResult! — The askConsultation result — the updated record + the two turns the ask appended (the question as spoken, the reply as drafted-and-marked).

Example request

mutation ExampleAskConsultation($input: AskConsultationInput!) {
  askConsultation(input: $input) {
    consultation {
      id
      sysId
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      turnCount
      summary
      summarizedThroughSeq
      followOnOfId
      idleArchiveAt
      turnsTierAt
      turnsTier
    }
  }
}

Variables:

{
  "input": {
    "id": "01900000-0000-7000-8000-37386ae00000",
    "revision": "01900000-0000-7000-8000-b7960e180000",
    "message": "Restock before the weekend.",
    "materialIds": [
      "01900000-0000-7000-8000-a36392ca0000"
    ]
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

{
  "data": {
    "askConsultation": {
      "consultation": {
        "id": "01900000-0000-7000-8000-37386ae00000",
        "sysId": "CI-EXMP-0000-000F",
        "type": "Consultation",
        "caption": "Blue jeans",
        "status": "open",
        "parentId": "01900000-0000-7000-8000-065235280000",
        "rootId": "01900000-0000-7000-8000-a093dd800000",
        "createdAt": "2027-01-31T00:00:00.000Z",
        "updatedAt": "2027-01-31T00:00:00.000Z",
        "revisionNum": 1,
        "revision": "01900000-0000-7000-8000-b7960e180000",
        "turnCount": 1,
        "summary": "<summary>",
        "summarizedThroughSeq": 1,
        "followOnOfId": "01900000-0000-7000-8000-7d2662410000",
        "idleArchiveAt": "2027-01-31T00:00:00.000Z",
        "turnsTierAt": "2027-01-31T00:00:00.000Z",
        "turnsTier": "<turns tier>"
      }
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in