CrewAI tool for the Ejentum Reasoning Harness. One agent-callable tool with a mode parameter covering eight modes: four dynamic (reasoning, code, anti-deception, memory) and four adaptive (adaptive-reasoning, adaptive-code, adaptive-anti-deception, adaptive-memory) that pre-fit the operation to the task via an adapter LLM. Each call retrieves a structured cognitive injection: a natural-language procedure plus an executable reasoning topology.
Project description
crewai-ejentum
CrewAI tool for the Ejentum Reasoning Harness. Exposes a single EjentumHarnessTool class with a mode parameter covering eight values: four dynamic (reasoning, code, anti-deception, memory) and four adaptive (adaptive-reasoning, adaptive-code, adaptive-anti-deception, adaptive-memory).
Use the harness before the agent generates on complex, multi-step, or multi-constraint tasks where the model's default reasoning template would miss a constraint, take a shortcut, or drift across turns. Each call returns a cognitive operation: a structured procedure (numbered steps with a failure pattern to refuse and a falsification test) paired with an executable reasoning topology (a DAG of those steps with decision gates, parallel branches, bounded loops, and meta-cognitive exit nodes). The agent reads both layers before producing its response.
Dynamic modes return the top-1 abstract operation from the matching library; adaptive modes additionally run an adapter LLM that rewrites the operation with task-specific identifiers. Adaptive modes require the Go or Super tier.
Install
pip install crewai-ejentum
Configuration
export EJENTUM_API_KEY="ej_..."
EJENTUM_API_KEY is read from the environment at call time. Get a key at ejentum.com/pricing.
Usage
from crewai import Agent, Task, Crew
from crewai_ejentum import EjentumHarnessTool
harness = EjentumHarnessTool()
architect = Agent(
role="Senior architect",
goal="Evaluate technical decisions honestly",
backstory="Pragmatic; pushes back on sunk-cost framings.",
tools=[harness],
)
task = Task(
description=(
"We have spent three months on the GraphQL gateway. It's mostly done. "
"Should we keep going or pivot to REST? "
"Call the Ejentum harness with mode='anti-deception' first."
),
agent=architect,
expected_output="A recommendation that separates past spending from prospective evaluation.",
)
Crew(agents=[architect], tasks=[task]).kickoff()
Modes
| Mode | Library size | Domain |
|---|---|---|
reasoning |
311 | abstraction, time, causality, simulation, spatial, metacognition |
code |
128 | software-engineering layer |
anti-deception |
139 | sycophancy, hallucination, deception, adversarial framing, judgment, executive control |
memory |
101 | perception layer (filter-oriented; not for fact extraction) |
adaptive-reasoning |
311 (same pool) | with adapter LLM rewriting procedure + topology for the specific task |
adaptive-code |
128 | same as above for code |
adaptive-anti-deception |
139 | same as above for anti-deception |
adaptive-memory |
101 | same as above for memory |
Inputs
EjentumHarnessTool._run accepts:
query(string, required): a 1-2 sentence description of the task. Formode="memory"or"adaptive-memory", use the format"I noticed X. This might mean Y. Sharpen: Z.".mode(string, required): one of the eight mode strings above.
Returns the injection as a string. Errors return as human-readable strings; the tool does not raise, so an agent step never crashes the run.
API reference
EjentumHarnessTool(
api_url: str = "https://api.ejentum.com/harness/",
timeout_seconds: float = 10.0,
)
| Field | Default | Description |
|---|---|---|
api_url |
https://api.ejentum.com/harness/ |
Override for self-hosted gateway. |
timeout_seconds |
10.0 |
Per-call HTTP timeout. |
Wire contract
POST https://api.ejentum.com/harness/
Headers: Authorization: Bearer <key>, Content-Type: application/json
Body: { "query": <string>, "mode": <one of 8 mode strings> }
Response (200): [ { "<mode>": "<injection string>" } ]
Response (401|403|429): { "error": "..." }
Full wire contract, field structure of an injection, DAG syntax, and a canonical dynamic-vs-adaptive comparison on the same query are documented in the ejentum-mcp README.
ejentum-mcp alternative
The same eight modes are exposed as MCP tools at https://api.ejentum.com/mcp. If you prefer that route, CrewAI's MCP support can consume the hosted endpoint with Bearer auth.
Compatibility
- Python 3.10+
crewai>=0.40.0requests>=2.31.0
License
Measured effects
The Ejentum harness is benchmarked publicly under CC BY 4.0 at github.com/ejentum/benchmarks:
- ELEPHANT sycophancy: 5.8% composite on GPT-4o (40 real Reddit scenarios)
- LiveCodeBench Hard: 85.7% to 100% on Claude Opus (28 competitive programming tasks)
- Memory retention: 50% fewer stale facts served (20-turn implicit state changes)
- Plus per-harness numbers across BBH/CausalBench/MuSR, ARC-AGI-3, SciCode, and perception tasks
Methodology, scenarios, run scripts, and raw outputs are all in-repo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crewai_ejentum-0.2.0.tar.gz.
File metadata
- Download URL: crewai_ejentum-0.2.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d992155f3dbe625c72bc5fe28faa2bbc83e1af2e83cc2711e108603055db7594
|
|
| MD5 |
9bd891732b0c23e480f71507c3c6b722
|
|
| BLAKE2b-256 |
f575a7575456fb18d59ba7513e7b83242809e76b613789b25fdd5dd2ca3ed7a1
|
File details
Details for the file crewai_ejentum-0.2.0-py3-none-any.whl.
File metadata
- Download URL: crewai_ejentum-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11e9a987ea46f6b2226c04056b2193a48237da6861e6b6bb16935a7d4ed6b99a
|
|
| MD5 |
1eb3c6a89646149515601fb466f3efc6
|
|
| BLAKE2b-256 |
69fb29f0dd3e37c1604415ec19d782568bebec60eb61f6449cbc530daac70a87
|