AlmondTill/G3N API

On this page

draftSearchPlan

query · in the family Reading your records

What it does

Describe what you are looking for in plain words and get a search plan back — the start, the relationships to follow, the conditions on each step — shown in words before anything runs.

Draft ONE search plan from plain words: the assistant routes your words onto the plan grammar — the start family, up to 3 hops along KNOWN relationships, each step's conditions — in ONE strict structured call; then each step's conditions pass through the SAME interpreter the filter builder uses (names resolve inside your tenant; every clause re-validated exactly as hand-built); the assembled plan passes THE PLAN GATE before you see it (a refused plan is re-asked ONCE with the gate's own words, then refused VALIDATION/INVALID in the teaching voice). NOTHING runs and nothing is saved: the answer is the plan IN WORDS + the exact JSON document searchPlanRun(plan) / startSearchJob(plan) accept — you decide. words is one written ask, 1..500 characters. Refuses INTEGRATION/UNAVAILABLE while the assistant is offline/keyless — build the plan by hand. Requires authentication (user sessions). Every call is cost-metered (at.ai.call.v1 — the route call as office.plan_draft, each step as office.filter_interpret).

What happens

A drafting assist: nothing runs and nothing is saved. The assistant routes your words onto the plan grammar and interprets each step’s conditions (names resolve inside your organization); the plan passes the same gate a hand-built plan passes; you run it with searchPlanRun or startSearchJob. Every call is metered like any other AI call.

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
wordsString String!yesNo further notes.

Returns

SearchPlanDraft SearchPlanDraft! — NOTHING has run.

Example request

query ExampleDraftSearchPlan($words: String!) {
  draftSearchPlan(words: $words) {
    words
    planJson
    reasoning
  }
}

Variables:

{
  "words": "<words>"
}

Example response

{
  "data": {
    "draftSearchPlan": {
      "words": "<words>",
      "planJson": "<plan json>",
      "reasoning": "<reasoning>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer