Skip to main content

AXON

The first programming language for AI with cognitive primitives, semantic types, and declarative reasoning. Compile to any model.

What is AXON?

AXON is a compiled language that targets LLMs instead of CPUs. It has a formal EBNF grammar, a lexer, parser, AST, intermediate representation, multiple compiler backends (Anthropic, OpenAI, Gemini, Ollama), and a runtime with semantic type checking, retry engines, and execution tracing. It is not a Python library, a LangChain wrapper, or a YAML DSL.
contract_analyzer.axon

Key Features

12 Cognitive Primitives

persona, flow, reason, anchor, validate, refine, memory, tool, probe, weave, context, intent

Epistemic Type System

Types represent meaning and cognitive state with partial order lattice

Multi-Model Compilation

Compile to Anthropic, OpenAI, Gemini, or Ollama backends

Runtime Self-Healing

Automatic retry with failure context for semantic validation

Quick Start

1

Install AXON

Install from PyPI with pip
2

Write your first program

Create a .axon file with your cognitive flow
hello.axon
3

Compile and run

Execute with the AXON CLI

Architecture Overview

AXON follows a traditional compiler pipeline with semantic validation:

Explore the Documentation

Core Concepts

Learn about cognitive primitives and the type system

Language Reference

Complete syntax reference for AXON

CLI Reference

Command-line tools for compiling and running AXON

Architecture

Understand the compiler and runtime internals

Examples

Real-world examples and use cases

API Reference

Python API for programmatic usage

Why AXON?

Traditional programming languages were designed for deterministic machines. AI operates on probability, context, intention, and semantics. AXON provides primitives that match how AI thinks:
  • Declarative over imperative — describe what, not how
  • Semantic over syntactic — types carry meaning, not layout
  • Composable cognition — blocks compose like neurons
  • Configurable determinism — spectrum from exploration to precision
  • Failure as first-class citizen — retry, refine, fallback are native