Differences
This shows you the differences between two versions of the page.
| ai_gateway [2026/11/04 16:59] – created Gareth Johnstone | ai_gateway [2026/11/04 17:09] (current) – Gareth Johnstone | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== IQX AI Gateway ====== | + | < |
| + | The UI and API examples on this page are representative mockups — hostnames, keys, names and figures shown are illustrative, | ||
| + | </ | ||
| - | The **IQX AI Gateway** is the single front door for every AI feature in IQX. Instead of each part of the product talking to an AI provider directly, everything — the **IQXAssist** chat your consultants use, the wiki help assistant, CV reformatting, | + | ===== IQX AI Gateway |
| - | In short: it is an AI // | + | The **IQX AI Gateway** |
| - | **At a glance** | + | In short, it is an AI //router// and //control plane//: the clever bits (which model, failover, cost caps, encryption) live in one place, so every IQX feature behaves the same way and we can add or swap models without touching the apps. |
| - | | + | <note tip> |
| + | **At a glance** | ||
| + | | ||
| * **One API key per tenant/ | * **One API key per tenant/ | ||
| - | * **Automatic failover** — if a model or provider fails, the gateway transparently tries another. | + | * **Automatic failover** — if a model is unavailable, the gateway transparently tries another. |
| * **OpenAI-compatible** — point any OpenAI SDK at ''/ | * **OpenAI-compatible** — point any OpenAI SDK at ''/ | ||
| - | * Chat history stored in **MongoDB in the UK**, **encrypted per message** | + | * Chat history stored in **MongoDB in the UK**, **encrypted per message**, auto-deleted **30 days** after last use. |
| + | </ | ||
| ---- | ---- | ||
| - | ====== Two ways to use it ====== | + | ===== IQXAssist — the in-app chat ===== |
| - | There are two surfaces on top of the same gateway: | + | IQXAssist is the assistant your consultants talk to inside IQX. Unlike a standard " |
| - | ^ Surface ^ Who uses it ^ What it is ^ | + | <row> |
| - | | **IQXAssist | + | <col md=" |
| - | | **The HTTP API** | IQX services & scripts | A set of stateless endpoints for one-shot jobs — summarise, rewrite a CV, read a photo or document, transcribe audio, or a raw OpenAI-compatible chat call. | | + | <image shape=" |
| + | </ | ||
| - | Both share the same keys, the same failover and the same spend caps. | + | <col md=" |
| + | == Two modes == | ||
| - | ---- | + | The chat works in two modes depending on what you ask: |
| - | ====== IQXAssist (the chat) ====== | + | * **Conversational** — answers general questions, drafts text, or summarises information already in the chat. |
| + | * **Agent (live data)** — when you ask for specific records or actions (e.g. "show me open shifts" | ||
| - | IQXAssist | + | Every session |
| + | </ | ||
| + | </ | ||
| - | {{: | + | ==== What it can pull in (read) ==== |
| - | ===== What it can do ===== | + | IQXAssist has strictly defined **tools** that let it read specific parts of a record. These are read-only and never change anything. |
| - | The assistant has five tools. Read-only tools run freely; | + | ^ Data type ^ What it can see ^ Best way to ask ^ |
| + | | **Timesheets / records** | Pay status, hours, rates, notes, placements | "Show timesheets from 1 Jan to 1 Feb" | | ||
| + | | **Shifts** | Open shifts | ||
| + | | **Availability** | Holidays and unavailability blocks | "Are they available in March?" | ||
| + | | **Compliance** | Licence details, training, medicals, right to work | " | ||
| - | ^ Tool ^ Type ^ What it does ^ | + | <note tip> |
| - | | Candidate data | read | Pulls live IQX records for the candidate in context (timesheets, | + | **The "date range" rule** \\ |
| - | | Matching shifts | read | Finds **open** shifts the in-context candidate is suitable and available for. | | + | To avoid overloading |
| - | | Compliance check | read | Checks whether | + | </ |
| - | | Book shift | **write** | Books the candidate into a shift. Only ever after explicit confirmation; | + | |
| - | | Set availability | **write** | Records the candidate' | + | |
| - | Which tools a key can use is set **per API key** — a disabled tool is never even offered to the model. | + | ==== Taking actions (write) ==== |
| - | ---- | + | IQXAssist can also do things on your say-so — propose a **shift booking** or record an **availability change**. |
| - | ====== How it works ====== | + | <note important> |
| + | Write actions are **only ever carried out after you explicitly confirm them**, and every action is re-validated server-side (availability, | ||
| + | </ | ||
| - | Every request — chat or API — flows through the same pipeline: | + | ==== Drafting & formatting ==== |
| - | < | + | One of the handiest features is drafting communications: |
| - | IQX app / service | + | |
| - | │ | + | |
| - | ▼ | + | |
| - | ┌──────────────── IQX AI Gateway ─────────────────┐ | + | |
| - | │ | + | |
| - | │ ┌───────────┴───────────┐ | + | |
| - | │ model A model B | + | |
| - | │ └──────► failover ◄──────┘ | + | |
| - | │ log usage · meter cost · encrypt & store chat │ | + | |
| - | └─────────────────────┬────────────────────────────┘ | + | |
| - | ▼ | + | |
| - | response to caller | + | |
| - | </ | + | |
| - | ===== Models & failover ===== | + | * **Emails** — ask it to "write an email…" |
| + | * **Text / SMS** — ask for a "text message" | ||
| - | The gateway offers a range of EU-hosted, open-weight models — a fast general model (the default), a higher-capability model, a **vision** model for reading images, and an **audio** model for transcription. Which one serves a request is chosen by the gateway; callers never hard-code a model. If a model or provider fails, rate-limits or can't serve the request, the gateway **transparently fails over** to another so the caller still gets an answer. The specific models are managed centrally and can change without any change to the apps. | + | ==== Smart touches ==== |
| - | ===== Spend caps ===== | + | * **Streaming responses** — answers appear in real time as the AI works, rather than waiting for the whole reply. |
| + | * **Auto-titling** — each session is given a short title from the first few messages, so it's easy to find later. | ||
| - | Each key has an optional **monthly spend cap**. The gateway meters cost on every call and hard-stops once the cap is reached (a cap of 0 means " | + | ---- |
| - | ===== Storage, encryption & retention | + | ===== The API — endpoint by endpoint |
| - | * Chat history and usage logs live in **MongoDB hosted in the UK**. | + | Every capability |
| - | * Chat message content | + | |
| - | * A chat session and all its messages are **automatically deleted 30 days** | + | |
| - | * Model inference is **transient** — prompts are processed, not stored, by the model providers. | + | |
| - | ---- | + | < |
| - | ====== What it can do — endpoint | + | Here is what each endpoint |
| - | Every capability is one HTTP call. Authenticate with a Bearer key ('' | + | ==== Read a document |
| - | ===== Read a document — get JSON out ===== | + | Send an image plus a prompt. Ask a plain question and get an answer, or ask for the fields and they come back parsed in '' |
| - | Send an image and a prompt. Ask a plain question and get an answer, or ask for the fields and they come back parsed in '' | + | < |
| + | <image shape=" | ||
| + | </ | ||
| - | {{: | + | ==== Lift the photo off an ID ==== |
| - | ===== Lift the photo off an ID ===== | + | Finds the portrait on a licence, passport or ID card and crops it out — ready to save straight to the candidate' |
| - | Finds the portrait | + | < |
| + | <image shape=" | ||
| + | </ | ||
| - | {{: | + | ==== Transcribe audio ==== |
| - | + | ||
| - | ===== Transcribe audio ===== | + | |
| Drop in a voice note or interview recording and get an accurate transcript straight back. | Drop in a voice note or interview recording and get an accurate transcript straight back. | ||
| - | {{:ai_gateway: | + | < |
| + | <image shape=" | ||
| + | </ | ||
| - | ===== Reformat a CV to house style ===== | + | ==== Reformat a CV to house style ==== |
| - | Upload a candidate' | + | Upload a candidate' |
| - | {{:ai_gateway: | + | < |
| + | <image shape=" | ||
| + | </ | ||
| - | ===== Tighten rough CV wording | + | ==== Tighten rough CV wording ==== |
| Clean up a candidate' | Clean up a candidate' | ||
| - | {{:ai_gateway: | + | < |
| + | <image shape=" | ||
| + | </ | ||
| - | ===== One-shot answers over a record | + | ==== One-shot answers over a record ==== |
| Send a record (or any document) plus a prompt and get a tidy answer back — great for summaries embedded in other IQX screens. | Send a record (or any document) plus a prompt and get a tidy answer back — great for summaries embedded in other IQX screens. | ||
| - | {{:ai_gateway: | + | < |
| + | <image shape=" | ||
| + | </ | ||
| + | |||
| + | ==== Drop-in OpenAI-compatible endpoint ==== | ||
| + | |||
| + | Point any OpenAI SDK at ''/ | ||
| + | |||
| + | < | ||
| + | <image shape=" | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| - | ===== Drop-in OpenAI-compatible endpoint | + | ===== Security & data ===== |
| - | Point any OpenAI SDK at '' | + | < |
| + | <col md=" | ||
| + | < | ||
| + | **Private by design** | ||
| + | * Chat content is **individually encrypted | ||
| + | * Sessions are **context-isolated** per record, so data never crosses between candidates. | ||
| + | * The models **do not train** on your data. | ||
| + | * CV contact details (phone, email, address) are **redacted** automatically. | ||
| + | </note> | ||
| + | </col> | ||
| - | {{: | + | <col md=" |
| + | < | ||
| + | **Where it lives** | ||
| + | * Chat history and usage logs are stored in **MongoDB in the UK**. | ||
| + | * Sessions | ||
| + | * Model inference runs on **EU-hosted** providers and is **transient** — prompts are processed, not stored. | ||
| + | * Usage logs keep **metadata only** (no message content). | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| ---- | ---- | ||
| - | ====== Endpoint reference | + | ===== Endpoint reference ===== |
| ^ Endpoint ^ Method ^ Purpose ^ | ^ Endpoint ^ Method ^ Purpose ^ | ||
| Line 138: | Line 176: | ||
| | ''/ | | ''/ | ||
| | ''/ | | ''/ | ||
| - | | ''/ | + | | ''/ |
| | ''/ | | ''/ | ||
| | ''/ | | ''/ | ||
| Line 149: | Line 187: | ||
| ---- | ---- | ||
| - | ====== Getting access | + | ===== Getting access ===== |
| Keys, capabilities and spend caps are managed by IQX in the gateway admin. If you need a key for a new service or client, or want a capability enabled, contact the IQX development team. | Keys, capabilities and spend caps are managed by IQX in the gateway admin. If you need a key for a new service or client, or want a capability enabled, contact the IQX development team. | ||
| - | //Note: hostnames, key values, names and figures on this page are illustrative. The mockups are representative of the real UI/API, not live screenshots.// | ||