> ## Documentation Index
> Fetch the complete documentation index at: https://ricardovelit.com/axon-docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install AXON and configure your development environment

## Requirements

AXON requires Python 3.12 or higher.

```bash theme={null}
python --version  # Should be 3.12+
```

## Install from PyPI

The simplest way to install AXON is via pip:

<CodeGroup>
  ```bash Basic Installation theme={null}
  pip install axon-lang
  ```

  ```bash With Tool Backends theme={null}
  pip install axon-lang[tools]
  ```

  ```bash With All Features theme={null}
  pip install axon-lang[all]
  ```
</CodeGroup>

<Note>
  The basic installation includes the compiler and runtime with zero dependencies. Install `[tools]` for real tool backends like WebSearch, or `[all]` for everything including model provider SDKs.
</Note>

## Install from Source

For development or to get the latest changes:

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/Bemarking/axon-ai.git
    cd axon-ai
    ```
  </Step>

  <Step title="Create a virtual environment">
    ```bash theme={null}
    python -m venv .venv
    ```

    Activate it:

    <CodeGroup>
      ```bash Linux/macOS theme={null}
      source .venv/bin/activate
      ```

      ```bash Windows theme={null}
      .venv\Scripts\activate
      ```
    </CodeGroup>
  </Step>

  <Step title="Install in editable mode">
    ```bash theme={null}
    pip install -e ".[tools,dev]"
    ```

    This installs AXON with:

    * Real tool backends (`tools`)
    * Development dependencies (`dev`) - pytest, ruff, etc.
  </Step>
</Steps>

## Verify Installation

Check that AXON is installed correctly:

```bash theme={null}
axon version
```

You should see output like:

```
axon-lang 0.4.0a0
```

## API Keys Configuration

AXON supports multiple LLM backends and tool providers. Configure the ones you need:

### Model Provider Keys

<Tabs>
  <Tab title="Anthropic (Claude)">
    Get your API key from [console.anthropic.com](https://console.anthropic.com/)

    ```bash theme={null}
    export ANTHROPIC_API_KEY="sk-ant-api03-..."
    ```
  </Tab>

  <Tab title="OpenAI (GPT)">
    Get your API key from [platform.openai.com](https://platform.openai.com/)

    ```bash theme={null}
    export OPENAI_API_KEY="sk-proj-..."
    ```
  </Tab>

  <Tab title="Google (Gemini)">
    Get your API key from [aistudio.google.com](https://aistudio.google.com/)

    ```bash theme={null}
    export API_KEY_GEMINI="AIza..."
    ```
  </Tab>

  <Tab title="Ollama (Local)">
    Install Ollama from [ollama.ai](https://ollama.ai/) - no API key needed

    ```bash theme={null}
    # No API key required
    # Runs models locally
    ```
  </Tab>
</Tabs>

### Tool Backend Keys

If you installed `axon-lang[tools]`, configure tool backends:

<CardGroup cols={2}>
  <Card title="Serper (Web Search)" icon="magnifying-glass">
    Get your key at [serper.dev](https://serper.dev/)

    ```bash theme={null}
    export SERPER_API_KEY="your-serper-key"
    ```

    **Free tier:** 2,500 queries one-time
  </Card>
</CardGroup>

### Using .env Files

For convenience, create a `.env` file in your project root:

<Steps>
  <Step title="Copy the example file">
    ```bash theme={null}
    cp .env.example .env
    ```
  </Step>

  <Step title="Edit .env with your keys">
    The example file looks like this:

    ```bash .env theme={null}
    # ── Model Providers ──────────────────────────────
    OPENAI_API_KEY="sk-proj-..."
    API_KEY_GEMINI="AIza..."
    ANTHROPIC_API_KEY="sk-ant-api03-..."

    # ── Tool Backends ────────────────────────────────
    SERPER_API_KEY="your-serper-key"
    ```

    <Warning>
      Never commit `.env` to version control. It's already in `.gitignore`.
    </Warning>
  </Step>
</Steps>

## Available Installation Extras

AXON supports several optional dependency groups:

| Extra       | What it includes            | Install with                       |
| ----------- | --------------------------- | ---------------------------------- |
| `tools`     | httpx for WebSearch backend | `pip install axon-lang[tools]`     |
| `anthropic` | Claude SDK                  | `pip install axon-lang[anthropic]` |
| `openai`    | GPT SDK                     | `pip install axon-lang[openai]`    |
| `gemini`    | Gemini SDK                  | `pip install axon-lang[gemini]`    |
| `ollama`    | Ollama SDK (local models)   | `pip install axon-lang[ollama]`    |
| `all`       | All of the above            | `pip install axon-lang[all]`       |
| `dev`       | pytest, ruff, build tools   | `pip install axon-lang[dev]`       |

<Tip>
  For development, none of the API keys are required — stub tools work without keys and allow you to test the compiler and runtime.
</Tip>

## Tool System Modes

AXON's tool system supports three modes:

```python theme={null}
from axon.runtime.tools import create_default_registry

# Safe for tests — no API calls, no I/O
registry = create_default_registry(mode="stub")

# Real backends where available, stubs elsewhere
registry = create_default_registry(mode="hybrid")

# Only real backends (fails if deps missing)
registry = create_default_registry(mode="real")
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart Guide" icon="rocket" href="/axon-docs/axon-docs/quickstart">
    Build your first AXON program
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/axon-docs/axon-docs/cli/overview">
    Learn all CLI commands
  </Card>
</CardGroup>
