A previous release had provenance metadata, but this release does not. View details.
autogen-ejentum
AutoGen tools for the Ejentum Reasoning Harness. ejentum_tools() returns eight async tool closures bound to a shared config that AutoGen's AssistantAgent calls before generating.
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.
Four dynamic closures (reasoning, code, anti_deception, memory) are available on all tiers including the 30-day free trial. Four adaptive closures (adaptive_reasoning, adaptive_code, adaptive_anti_deception, adaptive_memory) additionally run an adapter LLM that rewrites the matched operation with task-specific identifiers; they require the Go or Super tier.
AutoGen reads func.__name__ as the LLM-facing tool name. Python identifiers cannot contain hyphens, so the closure symbols here use underscores; the on-wire API mode strings stay hyphenated (anti-deception, adaptive-anti-deception). The translation lives inside each closure.
Install
pip install autogen-ejentum
If AutoGen is not already installed:
pip install autogen-agentchat autogen-ext[openai] autogen-ejentum
Configuration
export EJENTUM_API_KEY="ej_..."
Or pass api_key= to ejentum_tools(...). Get a key at ejentum.com/pricing.
Usage
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ejentum import ejentum_tools
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-4o")
agent = AssistantAgent(
name="reviewer",
model_client=model_client,
tools=ejentum_tools(),
system_message=(
"Senior engineer. When a prompt pressures you to validate a decision "
"before evidence, call anti_deception (or adaptive_anti_deception for "
"high-stakes cases) with a 1-2 sentence framing of the integrity "
"dynamic, then write."
),
)
await Console(agent.run_stream(
task=(
"We have spent three months on the GraphQL gateway. It's mostly "
"done. Should we keep going or pivot to REST?"
),
))
asyncio.run(main())
AutoGen inspects each closure's __name__ and Google-style docstring to generate the JSON schema the LLM sees.
Wrap as FunctionTool (optional)
from autogen_core.tools import FunctionTool
from autogen_ejentum import ejentum_tools
tools = [FunctionTool(fn, description=fn.__doc__) for fn in ejentum_tools()]
Explicit API key
tools = ejentum_tools(api_key="ej_...")
Tool inventory
Dynamic (all tiers)
| Closure | Mode string (on wire) | Library size |
|---|---|---|
reasoning |
reasoning |
311 |
code |
code |
128 |
anti_deception |
anti-deception |
139 |
memory |
memory |
101 |
Adaptive (Go or Super tier)
| Closure | Mode string (on wire) |
|---|---|
adaptive_reasoning |
adaptive-reasoning |
adaptive_code |
adaptive-code |
adaptive_anti_deception |
adaptive-anti-deception |
adaptive_memory |
adaptive-memory |
Each closure takes a single query: str argument and returns the injection as a string. Errors return as strings; closures do not raise.
API reference
from autogen_ejentum import ejentum_tools
ejentum_tools(
api_key: str | None = None,
api_url: str = "https://api.ejentum.com/harness/",
timeout_seconds: float = 10.0,
) -> list[Callable[[str], Awaitable[str]]]
The eight returned callables are async functions with __name__ set to reasoning, code, anti_deception, memory, adaptive_reasoning, adaptive_code, adaptive_anti_deception, adaptive_memory.
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 tools are hosted as an MCP server at https://api.ejentum.com/mcp. AutoGen has MCP server support that consumes the endpoint with Bearer auth.
Compatibility
- Python 3.10+
autogen-core>=0.4.0httpx>=0.27.0
Works with AutoGen v0.4+ (the Microsoft + Berkeley async refactor). The legacy pyautogen (v0.2.x) uses register_for_llm / register_for_execution decorators rather than AssistantAgent(tools=[...]); this package does not target the legacy SDK.
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.
Metadata
Release files for autogen-ejentum 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autogen_ejentum-0.2.0.tar.gz | 11.4 kB | Without provenance | Details for autogen_ejentum-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autogen_ejentum-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for autogen_ejentum-0.2.0-py3-none-any.whl |
Total release size: 21.6 kB
Release files / autogen_ejentum-0.2.0.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | autogen_ejentum-0.2.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fbf34291c65a61753fc66f661d8514fd272806d6946de4132f47c85637e1066
|
|
BLAKE2b-256 checksum How to use checksums |
f7040973c819eb758b62aeaab7491cc17cc20f9d14dedf38dca5c3c2b52b6eaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / autogen_ejentum-0.2.0-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | autogen_ejentum-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14f32d5e8a9d4a9f6d0af370cd5130f27152dae5eba44e9582e47059ce73331f
|
|
BLAKE2b-256 checksum How to use checksums |
ee5ddccb62cc4d61e5f2c351fb2f88c8457fc0c473292f91327253076020787b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for autogen-ejentum 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.0 2 files With provenance
- Added 0.2.0 2 files Without provenance
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.