SuperAPI AI Directory

nocturnusai

Deterministic reasoning engine for agent context compression: extracts structured facts with logical inference, proof chains and truth maintenance.

Open website

About this tool

NocturnusAI is a context engineering engine for AI agents, positioned as "send only what changed." It does not use vector search or summarization; instead, it performs deterministic reasoning on a logic engine, using a Hexastore index, backward chaining, and truth maintenance.

Purpose Used to compress agent context, extract and store facts, define rules, and ask questions, thereby obtaining deterministic answers with proofs rather than LLM guesses. The official claim is that it was measured on real APIs: over a 15-turn product support conversation, with real usage.input_tokens counts, Claude Opus 4 achieved a 5.7x token reduction and Gemini 2.0 Flash achieved a 10.0x reduction, and the benchmark tests and methodology were published and can be reproduced for your own workload.

Main capabilities

  • Reproducible token reduction: the repository includes benchmark tests, the methodology is public, and it can be run on your own workload.
  • Deterministic reasoning: the same query gets the same result every time, with no embedding drift and no cosine similarity randomness.
  • Truth maintenance: after retracting a fact, all derived conclusions are automatically retracted, avoiding stale context and runtime state hallucinations.
  • Integrates with existing tech stacks: LangChain, LlamaIndex, CrewAI, AutoGen, MCP, Vercel AI SDK, OpenAI Agents SDK, Mastra.
  • Backend mechanisms: deterministic fact and rule storage; backward chaining with proof chains; truth maintenance and contradiction handling; temporal facts supporting ttl, validFrom, validUntil; multi-tenancy via X-Database and X-Tenant-ID; MCP, REST, Python SDK, TypeScript SDK, and CLI interfaces provided on the same engine.

How to use Each round follows a three-step work loop:

  1. Extract: raw conversation turns are extracted by an LLM into structured facts.
  2. Infer: backward-chaining logical reasoning finds only the facts reachable from the agent's current goal.
  3. Return the delta: return briefingDelta, containing only what has changed since the previous round.

Interface call examples:

  • First compression: POST /context
  • Goal-driven processing: POST /memory/context
  • SubsequentRound: POST /context/diff, returns entries added and removed between snapshots.
  • End session: POST /context/session/clear

Each round can use the context tool to obtain a working set sorted by salience; when goal-driven assembly and diffing are needed, the MCP and HTTP context endpoints can be used together.

Natural language rounds require an LLM. If the server is started without an LLM provider configured, natural language rounds will return zero facts. Predicate syntax can also be used (for example, "customer_tier(acme_corp, enterprise)"), which works without any LLM.

Installation and running

  • Docker (fastest)
  • Docker with Ollama (enables natural language extraction)
  • Docker Compose (advanced)
  • Build from source: requires JDK 17+, see CONTRIBUTING.md; issues marked good first issue are a good starting point. Full documentation is at nocturnus.ai. Please report security vulnerabilities privately via GitHub Security Advisories, see SECURITY.md.

Use cases Suitable for development scenarios that need to compress context for agents, maintain traceable facts and rules, require reproducible inference results with proof chains, and need truth maintenance and contradiction handling; also suitable for teams that want to integrate such capabilities into existing frameworks such as LangChain, LlamaIndex, CrewAI, AutoGen, MCP, Vercel AI SDK, OpenAI Agents SDK, Mastra, etc.

Limitations and legal safety notes

  • No guarantee of truth: "Verified" refers to the logical consistency of the inference, not the accuracy of real-world claims.
  • Not suitable for autonomous high-risk decisions: must not be used for unsupervised medical, financial, legal, or personal safety decisions without independent human verification.
  • Logic layer only: NocturnusAI provides information and reasoning, it does not execute actions.
  • No liability assumed: see DISCLAIMER.md and LICENSE for details.
  • License: Business Source License 1.1 (SPDX: BUSL-1.1). Use within your own organization (including internal production) is free; if NocturnusAI or its substantial functionality is provided to third parties as a product/hosted service, a commercial license is required (licensing@nocturnus.ai). Converts to Apache 2.0 on 2030-02-19.

Other information The repository is Auctalis/nocturnusai, officially described as "Verified knowledge for AI agents. Compress context, extract and store facts, define rules, and ask questions — get deterministic answers with proof, not LLM guesses. Connect agents via MCP, Python SDK, TypeSc".