Frequently Asked Questions
Common questions from developers looking to cut agent context costs.
How is NocturnusAI different from RAG / vector search?
RAG retrieves text that looks related based on embedding similarity — and sends all of it to the LLM, burning tokens on irrelevant context. NocturnusAI derives what must be true using logical inference and delivers only goal-relevant facts — cutting token costs by 97%. They're complementary: use RAG for unstructured retrieval, NocturnusAI for verified reasoning with optimized context. The difference isn't just accuracy — it's your token bill.
Do I need to learn Prolog or logic programming?
No. The simplified API (/tell, /ask, /teach, /forget) and natural language extraction handle most use cases. You feed NocturnusAI plain text and ask questions in natural language — the logic runs under the hood. Power users can use the DSL for advanced rules, but it's entirely optional.
What happens if my agent asserts contradictory facts?
Configurable conflict resolution handles this. The default is REJECT (error on contradiction), but you can also use NEWEST_WINS, CONFIDENCE (highest confidence score wins), or KEEP_BOTH. The Truth Maintenance System automatically retracts derived facts when their premises are removed.
Learn about truth maintenance →
Can I run this in production?
Yes. NocturnusAI is built for production agent workloads: in-memory store with sub-100ms retrieval, ACID transactions, Write-Ahead Log for crash recovery, periodic snapshots, multi-tenant isolation, Prometheus metrics, and health check endpoints. It runs as a single Docker container or native binary.
How much does NocturnusAI save on LLM costs?
In a typical setup, agents stuff 150K+ tokens of context into every LLM request at $15/M tokens (GPT-4o, Claude Sonnet). That's $2.25 per request. NocturnusAI's Context Management Engine uses goal-driven backward chaining to deliver only relevant facts — typically 820 tokens for the same query. That's $0.01 per request, a 97% reduction. At 1,000 requests/hour, that's the difference between $54,000/month and $240/month.
Learn about context optimization →
What is the Context Management Engine?
It's a goal-driven optimization pipeline that sits between your knowledge base and your LLM. You tell it what your agent needs to know (via goals), and it uses backward chaining, salience ranking, contradiction detection, and deduplication to produce a minimal, consistent context window. The pipeline runs in under 50ms and supports incremental diffs for multi-turn conversations.
Should I use SDK context APIs or MCP context tools?
Use MCP when you want plug-and-play tool access from an MCP-compatible agent. Use SDK/HTTP context APIs when you need goal-driven windows, sessionId-based diffs, and explicit orchestration. A common production setup is MCP for tool calling plus /context/optimize + /context/diff from your orchestrator.
See SDK details → · See MCP details →
Is it open source? What's the license?
NocturnusAI uses the Business Source License 1.1. It's free for non-production use, evaluation, and development. Contact Auctalis for production licensing.
Can I use this with OpenAI / Anthropic / local models?
Yes — NocturnusAI is model-agnostic. Use it with any LLM via the framework integrations (LangChain, CrewAI, AutoGen, etc.), MCP protocol, or direct HTTP API. Optional LLM integration for natural language extraction supports OpenAI, Anthropic, Google, and Ollama. The Context Management Engine works with any provider — it optimizes the context before it reaches the LLM, so you save tokens regardless of which model you use.
How do I get started?
One command to install, five minutes to your first query:
curl -fsSL https://raw.githubusercontent.com/Auctalis/nocturnusai/main/install.sh | bash