This is the abridged developer documentation for Neurologyca DevLab # Neurologyca DevLab > Human context for apps, agents and enterprise software: integrate Engine 2 and its Human Context Indicators with the SDK and the API. Neurologyca DevLab Human context\ for apps, agents and\ enterprise software. ==================== Real-time indicators of stress, engagement, cognitive load and more, through our SDK and API. From your first call to production. Search the documentation`Ctrl``K` [Quickstart](/docs/start/quickstart/)[API key](/account)[API reference](/docs/reference/) [![](/docs/media/hero-human-context-poster.webp)](/docs/media/hero-human-context.mp4) Listen · Understand · Adapt Play An abstract figure made of light, with no face, interacts with an AI. Signals from the interaction (face, voice, context, memory and wearables) flow into a valence and arousal map with Valence, Arousal, Stress, Attention and Interest. A "Human context" summary appears: engaged, mildly stressed, prefers short answers. That human context fans out to LLMs, agents, assistants and apps, and the AI adapts its response: first it simplifies, then it reassures. Quickstart ## Your first capture In your page with the SDK, or from your backend with Python or cURL. The key never reaches the browser. * 1 backend file + 1 page * First result in under a minute SDKPythoncURL ``` import { createProtocolClient } from '@neurologyca/capture' const client = createProtocolClient({ baseUrl: '/engine', // your backend's proxy: the browser carries no token taxonomy: { contextId: 'measurement' }, }) const session = await client.captureProtocol({ userProtocolId, protocolMechanicId, // your backend gives you the pair source: { type: 'webcam' }, triggerAnalysis: false, }) const [step] = session.plan.steps // Measurement: one step await session.step(step.order).run({ durationMs: 15_000 }) const outcome = await session.stop() // the indicators: outcome.hcis ``` ``` import json, os, sys, time import requests # Your environment's Engine URL is in your kit (ENGINE_BASE: the cURL tab calls it $ENGINE). The API key stays on your server. ENGINE = os.environ["ENGINE_BASE"] API_KEY = os.environ["ENGINE_API_KEY"] r = requests.post(f"{ENGINE}/token", json={"apiKey": API_KEY}) r.raise_for_status() token = r.json()["token"] auth = {"Authorization": f"Bearer {token}"} ``` ``` export ENGINE="" export ENGINE_API_KEY="" TOKEN=$(curl -s -X POST "$ENGINE/token" \ -H "Content-Type: application/json" \ -d "{\"apiKey\":\"$ENGINE_API_KEY\"}" | jq -r .token) EXT="quickstart-$(date +%s)" curl -s -X POST "$ENGINE/users" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d "{\"externalId\":\"$EXT\",\"name\":\"quickstart-user\"}" ``` [This is the minimum. The full Quickstart addsYour backendErrorsYour own videoFull Quickstart](/docs/start/quickstart/) [Playground](/playground) ## [Watch a real measurement, call by call](/playground) [* The capture, in the browser* Every call to Engine, with its response* Copy it as cURL, JavaScript or Python](/playground) [See the example · 101 s](/playground) [CALLS TO ENGINE](/playground) [POST/users201](/playground) [GET/users/{app_user}/baseline404](/playground) [POST/users/{app_user}/baseline ×3202](/playground) [GET/users/{app_user}/baseline ×2404 → 200two reads: 404 then 200](/playground) [POST/user-protocols201](/playground) [GET/user-protocols/{up}200](/playground) [GET/user-protocols/{up}/mechanics/{pm}200](/playground) [GET/stream/{up}SSE](/playground) [POST/process-kpn-emo ×13202](/playground) [GET/results/{up}/{pm}200](/playground) Integration paths ## Choose how to integrate [Compare in detail](/docs/start/paths/) ### 1 · Where it is processed #### On-device (real time) Recommended · Preview 0.45 In the browser, while the person captures. ResultsDuring the session; long captures take minutes to close Leaves the deviceLandmarks and expression data; the transcript only if you turn it on. Never video or audio Limited byThe device: GPU face detection (WebGL 2) and, on phones, heat in long sessions Available today * [Guide](/docs/sdk/on-device/) * [Quickstart](/docs/start/quickstart/) * [SDK reference](/docs/sdk/reference/) #### Deferred (server-side) Preview The SDK records and uploads; our service processes it shortly after. ResultsMinutes after the upload Leaves the deviceVideo and audio, to your receiver Limited byUpload bandwidth Today: record, upload and process with Neurologyca's service * [Guide](/docs/sdk/deferred/) * [SDK reference](/docs/sdk/reference/) #### Self-hosted (coming soon) Coming soon Deferred processing on your own servers. Results—Not yet Leaves the deviceVideo and audio, to your own servers Limited by—Not yet Coming later Until then: deferred with our service ### 2 · How you write it #### SDK Recommended for capturing In your page: routes, batches, retries and conflicts, handled for you. Your proxy adds the token. * [Quickstart](/docs/start/quickstart/) * [Reference](/docs/sdk/reference/) \+ #### HTTP API Complementary From your backend, any language: results later, polling, catalogue, participants. * [Guide](/docs/api/) * [Reference](/docs/reference/) The SDK for capturing; the API for one-off calls and your backend. Most integrations combine both. ### Which one do I choose? * [THE DEFAULTNot sure? **SDK on-device**, starting with **Measurement**: measure without interpretingMeasurement guide](/docs/guides/measurement/) * [PRIVACY · REAL TIMEThe **video must not leave the device**, or you want results during the sessionOn-device (real time)](/docs/sdk/on-device/) * [MODEST DEVICES · LONG SESSIONS**Modest phones** or **sessions of several minutes**Deferred (server-side)Preview](/docs/sdk/deferred/) * [ANOTHER PLATFORMYou capture from **another language or platform**, or already have the framesHTTP API](/docs/api/) AI agents ## Let your coding agent write the integration Install the Neurologyca skills and paste the index into your AGENTS.md: your agent follows the verified steps of these docs instead of guessing. * Claude Code * Cursor * Codex * GitHub Copilot * any agent that reads a URL - **The real routes and payloads**Engine 2 and SDK 0.45, from the reference. - **The recommended path first**Your backend's proxy, the enrolment, the capture. - **The pitfalls, already known**The key never in the browser, the baseline, the CSP. [Build with your coding agent](/docs/start/ai-agents/)[llms.txt](/docs/llms.txt) 1. **1**1. Install the skill 2. **2**2. Ask 3. **3**3. Check it with doctor Claude CodeCodex · Cursor · CopilotWithout the installer ``` npx skills add https://devlab.neurologyca.com -a claude-code # then, in your project: claude "Add Neurologyca on-device capture with Measurement to this page." ``` ``` npx skills add https://devlab.neurologyca.com -a codex -a cursor -a github-copilot ``` ``` # Download https://devlab.neurologyca.com/docs/agents/skills/neurologyca-capture.zip, then: mkdir -p .agents/skills/neurologyca-capture .claude/skills/neurologyca-capture unzip neurologyca-capture.zip -d .agents/skills/neurologyca-capture unzip neurologyca-capture.zip -d .claude/skills/neurologyca-capture # By the HTTP API from another language, download https://devlab.neurologyca.com/docs/agents/skills/neurologyca-engine-api.zip and do the same: mkdir -p .agents/skills/neurologyca-engine-api .claude/skills/neurologyca-engine-api unzip neurologyca-engine-api.zip -d .agents/skills/neurologyca-engine-api unzip neurologyca-engine-api.zip -d .claude/skills/neurologyca-engine-api ``` **Then ask**"Add Neurologyca on-device capture with Measurement to this page, with the proxy in my Express backend." * Skill · Capture SDKAvailable * Skill · HTTP APIAvailable * `/docs/llms.txt`Available * `AGENTS.md`Available Journey ## From your first call to production **1**Get started [Integration paths](/docs/start/paths/)[Quickstart](/docs/start/quickstart/)[Measurement only](/docs/guides/measurement/)[Your environments](/docs/start/environments/)[Test your integration](/docs/start/testing/) **2**Capture [On-device (real time)](/docs/sdk/on-device/)[Deferred (server-side)](/docs/sdk/deferred/)[Steps and marking](/docs/sdk/steps/) **3**Interpret [HCIs and results](/docs/concepts/results/)[Results in your backend](/docs/sdk/results-backend/) **4**Operate [Your backend](/docs/sdk/backend/)[Errors, warnings and retries](/docs/sdk/errors/)[Limits](/docs/concepts/limits/)[Timeouts](/docs/guides/timeouts/)[Before production](/docs/guides/production-checklist/)[SDK changelog](/docs/resources/changelog/) Resources ## Keep learning ### [Migrating from Engine 1.5](/docs/resources/migration/) [What changes, route by route.](/docs/resources/migration/) ### [Build with your coding agent](/docs/start/ai-agents/) [These docs as context, two skills for your coding agent and its AGENTS.md: available.](/docs/start/ai-agents/) ### [Privacy and data](/docs/resources/privacy/) [What leaves the device and how to delete it.](/docs/resources/privacy/) ### [Your integration](/integration) [Your team, your protocols and their status.](/integration) Neurologyca gives apps, agents and enterprise software the human context to adapt their responses and actions. © 2026 Neurologyca [Privacy](/docs/resources/privacy/)[llms.txt](/docs/llms.txt)[Legal](/legal/)[Español](/docs/es/) # Integration paths > How you integrate (SDK and HTTP API) and where it is processed (on-device or deferred), with the measured numbers and a short guide to choose. We recommend **capturing with the SDK, on-device (real time)**, for most integrations, and using the **HTTP API** for one-off calls and your backend: reading results later, polling or searching the catalogue. Capture **deferred (server-side)** when the device cannot keep up with on-device capture (modest phones, long sessions) and you can upload video: today you can record, upload and process with Neurologyca’s processing service, with nothing to deploy. If you capture outside the browser (another language or platform, or you already have the frames), the HTTP API also captures. The SDK for capturing; the API for one-off calls and your backend. Most integrations combine both. ## The default path [Section titled “The default path”](#the-default-path) If you are not sure: the SDK on-device (real time), with Measurement as your first protocol (in the test environment: the production Engine does not offer it yet ([Your environments](/docs/start/environments/))); move to deferred (server-side) if your tests on your phones call for it. Start with the [Quickstart](/docs/start/quickstart/) and [Measurement](/docs/guides/measurement/). Without an account: the recorded examples, the code and the docs; measuring needs an invitation ([request access](https://intake.neurologyca.com)). ## Two questions [Section titled “Two questions”](#two-questions) You decide two things, and they do not depend on each other: **how you integrate** (the SDK, the HTTP API, or both) and **where it is processed** (on the device or on a server). On-device (real time) 1. Your page · SDK, live client 2. Your backend · proxy (adds the token) 3. Engine Deferred (server-side) 1. Your page · SDK, recording client 2. Your backend · upload receiver 3. Processing service Preview 4. Engine HTTP API 1. Any language: the HTTP API, straight from your backend 2. Engine ## How you integrate [Section titled “How you integrate”](#how-you-integrate) | Topic | SDK · Recommended for capturing | HTTP API · Complementary | SDK + API · The usual | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | What for | For capturing: protocol, steps, batches, baseline and the session's results. | For one-off calls and your backend: results later, polling, catalogue, participants, contexts, any language. | Capture in the browser with the SDK, then read from your backend with the API: results later, polling, the catalogue. See [Results in your backend](/docs/sdk/results-backend/). | | What it does for you | Routes, the token (your proxy adds it), batching, retries, conflicts and the position reservation. | Nothing: you build the calls, the batches, the retries and the event stream. | The SDK runs the capture; your backend makes plain reads. | | Your backend | `@neurologyca/capture-server`: the proxy (`createEngineProxy`) and `createEngineAdmin`, which is the same API from Node. | Any language: `POST /token` with your key, then the calls of the HTTP guide. | `createEngineAdmin` creates the person and the enrolment; later, `getResults` or `GET /results`. | | Time to the first result | Seconds after the last step: the `CaptureOutcome` arrives shortly after the session ends, so a short protocol gives its first result in under a minute; creating the person and the enrolment before Start takes a moment more. | Seconds after the last batch: the cURL quickstart goes from `POST /token` to the results in well under a minute. | The same as the SDK; your backend reads whenever it needs to. | | Effort | One backend file (proxy, person and enrolment) and one page: what the quickstart builds. | The HTTP guide by hand: the calls, the batches, the retries and the event stream. | The SDK in the page, plus a few reads in your backend. | SDK and API work in both directions: * **Backend first:** `createEngineAdmin` creates the person and the enrolment, and the page captures with that pair of ids. * **Browser first:** the page captures with the SDK, and your backend reads the results later (`GET /results`, or `createEngineAdmin().getResults`, the same API from Node). See [Results in your backend](/docs/sdk/results-backend/). Caution Reopening the page can enrol the person again. Keep the pair of ids in your backend, and use the same person and the same source (camera or video) for the baseline and the measurement. ## Where it is processed [Section titled “Where it is processed”](#where-it-is-processed) | Topic | On-device (real time) · Preview 0.45 | Deferred (server-side) · Preview | Self-hosted (coming soon) | | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | | Today | Available. | You can record, upload and process with Neurologyca's processing service: nothing to deploy. | Coming later. | | Where it runs | In the browser, on the person's device, while they capture. | On our processing service, shortly after the upload. It is not hours later: it just does not run on the device. | On your own servers. | | When the results arrive | During the session and seconds after the last batch in a short capture. A long capture, with thousands of frames, takes minutes. Past `outcomeDeadlineMs` (240 s by default) `stop()` gives `E_RESULTS_TIMEOUT`, which is not a loss: read the results later. | Minutes after the upload, adding three stretches: the upload (about 7 min for 3 min of video at 1.75 Mbps, a calculation), the queue (one job at a time) and the processing, somewhat longer than the video itself. | Coming later. | | What leaves the device | Landmarks, expression coefficients and head pose, to Engine. Only if you turn them on: the transcript (speech recognition runs in the browser, so the audio stays and the text goes; Engine passes it to an LLM for the interpretation) and the extra signals (voice as numbers, pulse, hands, body). Never image, video or audio. | Video and audio (with the camera, the microphone is always on) to your receiver, and from there to the processing service, which, with transcription on, transcribes the whole audio of the recording and passes to Engine only the text of the steps the job asks for (`transcribeSteps`). The raw audio identifies a person more than numbers do, and the manifest that travels with the video holds the full `userAgent` of the browser. | Video and audio, to your own servers. | | What limits you | The device: the face detection on the GPU (WebGL 2) and, on phones, heat in long sessions, which lower the frame rate. A recent phone or laptop usually stays close to the camera's rate; an entry-level phone captures fewer frames per second, and a phone loses rate as it heats up. | Upload bandwidth. At 4 Mbps, 3 min of video are about 93 MB (about 310 MB per 10 min). The upload resumes after a cut. The quality depends on the recording's bitrate and the light, not on the device's power: the processing runs on the server. | Coming later. | | Browsers and phones | Chrome and Edge 94+, Safari 16.4+ (iOS 16.4+), on desktop and capable phones. | Records MP4/H.264: desktop Chrome and Edge, Chrome on Android and Safari on iOS. An iPhone records MP4 too: its file can end about 1.1 s before the stop, which is why the SDK keeps recording 2 s more. On a phone or a tablet it records in portrait: it waits until the device is upright. | Coming later. | | Measurement | Yes. | Yes, since 0.27.0: `triggerAnalysis: false` travels in the manifest and the processor does not call `/analyze`. | Coming later. | | Typical cases | A short check-in on a laptop; a two-minute task on a recent phone; any capture whose video must not leave the device. | A ten-minute interview on a modest phone; a field session on a weak device, uploaded later. | Video that must be processed inside your own infrastructure. | | Moving between them | `createProtocolClient` (from `@neurologyca/capture`) ↔ `createRecordingClient` (from `@neurologyca/capture/record`, without kodec). Some options do not carry over: `transcribe` is on-device only; in deferred, the processing service transcribes. | Add the receiver to your backend (`createUploadReceiver`); record from the camera, a `