Skip to content

Cordenex v2 Architecture

This document describes the internal design and data flow of the Cordenex Autonomous Engineering system.

Component Overview

Cordenex is built in Go for maximum speed and zero-dependency binaries.

  • CLI Layer: Handles user input and displays the rich terminal UI.
  • Orchestrator: Decides if a task is simple (Chat) or complex (Agent).
  • Engine: The core execution loop that coordinates between LLMs and Tools.
  • Tools: Specialized functions for filesystem, shell, and codebase search.
  • Providers: Unified abstraction for Anthropic, OpenAI, etc.

The Agentic Loop

Cordenex follows a strict Plan-Act-Verify loop:

  1. Thinking: The AI generates a reasoning plan.
  2. Tool Call: The AI requests tool execution (e.g., write_file).
  3. Approval: The PermissionManager checks if user confirmation is required.
  4. Parallel Execution: Tools are executed concurrently to minimize latency.
  5. Self-Healing: If a tool fails, the Engine provides corrective feedback to the AI.

Tool System

Tools are designed to be safe and robust:

  • Secure Pathing: Prevents path traversal on all operating systems.
  • Undo State: Every file modification is reversible.
  • Search API: Built-in regex and glob support for deep codebase analysis.