Documentation

Everything you need to build with Ejentum. From quickstart guides to advanced patterns.

API Reference

Complete technical reference for the Ejentum Logic API v1. If you have not read the Quickstart, start there. This page is the full specification for builders integrating into production.

Base URL

https://ejentum-main-ab125c3.zuplo.app

Authentication

All requests require an API key passed as a Bearer token:

Authorization: Bearer YOUR_API_KEY

Endpoints

POST /logicv1/

Evaluate a natural language query and retrieve the optimal cognitive ability from the matched product layer.

Request

HeaderValue
AuthorizationBearer YOUR_API_KEY
Content-Typeapplication/json

Request Body

{
  "query": "string",
  "mode": "reasoning"
}
FieldTypeRequiredDescription
queryStringYesThe agent's task description or reasoning context. Send the full task, not a summary. Query specificity drives routing precision.
modeStringNoInjection mode. Defaults to reasoning. See Modes table below.

Modes

ModeDescriptionPlanResponse Key
reasoningReasoning Harness. 311 abilities across 6 domains.Kireasoning
reasoning-multiPrimary + cross-domain suppression graph with dynamic meta-checkpoint.Hakireasoning-multi
anti-deceptionBlocks sycophancy, hallucination, prompt injection. 139 abilities.Kianti-deception
codeCode generation, refactoring, architecture. 128 abilities.Kicode
code-multiPrimary + cross-domain engineering guards.Hakicode-multi
memoryPerception sharpening, behavioral calibration. 101 abilities.Kimemory
memory-multiPrimary + cross-domain perceptual guards.Hakimemory-multi

Response: 200 OK

The response is a JSON array with a single object. The response key matches the mode name:

[
  {
    "reasoning": "[NEGATIVE GATE]\nTreats the first visible symptom as the root cause...\n\n[PROCEDURE]\nStep 1: Enumerate all competing explanations...\n\n[REASONING TOPOLOGY]\nS1:enumerate -> S2:count_assumptions -> G1{covers_all?} --yes-> OUT --no-> S2[LOOP]\n\n[TARGET PATTERN]\nIteratively applies n-Whys deconstruction...\n\n[FALSIFICATION TEST]\nIf the proposed fix addresses a surface symptom...\n\nAmplify: depth first root search\nSuppress: symptom treatment bias; surface level stop"
  }
]

Response Keys

The response key always matches the mode you sent. Parse the value — it's a pre-rendered injection string ready to use.

The injection string is ready to use. Inject directly into your LLM's system message. No field assembly required. See Integration Guides for framework-specific patterns, the Agent Tool Guide for the full injection protocol, or the MCP Server Guide for the same endpoint exposed as MCP tools (harness_reasoning, harness_code, harness_anti_deception, harness_memory). Two install paths: hosted at https://api.ejentum.com/mcp or stdio via npx -y ejentum-mcp; works in Claude Desktop, Cursor, Windsurf, Claude Code, n8n's MCP node, and any MCP-compatible client.

Dimensional Routing

The query is automatically matched against the abilities within your chosen mode. Each product layer has its own cognitive dimensions. The API returns the highest-scoring ability.

DimensionActivates OnPrevents
Causalwhy, cause, failure, root, reason, errorCorrelation-causation confusion, causal reversal
Temporalwhen, timeline, trend, predict, history, driftTemporal hallucination, sequence loss
Spatialwhere, near, position, layout, distance, boundaryPhysical impossibility, topology violation
Simulationwhat if, scenario, model, stress, test, networkSingle-step myopia, feedback loop blindness
Abstractmeaning, concept, principle, analogy, metaphorCategory conflation, ontological errors
Metacognitivethink, reflect, bias, monitor, hallucination, fallacyHallucination spirals, infinite regression

Dimension Examples

Each query is automatically routed to the best-matching ability. The examples below show the reasoning operation activated per dimension.

DimensionExample QueryWhat the Scaffold Does
Causal"Why did our model accuracy degrade after retraining?"Traces root cause. Suppresses symptom-treatment bias.
Temporal"When will this migration complete based on current velocity?"Estimates realistic duration. Suppresses optimism bias.
Spatial"Are there overlapping boundaries in this network topology?"Validates structural constraints. Suppresses boundary violations.
Simulation"What if we remove the rate limiter from the payment service?"Models downstream consequences. Suppresses first-order-only thinking.
Abstract"What is the core principle behind this system's architecture?"Distills core essence. Suppresses surface-level categorization.
Metacognitive"My agent keeps contradicting itself across multi-step plans"Audits reasoning coherence. Suppresses hallucination spirals.

The response for any of these is a pre-rendered injection string in the mode you requested.

Multi Modes

Multi modes (reasoning-multi, code-multi, memory-multi) retrieve a primary ability plus 3 cross-domain synergy abilities. Instead of injecting all 4 fully, multi mode extracts the architectural elements that generalize:

SectionWhat it contains
PRIMARYFull ability: procedure, topology, falsification test
SUPPRESSION GRAPHN-nodes extracted from all 4 topologies. Cross-domain failure guards.
META-CHECKPOINTDynamic self-check derived from the N-nodes. "Verify you did NOT: [list]"
ON_FAILUREEscape pattern: ABANDON_GRAPH -> FREEFORM -> RE-ENTER
Amplify / SuppressMerged signals from all 4 abilities

The primary gives depth on the specific task. The suppression graph gives breadth across failure modes. The meta-checkpoint forces self-evaluation before output.

Writing Better Queries

Query quality directly impacts retrieval precision. The hybrid search engine matches your query both semantically and lexically.

Instead of...Send...Why
"Help me analyze this""Identify why customer churn increased 30% in Q3 after the pricing change"Activates Causal + Temporal signals
"Fix my agent""My agent hallucinates causal chains, it says A causes B without tracing the mechanism"Directly activates Causal suppression
"Think about this problem""Model the downstream consequences of removing the rate limiter from the payment service"Activates Simulation + Causal
"What's going on?""Detect temporal drift in our prediction accuracy over the last 6 months"Activates Temporal with high confidence

Key rule: Send the agent's actual task description, not a meta-description of what you want. The router scores the semantic content, not the intent.

Error Responses

StatusDescription
400 Bad RequestMissing or empty query field
401 UnauthorizedMissing or invalid API key
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorBackend processing failure

Error Body

{
  "error": "string. description of the error"
}

Rate Limits

LimitValue
Requests per minute100 per API key
Monthly calls (Free)100 total
Monthly calls (Ki)5,000
Monthly calls (Haki)10,000

When rate-limited, the API returns 429 with a clear message and upgrade link. See Pricing for plan details.

Platform

The API runs on a global edge network with:

  • API key validation and tier enforcement
  • Per-key rate limiting
  • DDoS protection
  • Request logging and analytics

No internal infrastructure is directly accessible. The only public surface is the /logicv1/ endpoint.

API Versioning

The current endpoint is /logicv1/. The v1 in the path is the API version.

  • Stability guarantee: v1 response schemas will not change without a new version path.
  • Additions: New fields may be added to the response (additive changes only).
  • Deprecation: v1 will remain active for a minimum of 12 months after v2 is released.