Self-contained edge intelligence for bridge VMs and air-gapped infrastructure.
Monitors ports, services, logs, and telemetry. Reasons locally. Ships as a single package.
axon is an edge intelligence agent built for bridge VMs — those locked-down, single-purpose machines that move data between security domains. It watches system health, collects telemetry, and answers questions without ever phoning home.
Drop it onto a VM. It monitors CPU, memory, disk, load, and services. It stores everything in SQLite. It answers questions using a local LLM (no cloud, no API keys). And when the internet is available, it can escalate to a larger model.
axiom: "a statement or proposition which is regarded as being established, accepted, or self-evidently true" — axon observes, verifies, and reports what's true about your infrastructure.
| No cloud dependency. No telemetry. No phone-home. Runs entirely on local CPU. | ||
| 🧠 Local reasoning | Qwen3 1.7B Q4_K_M via Ollama — 0.960 agent score, perfect tool-call restraint, ~15 tok/s on 2-core VMs. | |
| 🔧 Agentic tool loop | Multi-turn, multi-tool. Calls read tools, interprets results, calls follow-ups. Built on the Pi agent framework in TypeScript. | |
| 📊 SQLite-native | Metrics and events in a single file. Sensors write. Agent reads. Schema is versioned and indexed. | |
| 🪶 ~1.5 GB on disk | Model + agent + sensors + DB. Drops onto a locked VM without bloat. | |
| 🛡️ Gated mutations | Read-only by default. Mutating actions (restart service, write config) require explicit approval through a tool_call hook. |
|
| 🔌 Extensible probes | One Python file per service archetype — system, ActiveMQ, Signal ingest, IBA, telemetry egress. Add yours. | |
| 📡 Escalation path | When the internet is present, one-line swap in router.ts escalates to DeepSeek V4 Flash for high-confidence answers. |
|
| 🔄 Multi-app serving | Ollama exposes localhost:11434 — any local app or agent can inference the model concurrently. |
┌─────────────────────────────────────────────────────────────┐
│ bridge VM │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐ │
│ │ sensors/ │ │ agent/ │ │ ollama │ │
│ │ │ │ │ │ │ │
│ │ collect.py │────▶│ brain.ts │────▶│ qwen3:1.7b │ │
│ │ probes/ │write│ tools/ │REST │ (Q4_K_M) │ │
│ │ · system │ │ · metrics │◀────│ │ │
│ │ · activemq │ │ · snapshot │ JSON│ localhost │ │
│ │ · iba │ │ router.ts │ │ :11434 │ │
│ │ · signal │ │ │ └─────────────┘ │
│ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────────────────────────────┐ │
│ │ axon.db │ │
│ │ ┌──────────┐ ┌──────────────────┐ │ │
│ │ │ metrics │ │ events │ │ │
│ │ │ (ts,host,│ │ (ts,host,level, │ │ │
│ │ │ metric, │ │ source,message) │ │ │
│ │ │ value) │ │ │ │ │
│ │ └──────────┘ └──────────────────┘ │ │
│ └──────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ DeepSeek V4 Flash (optional, when │ │
│ │ internet present — one-line swap) │ │
│ └──────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Sensors write. Agent reads. The only write path from the agent is through gated mutating tools — proposals only, no auto-execution.
- Linux (amd64) with ≥ 4 GB free RAM (tested on AMD EPYC, 2-core shared VM)
- Ollama ≥ 0.3.0
- Python ≥ 3.11 + uv
- Node.js ≥ 20 + npm
git clone https://github.com/SohaibAli9/axon.git
cd axon
# Pull the model (~1.4 GB)
ollama pull qwen3:1.7b
# Install sensors
cd sensors && uv sync && cd ..
# Install agent
cd agent && npm install && cd ..# One-shot collection (writes to axon.db)
cd sensors && uv run collect.py --once
# Or poll continuously (default: every 60s)
uv run collect.pycd agent && npm run devaxon agent — model: qwen3:1.7b ollama: http://localhost:11434
✓ Local model is present and reachable.
Ask a question about this machine, or type "exit" to quit.
> what's the CPU and memory situation?
CPU is at 34%, RAM at 42% — both within normal range. Load average is 0.5.
The machine is healthy.
> has anything anomalous happened in the last hour?
No errors in the last hour. CPU spiked to 92% at 14:00 but recovered
to 24% by 14:30. Swap increased from 15% to 28% — investigate memory
pressure during that window.
| Env variable | Default | Description |
|---|---|---|
AXON_MODEL |
qwen3:1.7b |
Ollama model name |
OLLAMA_HOST |
http://localhost:11434 |
Ollama server URL |
AXON_DB |
../axon.db |
Path to SQLite database |
ESCALATION_MODEL |
deepseek-chat |
Escalation model (when internet present) |
ESCALATION_API_KEY |
(empty) | API key for escalation endpoint |
| Env variable | Default | Description |
|---|---|---|
AXON_DB |
../axon.db |
Path to SQLite database |
POLL_INTERVAL |
60 |
Seconds between sensor collections |
[Service]
Environment="OLLAMA_KV_CACHE_TYPE=q4_0" # 75% KV cache reduction
Environment="OLLAMA_NUM_PARALLEL=1" # prevent context multiplication
Environment="OLLAMA_MAX_LOADED_MODELS=2" # at most 2 models hot in RAMaxon is designed around the constraint that 7.7 GB RAM is the whole budget and the model must share with other processes.
| Default | Why | |
|---|---|---|
| Qwen3 1.7B Q4_K_M | ✓ in use | #1 agent score (0.960) in Local Agent Bench Round 3 (Feb 2026). Perfect tool-call restraint. 2.0B params, ~1.4 GB on disk, ~5.4 GB total at load. Consistently ~14.5 tok/s on 2-core EPYC CPU. |
| LFM 2.5 1.2B | speed alternative | 0.920 agent score at 1,567 ms — nearly 7× faster than Qwen3. Agent score only 0.04 behind. |
| Llama 3.2 3B | fallback | ~2 GB, 128K context, broadest ecosystem. Proven on single-board computers. |
| DeepSeek V4 Flash | escalation | When internet is present and local model flags low confidence. One-line swap. |
Benchmarks from MikeVeerman/tool-calling-benchmark Round 3 and juanluisbaptiste/ai-benchmarks.
Create one file in sensors/probes/. Follow the contract: export a collect() -> list[dict] function that returns rows matching the metrics or events table schema.
# sensors/probes/activemq.py
import socket, time, urllib.request
def collect() -> list[dict]:
host = socket.gethostname()
ts = int(time.time() * 1000)
try:
status = urllib.request.urlopen("http://localhost:8161/api").status
return [{
"ts": ts, "host": host,
"metric": "activemq_status",
"value": 1.0 if status == 200 else 0.0,
"unit": "bool"
}]
except Exception:
return []Wire it in collect.py:
from probes import system, activemq
# ...
for probe in [system, activemq]:
write_metrics(con, probe.collect())Future probes planned: IBA-PDA (industrial data connector), Signal ingest (journald/syslog watcher), telemetry egress (metrics forwarding).
Create one file in agent/src/tools/. Export a definition (Ollama Tool schema) and a call(args) handler.
// agent/src/tools/getServiceStatus.ts
import Database from "better-sqlite3";
export const definition = {
type: "function" as const,
function: {
name: "get_service_status",
description: "Check if a service is running by name (e.g., activemq, nginx)",
parameters: {
type: "object",
properties: {
service: { type: "string", description: "service name" },
},
required: ["service"],
},
},
};
export function call(args: unknown): string {
// query axon.db events table, or probe live
return JSON.stringify({ running: true });
}Register it in brain.ts:
import * as getServiceStatus from "./tools/getServiceStatus.js";
const TOOLS: Tool[] = [
getRecentMetrics.definition,
getLatestSnapshot.definition,
getServiceStatus.definition, // ← add here
];The events table (ts, host, level, source, message) is the integration point. Pipe anything into it:
INSERT INTO events (ts, host, level, source, message)
VALUES (unixepoch('now')*1000, 'bridge-01', 'warn', 'activemq',
'queue dlq.backlog depth 5000 exceeds threshold 1000');Run the agent. It'll see the event in the next get_recent_metrics call and reason about it.
axon/
├── schema.sql Canonical schema — migrations are numbered files, never ALTER TABLE
├── axon.db SQLite — metrics (timeseries) + events (log/state changes)
├── sensors/ Python collectors
│ ├── collect.py Orchestrator — runs probes, writes rows
│ ├── config.py env-driven config (DB path, poll interval)
│ ├── logger.py Structured logger (console + file)
│ ├── pyproject.toml uv-managed deps (psutil, python-dotenv)
│ └── probes/ One file per service archetype
│ └── system.py CPU, RAM, disk, swap, load average
├── agent/ TypeScript Pi agent
│ ├── src/
│ │ ├── brain.ts Agentic tool loop — wires Ollama model + tools (max 8 turns)
│ │ ├── router.ts Local-first model router, optional DeepSeek escalation
│ │ ├── system-prompt.ts Loads prompt from prompts/system.txt
│ │ ├── index.ts REPL entry point
│ │ └── tools/ Read-only tools over SQLite (never write from here)
│ │ ├── getRecentMetrics.ts Time-series query with metric filter
│ │ └── getLatestSnapshot.ts One-row-per-metric health snapshot
│ ├── prompts/
│ │ └── system.txt Agent system prompt
│ ├── package.json deps: ollama, better-sqlite3, typebox, ajv
│ └── tsconfig.json
├── CLAUDE.md Claude Code project conventions
└── README.md You are here
Measured on a 2-core AMD EPYC-Rome VM, 7.7 GiB RAM, no GPU, Qwen3 1.7B Q4_K_M.
| Test | Result |
|---|---|
| Inference speed (short prompt) | 14.5 tok/s |
| Inference speed (reasoning prompt) | 14.7 tok/s |
| Inference speed (tool-call JSON) | 14.3 tok/s |
| Tool-call accuracy (4 tests) | 4/4 (100%) |
| Required parameter inference | ✓ Correct (path: "/" from context) |
| Multi-tool parallel invocation | ✓ Called 2 tools in single turn |
| Multi-turn reasoning | ✓ CPU+memory→ synthesis→ diagnosis |
| RAM at load (model + KV + graph) | 5.4 GiB |
| Model time-to-first-load | 6.5 seconds |
- No cloud dependency. Everything works fully air-gapped. The escalation path is opt-in, not required.
- Sensors write, agent reads. Clean separation. The agent has no write path to the database — only read tools. Mutations go through a gated
tool_callhook. - Low overhead. The sensor poll interval defaults to 60 seconds. No tight loops. No inference pegging shared-CPU VMs.
- Never
ollama runin production. Always the REST API athttp://localhost:11434. - Schema is canonical.
schema.sqlis the source of truth. Migrations are numbered files. No ALTER TABLE in code. - Tools are validated. Every tool has a TypeBox schema. AJV validation runs on every call. Malformed tool args are rejected before they touch the database.
| Milestone | Status |
|---|---|
| System probe → SQLite → read tool → real answer | ✅ v0.1 |
| ActiveMQ probe (queue depth, broker health) | 🔜 v0.2 |
| IBA-PDA connector (industrial data historian) | 🔜 v0.3 |
| Signal ingest probe (journald/syslog watcher) | 🔜 v0.3 |
| Events table integration + anomalous event detection | 🔜 v0.4 |
| Gated mutating tools (service restart, config write) | 📋 planned |
| Grammar-constrained decoding (GBNF) for tool calls | 📋 planned |
| Multi-node fleet dashboard | 📋 planned |
axon is an open-source project. Contributions welcome — especially new probes, tools, and data connectors.
- Fork the repo
- Create a feature branch (
git checkout -b feat/my-probe) - Add your probe or tool following the existing patterns
- Submit a PR
MIT © 2026 Sohaib Ali
Built with ❤️ for bridge VMs everywhere. No cloud required.