Documentation
Ejentum API Reference
Ejentum provides an inference-time reasoning harness for autonomous LLM agents. Instead of static prompt engineering, your agent queries Ejentum mid-loop to receive the precise cognitive operations and error-suppression rules required for the current task.
Production Base URL
https://api.ejentum.com
Authentication
All API requests must include your API key in an authorization header. Ejentum supports standard Bearer token formatting as well as backward-compatible gateway headers:
# Supported Authentication Headers
Authorization: Bearer YOUR_API_KEY
X-API-Key: YOUR_API_KEY
Endpoint: Evaluate Reasoning Strategy
/webhook/logicv1
(Alias: /logicv1/)
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | The task, user prompt, or agent action being evaluated. |
| mode | string | No | Target reasoning harness: dynamic (default), adaptive, reasoning, anti-deception, code, memory. |
Example Request (cURL)
curl -X POST https://api.ejentum.com/webhook/logicv1 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Review pull request refactoring payment processing state machine",
"mode": "code"
}'
Response Payload
{
"status": "success",
"retrieval_engine": "hybrid_vector_bm25",
"relevance_score": 0.884,
"domain": "Causal",
"ability_id": "CA-023",
"ability_name": "Precisionist",
"single_ability": "### SYSTEM OVERRIDE ACTIVE ###\nOPERATION: [DEFINE_TERMS]\nINSTRUCTION: ...\nCOGNITIVE DIRECTIVES:\nAMPLIFY: Semantic Disambiguation...\nSUPPRESS: Implicit Assumptions...",
"prompt_override": "Step 1: Scan the input for terms lacking explicit definitions...",
"graph_payload": {
"amplification": ["semantic_disambiguation", "quantified_definition_demand"],
"suppression": ["allowing_processing_without_measurable_definitions"],
"cognitive_style": "semantic_precision_enforcement"
}
}
Model Context Protocol (MCP) Integration
Ejentum is natively compatible with Claude Desktop, Cursor, Windsurf, and any client supporting Anthropic's Model Context Protocol. Connect your client directly to our MCP endpoint:
{
"mcpServers": {
"ejentum": {
"url": "https://api.ejentum.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Rate Limits, Status Codes & Reliability SLA
Ejentum is engineered for high-throughput autonomous agent swarms. Server-side lookups execute in <80ms using in-memory vector embeddings and binary SQLite indexes.
| Status Code | Meaning | Production Recommendation |
|---|---|---|
| 200 OK | Successful cognitive scaffold retrieval. | Inject single_ability into model system prompt or agent context. |
| 401 Unauthorized | Missing or invalid API key. | Check EJENTUM_API_KEY environment variable or claim key via Stripe receipt. |
| 429 Too Many Requests | Tier rate limit reached (e.g. >120 req/min on standard tiers). | Implement exponential backoff with jitter or use the Python SDK's built-in fail_open=True fallback. |
| 500 / 502 / 503 | Temporary upstream or gateway unavailability. | Fail-Open: In mission-critical production loops, set a 2–3s client timeout; if unreachable, log an alert and let the agent proceed un-augmented. |
from ejentum import Ejentum
client = Ejentum(timeout=3.0, fail_open=True) # Never blocks agent if network partitions