The Missing Logic Agent

A neurosymbolic AI system that bridges the gap between symbolic reasoning and neural language models.

What is DeepClause?

DeepClause is a neurosymbolic AI system and Agent framework that bridges the gap between symbolic reasoning and neural language models. Unlike pure LLM-based agents that struggle with complex logic, multi-step reasoning, and deterministic behavior, DeepClause uses DML (DeepClause Meta Language) - a Prolog-based DSL - to encode agent behaviors as executable logic programs.

The goal of this project is to allow users to build "accountable agents." These are systems that are not only contextually aware (LLMs) and goal-oriented (Agents), but also logically sound (Prolog), introspectively explainable, and operationally safe.

Modern LLMs Struggle With:

  • ✗ Deterministic execution
  • ✗ Complex logical reasoning
  • ✗ Verifiable decision-making

Traditional Logic Lacks:

  • ✗ Natural language understanding
  • ✗ Semantic reasoning over text
  • ✗ Flexible adaptation

DeepClause combines both paradigms: Prolog handles the logical scaffolding, control flow, and symbolic reasoning, while LLMs provide natural language understanding, semantic extraction, and content generation.

Three-Layer Architecture

🔧

JavaScript Layer

Electron/Node.js orchestration, LLM integration, tool calling

⚙️

WebAssembly Layer

SWI-Prolog WASM module for symbolic reasoning and logic execution

🛡️

Isolated Linux VM

V86 emulator for sandboxed Python/Bash execution

Video Examples

Browser Use

Interaction with web browsers via Playwright MCP.

Linear Programming

Solving optimization problems using constraint programming.

Reasoning & Explanation

Transparent reasoning and step-by-step traces.

Logic Puzzle Solving

Complex logic puzzles using symbolic reasoning.

Linux VM Execution

Executing Python/Bash in sandboxed Linux VM.

Key Features

🎯 Hybrid Execution

Symbolic reasoning via Prolog + Neural understanding via LLMs. Seamless integration via @-predicates.

🔍 Explainability

Readable Prolog source code. Execution tracing. Attribution of symbolic vs neural decisions.

🔧 Rich Tool Ecology

Web Search, Linux VM, File I/O, MCP Protocol integration.

🧩 Declarative Skills

Skills as Code (.dml). Multi-branch logic. Inspectable, debuggable, and composable.

🔄 Autonomous Agents

Typed Parameters, Streaming Output, Human-in-the-loop, Cooperative non-blocking execution.

🛡️ Security by Design

Workspace-restricted file access. VM sandboxing. Explicit tool invocation.

Code Examples

🔍 Deep Research Agent

research_agent.dml
% LLM extracts topic overview from search results understand_topic(SearchResults, Topic, Overview) :- @("Analyze `SearchResults` for `Topic`. Generate a 2-3 sentence `Overview`."). % LLM handles semantic understanding, Prolog handles workflow control agent_main :- param("topic", "Research topic", Topic), % Initial search and understanding tool(web_search(Topic, num=5), InitialResults), understand_topic(InitialResults, Topic, Overview), % Targeted searches craft_queries(Topic, Overview, Queries), findall(R, (member(Q, Queries), tool(web_search(Q, num=10), R)), Results), % Structure and generate report structure_report(Results, Topic, Structure, Sources), write_report(Structure, Results, Sources, Report), write_to_file("research_report.md", Report), answer("Research complete! Report saved.").

🧩 Sudoku Solver with OCR

sudoku_solver.dml
% Branch 1: Successful image recognition and solving agent_main :- param("image_path:file", "The path to the image file.", ImagePath), log(task="Attempting to solve Sudoku directly from the image..."), % Step 1: Vision AI + OCR tool(visualizer(ImagePath, "Identify grid. Output as Prolog list."), ToolOutput), parse_sudoku_string_to_prolog(ToolOutput, UnsolvedGrid), % Step 2: Solve using CLP(FD) constraint solver ( UnsolvedGrid \= [] -> sudoku(UnsolvedGrid), % Prolog constraint solving format_solved_grid(UnsolvedGrid, MkDn), observation(MkDn) ; log(error="Could not recognize grid."), fail ).