Architecture
How the harness API works, what it returns, and how your agent uses it. For the theoretical foundations, see The Method. For the endpoint spec, see API Reference.
Request Lifecycle
Every call to /harness/ passes through four stages. In dynamic mode, the same input always produces the same output at zero LLM inference cost; adaptive mode adds one adapter-model pass that rewrites the matched operation to your task.
POST /harness/
|
1. Authentication Verify API key, resolve tier, enforce rate limits
2. Retrieval Match query against 679 abilities across 4 harnesses
3. Composition Assemble the cognitive injection (adaptive rewrites it to your task)
4. Response Return pre-rendered injection string as JSON
Dynamic retrieval executes in under one second with no LLM call. The response is a structured injection that channels the model's existing power into disciplined execution.
What the API Returns
Dynamic Modes (reasoning, code, anti-deception, memory)
One cognitive operation: the highest-scoring match for your query from the selected harness, returned as-is.
[ { "reasoning": "[PROCEDURE]\nStep 1: Trace backward from failure...\n\n[REASONING TOPOLOGY]\nS1:identify_failure -> S2:trace_backward...\n\n[COGNITIVE PAYLOAD]\nAmplify: reverse replay; counterfactual node test\nSuppress: writing a vague post mortem summary...\nCognitive Style: backward chain analysis\nElasticity: coherence=root cause isolation, expansion=adversarial\n\n[FALSIFICATION TEST]\nIf an error's origin is not traced by replaying...\n\n[NEGATIVE GATE]\nThe checkout service crashed and we documented the incident...\n\n[TARGET PATTERN]\nReverse replay from the crash point..." } ]
Adaptive Modes (adaptive-reasoning, adaptive-code, adaptive-anti-deception, adaptive-memory)
The same matched operation, but an adapter model rewrites the [PROCEDURE] and topology to name your task's specifics. Every other section is returned identical to the dynamic response.
[ { "adaptive-reasoning": "[PROCEDURE]\n...rewritten with your task's variables...\n\n[REASONING TOPOLOGY]\n...rewritten with your task's nodes...\n\n[COGNITIVE PAYLOAD]\nAmplify: ...\nSuppress: ...\n\n[FALSIFICATION TEST]\n...identical to dynamic...\n\n[NEGATIVE GATE]\n...identical to dynamic...\n\n[TARGET PATTERN]\n...identical to dynamic..." } ]
Response Components
Six labeled blocks in canonical order. Labels differ per harness; the function of each slot is the same.
| # | Slot | Reasoning label | What It Does |
|---|---|---|---|
| 1 | Procedure | [PROCEDURE] | Step-by-step reasoning instructions the agent follows |
| 2 | Execution structure | [REASONING TOPOLOGY] | DAG with steps, decision gates, loops, reflection points |
| 3 | Cognitive payload | [COGNITIVE PAYLOAD] | Amplify: and Suppress: signals plus cognitive style and elasticity |
| 4 | Verification | [FALSIFICATION TEST] | Pass/fail criterion the agent checks its output against |
| 5 | Failure pattern | [NEGATIVE GATE] | The specific reasoning failure the agent must avoid |
| 6 | Correct shape | [TARGET PATTERN] | What correct reasoning looks like for this task type |
Labels differ per harness: reasoning uses [NEGATIVE GATE], code uses [CODE FAILURE], anti-deception uses [DECEPTION PATTERN], memory uses [PERCEPTION FAILURE]. Each harness also returns a correct-shape block ([TARGET PATTERN] / [CORRECT PATTERN] / [HONEST BEHAVIOR] / [CLEAR SIGNAL]) and a [COGNITIVE PAYLOAD] block carrying the Amplify / Suppress / Cognitive Style / Elasticity lines. Adaptive modes return the same sections; only the procedure and topology are rewritten.
Product Layers
Each mode routes to a specialized ability collection. The query is matched against the abilities within that layer.
| Dimension | What It Addresses |
|---|---|
| Causal | Direction-of-causation errors, correlation treated as cause |
| Temporal | Sequence errors, confabulated timelines, duration bias |
| Spatial | Topology failures, boundary violations, structural constraints |
| Simulation | Counterfactual collapse, failure to model consequences |
| Abstraction | Category errors, over-generalization, metaphor/mechanism confusion |
| Metacognition | Hallucination spirals, reasoning drift, bias blindness |
A supply chain risk query scores high on Causal and Temporal. A market expansion question scores on Spatial, Simulation, and Abstraction. The routing is probabilistic, not categorical.
How to Inject
Wrap the API response in delimiters and prepend to your agent's system message, BEFORE the task prompt:
[REASONING CONTEXT]
{paste the response value here (key matches the mode name)}
[END REASONING CONTEXT]
Now complete the following task:
{your agent's actual task}
The injection must come BEFORE the task. The suppression vectors need to be in context when the agent begins reasoning, not after.
For multi-turn agents: re-inject per turn. Each turn may activate a different reasoning dimension. Stale injections from previous turns degrade as context fills with task-specific tokens.
Token Overhead
| Mode | Response size | Approximate tokens |
|---|---|---|
| dynamic modes (reasoning, code, anti-deception, memory) | ~2,000-3,500 chars | ~400-600 tokens |
| adaptive modes (adaptive-reasoning, adaptive-code, etc.) | larger: the rewrite expands the procedure and topology with task-specific detail | varies by task |
Compare to a typical system prompt: 5,000 to 15,000 tokens. The injection is compact by design. It replaces prose with structured constraints.
Integration
Your agent calls Ejentum like any other tool. One POST request, one JSON response, one injection.
Request
POST https://api.ejentum.com/harness/ Authorization: Bearer YOUR_API_KEY Content-Type: application/json { "query": "Why did our deployment fail after the config change?", "mode": "reasoning" }
Compatible Frameworks
Ejentum works with any system that can make an HTTP POST and inject text into a prompt:
- n8n. AI Agent node with HTTP Request Tool
- LangChain / LangGraph. Custom tool or LCEL chain
- CrewAI. Tool injection into agent backstory
- Claude Code / Agent SDK. tool_use definition
- Cursor, Windsurf, Antigravity, Codex. custom HTTP tool
- Any HTTP client. Direct POST, parse JSON, inject
See the Integrations guide for framework-specific code examples.
Rate Limits and Errors
| Limit | Value |
|---|---|
| Requests per minute | 100 per API key (paid tiers) |
| Free trial | 1,000 dynamic calls |
| Go | 1,000 dynamic + 250 adaptive / month |
| Super | 5,000 dynamic + 1,500 adaptive / month |
| Error | Meaning |
|---|---|
401 | Invalid or missing API key |
403 | Adaptive mode requested on a tier that does not include it |
429 | Rate limit or monthly quota exceeded |
500 | Server error (retry with backoff) |
For the full API specification, see the API Reference.