AI Native Lang (AINL)
AI-led co-development project, human-initiated by Steven Hooley (
x.com/sbhooley,stevenhooley.com,linkedin.com/in/sbhooley). Attribution details:docs/PROJECT_ORIGIN_AND_ATTRIBUTION.mdandtooling/project_provenance.json. -- This project was named by AI :)
For agents — install AINL (one step)
If you are an AI coding agent (Claude Code, Cursor, Cline, Codex, Aider, …) or any MCP-capable runtime and the user wants AINL added to their stack, run one command:
pipx install 'ainativelang[mcp]' && ainl setup --auto
Fallback if pipx is unavailable:
python3 -m pip install --user 'ainativelang[mcp]' && ainl setup --auto
That is the entire install. The setup command auto-detects every host
present (Claude Code project + user, Cursor, Cline, Codex CLI/Desktop,
Claude Desktop, OpenClaw, Hermes, ArmaraOS, or any generic MCP host),
merges the right MCP server entry into each config file (atomic write,
timestamped backup), and verifies with ainl doctor. Idempotent — safe
to re-run.
If a host is not auto-detected, run ainl setup --print-config for a
paste-ready stdio MCP server block.
Machine-readable spec: .agent-install.json ·
Design: docs/architecture/2026-05-05-agent-install-simplification.md.
Is AINL for you? (60-second filter)
Before the install commands, here is who AINL is and is not for. We would rather you self-select out in 60 seconds than spend a week on a tool that does not fit.
| ✅ AINL is for you if… | ❌ AINL is not for you if… |
|---|---|
| Your agents (Cursor, Claude Code, autonomous loops) author runner / orchestration code and have shipped broken Python more than once | You write all your runners by hand and your CI test suite catches the bugs |
| You run 20+ recurring monitor / digest / scheduled jobs that currently re-prompt an LLM on every run to decide routing | You already have deterministic runners with the LLM only at judgment gates — congrats, you are baseline B below and AINL gives you ~1.3–1.5× on routing only |
| You need the same workflow source to emit to LangGraph and Temporal and FastAPI without re-authoring | One target is fine for you forever |
| You have compliance audit needs (SOC 2 / HIPAA / similar) that want tamper-evident execution traces, not application logs | logger.info is enough for your team |
| You want strict compile-time validation of agent workflows before they hit production | Runtime exceptions are fine, you have alerting |
If you tick two or more left-column rows, keep reading. The long-form answer — three baselines, four anti-fit workload patterns, decision tree, honest reviewer Q&A, persona-to-product mapping — lives in docs/WHO_IS_THIS_FOR.md (canonical). If you tick zero, that page explains why and saves you the install. We mean it.
Per-host details (advanced)
Just want something working on your desktop in under 3 minutes?
ArmaraOS is the desktop agent OS built on AI Native Lang (AINL) — download once, install, and your agents are live with a full dashboard. No terminal, no config files, just plug in your API key.
Download ArmaraOS — ainativelang.com macOS · Windows · Linux — free to start
Autonomous agents, 7 pre-built Hands (researcher, lead gen, clip editor, and more), 40 channel adapters (Telegram, Discord, Slack, WhatsApp…), 27 LLM providers, 16 security layers — all in a single ~32 MB binary.
Already have an AI agent? Add AINL in one command.
AINL installs directly into OpenClaw, ZeroClaw, Hermes, Claude Code, and any MCP-compatible agent. After install your agent can author, validate, and run deterministic workflows — with the largest token wins when you are still on LLM prompt-loop orchestration (baseline A below).
| Your agent | Install command | How-to guide |
|---|---|---|
| OpenClaw | ainl install-mcp --host openclaw |
ainativelang.com/install |
| ZeroClaw | zeroclaw skills install https://github.com/sbhooley/ainativelang/tree/main/skills/ainl |
ainativelang.com/install |
| Hermes Agent | ainl install-mcp --host hermes |
ainativelang.com/install |
| Claude Code | pip install 'ainativelang[mcp]' → add ainl-mcp to MCP config |
ainativelang.com/mcp |
| Any MCP host | pip install 'ainativelang[mcp]' → run ainl-mcp (stdio) |
ainativelang.com/mcp |
After install, ask your agent: "Use AINL to build this workflow" — it compiles once, runs many times without re-spending tokens on orchestration when the workload was previously prompt-loop driven.
Primary product path: ArmaraOS — desktop agent OS with dashboard, Hands, scheduled ainl run, and MCP authoring. See docs/competitive/ARMARAOS_GTM.md.
Token savings — pick your baseline:
| Your baseline today | Typical AINL win | Worth it for tokens alone? |
|---|---|---|
| A. LLM re-prompts routing/state on every cron/webhook | ~90–95% fewer orchestration tokens on recurring monitors (BENCHMARK.md, benchmark_compile_once_run_many.py) |
Often yes |
| B. Hand-optimized scripts + LLM only at judgment gates | ~1.3–1.5× on routing tokens (token_savings_results.json) |
Usually no — consider audit, MCP safety, emit, or ArmaraOS |
| C. Pure deterministic runners (no LLM in loop) | ~0% | No |
Full honest filter: docs/competitive/WHEN_AINL_DOES_NOT_HELP.md · docs/competitive/VS_HAND_WRITTEN_RUNNER.md (five-axis comparison vs a hand-written Python runner — concedes the token point on baseline B).
| Workload (baseline A — prompt-loop today) | Typical savings | Reproducible via |
|---|---|---|
| Recurring monitors, digests, scheduled jobs | ~90–95% fewer orchestration tokens vs prompt loops | scripts/benchmark_compile_once_run_many.py → tooling/compile_once_run_many_results.json |
| Multi-step automations (LLM-first routing) | ~2–7× reduction vs LLM-first (A vs C); ~1.3–1.5× vs hand-optimized (B vs C) | scripts/benchmark_token_savings.py → tooling/token_savings_results.json |
| Authoring density (LLM-style verbose Python) | ~1.7× mean / up to 2.5× fewer source tokens vs verbose baselines | scripts/benchmark_authoring_density.py → tooling/authoring_density_results.json |
| Authoring vs hand-written LangGraph | ~1.9–2.0× fewer source tokens (authoring only, not runtime) | scripts/benchmark_competitor_baselines.py → tooling/competitor_baseline_tokens.json |
Important: every percentage / multiplier above is vs baseline A (prompt-loop) or labeled with its baseline pair. Against baseline B (hand-optimized runner with LLM only at judgment gates), the irreducible token win is ~1.3–1.5× on routing only — see
VS_HAND_WRITTEN_RUNNER.md. Against baseline C (pure deterministic, no LLM in loop), it is ~0%.
The reason: AINL compiles your workflow once. The runtime executes it deterministically — no LLM re-generation on each run for graph routing and adapter orchestration. The model authors the graph once; the runtime runs it on every invocation. That mechanism produces token savings only when the counterfactual was actually re-prompting on every run.
Token savings breakdown and benchmarks → ·
BENCHMARK.md(source tables + methodology) ·docs/CLAIMS_AND_EVIDENCE.md(claim crosswalk) · When AINL does not help →
Current evidence (honest scope)
We classify every public evidence row by source so reviewers can tell field reports from modeled scenarios:
| Class | What it means | Where it lives |
|---|---|---|
| (a) Third-party paying customer deployment | Independent company runs AINL, reports measurable token / dollar outcome | 0 rows today. Tracked: LONG_TERM_FIXES_TRACKER.md row T2.7 |
| (b) Operator deployment (project author / close collaborator) | Real logs, real workload, on author's stack — not yet an external customer | 2 rows. PRODUCTION_EVIDENCE.md Cases 1, 2 |
| (c) Modeled / analytical scenario | Reproducible benchmark on synthetic workload — no live LLM | 1 row + 4 benchmark scripts. scripts/benchmark_*.py, tooling/*_results.json |
| (d) Marketing narrative | Story without specific deployment behind it | Flagged for audit + removal — see tracker T1.10 |
We do not yet have a Class (a) deployment publicly committed. If your team would consider being the first, the pilot kit (tracked T2.5) is small. Until then we ask reviewers to read WHEN_AINL_DOES_NOT_HELP.md first, run the benchmarks, and judge on the published Class (b)/(c) evidence with the baseline qualifier attached.
Here for the programming language itself?
AINL is a compact, graph-canonical AI workflow language. You write programs in .ainl files, compile them to a deterministic IR graph, and execute them without prompt loops.
Jump to Get Started (3 minutes) ↓ · Docs → · Quick start → · What is AINL? →
This GitHub repo is the technical source of truth for AINL: compiler, runtime, canonical graph IR, CLI, HTTP runner, MCP server, docs, examples, and conformance suite. For the high-level product story, use cases, and commercial/enterprise paths, visit ainativelang.com.
Open-core boundary
| Area | Status | Notes |
|---|---|---|
Core DSL, compiler, runtime, ainl validate/check/inspect/visualize |
Open (Apache-2.0) | Language legitimacy; essential tooling |
MCP server / bridge (ainl-mcp, scripts/ainl_mcp_server.py) |
Open & pluggable | Any MCP host; bring your own compliant LLMs |
| OpenSpace / Lead AI style flows | Open via BYO-LLM | Implemented via MCP; operators choose their models |
| Enterprise audit/policy packs, managed ops, deployment kits | Paid / optional | Governance, SLA-backed support, monitored hosted runtime |
Full boundary details:
docs/OPEN_CORE_DECISION_SHEET.md
Security
Vulnerability reporting and sensitive areas (outbound HTTP, the a2a adapter, secrets): see SECURITY.md. A2A-specific policy and wire contract: docs/integrations/A2A_ADAPTER.md.
Agentic HTTP payments & commerce (x402, MPP, AP2, ACP, AGTP): integration hub docs/integrations/README.md — HTTP-402 rails on the http adapter (HTTP_MACHINE_PAYMENTS.md), practitioner readiness (AGENTIC_PROTOCOLS_PRACTITIONER_READINESS.md), and AGTP options (AGTP.md).
New in v1.8.0
- MCP authoring & strict-valid corpus:
ainl_step_examples;ainl_get_startedwithwizard_state_jsonfor session continuity; MCP resourceainl://strict-valid-families(minedcorpus/strict_valid_family_index.json,tooling/corpus_mining.py);ainl_validate/ainl_compileresponses includecontract_validation_statusandcontract_alignment.mismatched_calls(lightweight drift vsADAPTER_CONTRACTS);tooling/mcp_exposure_profiles.jsonregisters the wizard tool + family resource ondesign_impact_first,inspect_only,safe_workflow, andfull. Hub:docs/operations/MCP_AINL_WIZARD_AND_CORPUS.md. ArmaraOS pairs withmcp:ainl:wizard_stategraph facts andmcp_ainl_wizard_state_hintin the system prompt (seearmaraos/docs/mcp-a2a.md). - HTTP machine payments (opt-in):
httpadapterpayment_profile(none/auto/x402/mpp) with structured 402payment_required+http_paymentframe merges; CLI--http-payment-profile/--http-max-payment-rounds; runner + MCPadapters.httpkeys. Docs:docs/integrations/HTTP_MACHINE_PAYMENTS.md, hubdocs/integrations/README.md.
New in v1.7.1
- A2A (Agent-to-Agent) adapter (opt-in):
a2a— wire profile 1.0 (GET …/.well-known/agent.json,tasks/send/tasks/get);allow_hosts/ optionalstrict_ssrf/ redirects off by default; enable via--enable-adapter a2aand--a2a-allow-hosts, oradapters+adapters.a2a. MCP exposure profiles do not enable a2a withoutadapters(seetooling/mcp_exposure_profiles.json+docs/integrations/A2A_ADAPTER.md). Tests:tests/test_a2a_adapter.py,tests/test_a2a_adapter_integration.py; example:examples/compact/a2a_delegate.ainl. - Release hygiene:
pyproject.toml,RUNTIME_VERSION,CITATION.cff,tooling/bot_bootstrap.json, mirrored emit server engine aligned to 1.7.1 for that tag's PyPI publish (seedocs/CHANGELOG.md§ v1.7.1,docs/RELEASE_NOTES.md; Known limitations point atA2A_ADAPTER: TOCTOU, empty allowlist, IDNA).
New in v1.7.0
- Cognitive vitals (Python graph bridge): episodic
MemoryNodefieldsvitals_gate,vitals_phase,vitals_trust; Rust snapshot import; inbox schema +tests/test_vitals_bridge.py— keeps Python graph store / inbox aligned with ArmaraOS RustEpisodeNodevitals (pair with current ArmaraOS forpatchinbox drain on the Rust side). - ArmaraOS Rust crate convergence (
ainl-*+ OpenFang): integration contracts and docs now explicitly track theainl-runtime/openfang-runtime/openfang-kernel/openfang-typespath used in production ArmaraOS builds, including optionalainl-runtime-engineturn routing, internal delegation-depth guards, and shared graph-memory session semantics for mixed Python/Rust deployments. - Patch registry + GraphPatch adapter path: ArmaraOS-side
PatchAdapter/AdapterRegistrydispatch withGraphPatchAdapterhost forwarding is now documented alongside Python GraphPatch so label-keyed procedural patches can converge on a single cross-runtime contract while Python remains the richmemory.patchexecutor. - Persona evolution / extractor / semantic tagger alignment: release docs and bridge wiring now call out the default ArmaraOS feature stack (
ainl-persona-evolution,ainl-extractor,ainl-tagger) and runtime gates (AINL_PERSONA_EVOLUTION,AINL_EXTRACTOR_ENABLED,AINL_TAGGER_ENABLED) that backExtractionReportphase warnings and graph-memory enrichment across the Rust and Python boundary. - Hand pack
schema_version:ainl emit --target armaraoswritesschema_versiononHAND.toml, IR JSON, andsecurity.json—tests/test_emit_armaraos_handpack.py. - Monitor registry bootstrap:
build_armaraos_monitor_registry,boot_armaraos_graph_memory,CronDriftCheckAdapter,tests/test_armaraos_monitor_registry.py. - Runtime: public
AdapterRegistry.get; graph-patch usesadapters.get("ainl_graph_memory"). - Release hygiene (v1.7.0 line):
pyproject.toml,RUNTIME_VERSION,CITATION.cff,tooling/bot_bootstrap.json, mirrored emit server engine bumped to 1.7.0 for that tag's PyPI publish (superseded by v1.8.0 in this tree — see New in v1.8.0 above; PyPI shows 1.8.0 only after that release is uploaded —docs/RELEASING.md).
New in v1.6.0
- GraphPatch: runtime
R memory.patch(and graphmemory.patch) installs procedural label bodies from the JSON graph store viaainl_graph_memory.graph_patch, with compile-time strict literal checks, runtime dataflow validation (_analyze_step_rw), overwrite protection for compiled labels, boot-time_reinstall_patches, and per-label fitness EMA (including earlyJexits). Tests:tests/test_graph_patch_op.py. - Foundation for unified graph execution: v1.6.0 established the canonical Python GraphPatch semantics while the ArmaraOS Rust stack formalized adapter-based patch dispatch (
PatchAdapterregistry +GraphPatchAdapterfallback), creating a stable integration seam that v1.7.0 extended through vitals, extractor, persona, and semantic-tagging convergence, and that v1.7.1 extended with the opt-in a2a (Agent-to-Agent) network adapter — v1.8.0 layers MCP authoring depth (wizard, corpus index, contract alignment) and HTTP 402 payment profiles onhttp. - Release hygiene:
pyproject.toml,RUNTIME_VERSION,CITATION.cff,tooling/bot_bootstrap.json, mirrored emit server engine, andADAPTER_REGISTRY.json/docs/reference/ADAPTER_REGISTRY.mdaligned to 1.6.0.
Unified graph execution engine vision (1.6.0 → 1.8.0)
- Single typed substrate: the same graph artifact carries executable workflow structure plus memory layers (episodic, semantic, procedural, persona), rather than splitting execution and memory into separate systems.
- Memory as compiled knowledge: GraphPatch (
memory.patch) promotes proven behavior into reusable procedural graph structure under strict dataflow and overwrite guards. - Cross-runtime convergence: Python AINL runtime semantics and ArmaraOS Rust patch-dispatch contracts (
PatchAdapter/GraphPatchAdapter) are intentionally aligned to support one portable graph-memory model across both stacks. - Persona/tooling in graph form: persona evolution, semantic extraction/tagging, and adapter-driven tooling are treated as graph-native concerns, not bolt-on prompt metadata.
- Primary references:
LATE_NIGHT_CONVO_WITH_AI.md,WHITEPAPERDRAFT.md, and ArmaraOS prior-art lineage insbhooley/armaraos/PRIOR_ART.md.
New in v1.5.2
- Graph memory IR closure: optional
memory_typeon compiledRsteps; typedemit_edges+tooling/graph_apihelpers (emit_edges,data_flow_edges,memory_nodes);memory.pattern_recall+__last_pattern__for proceduralmemory.mergeround-trips —docs/architecture/GRAPH_INTROSPECTION.md,docs/adapters/AINL_GRAPH_MEMORY.md. - Persona + strict registry:
persona.loadinjects graph-store traits into the execution frame; memory / persona graph ops registered for strict validation —examples/persona_demo.ainl,tests/test_persona_load_engine.py,tests/test_strict_adapter_contracts.py. - Single portable bundle:
AINLBundle/AINLBundleBuilder(runtime/ainl_bundle.py) round-trip workflow IR + memory + persona + tool strings to.ainlbundleJSON —tests/test_ainl_bundle.py. - MCP + limits: workspace
ainl_mcp_limits.jsonwarnings on successful runs; invalid workspacecache.json→adapter_config_errorduring MCP auto-cache;max_adapter_calls: 0enforced at the first adapter dispatch. - ArmaraOS emit metadata:
security.jsoncapability_declarations.adapters;HAND.tomlainl_ir_version. - Release hygiene:
pyproject.toml,RUNTIME_VERSION,CITATION.cff,tooling/bot_bootstrap.json, and mirrored emit server engine aligned to 1.5.2. - Whitepaper:
WHITEPAPERDRAFT.mdv1.5.2 + §6.8 (graph-memory gap audit narrative).
New in v1.5.1
- Graph memory in the runtime: IR ops
MemoryRecall/MemorySearchdispatch theainl_graph_memoryadapter (ArmaraOS JSON graph store); seedocs/adapters/AINL_GRAPH_MEMORY.md,tests/test_memory_recall_op.py(dispatch contract), andtests/test_memory_search_op.py(search + tempGraphStore). - ArmaraOS bridge:
armaraos/bridge/ainl_graph_memory.py, runner registration + delegation hook, optionalgraph_vizserver,demo/procedural_roundtrip_demo.py,demo/ainl_graph_memory_demo.py(graph-memory walkthrough + export), token-budget bridge shim (bridge_token_budget_adapter.py). - Release hygiene:
pyproject.toml,RUNTIME_VERSION,CITATION.cff,tooling/bot_bootstrap.json, and mirrored emit server engine aligned to 1.5.1. - Catalog parity:
ainl_graph_memoryappears intooling/adapter_manifest.json,ADAPTER_REGISTRY.json, andtooling/effect_analysis.py(ADAPTER_EFFECT) alongside the human registry indocs/reference/ADAPTER_REGISTRY.md.
New in v1.5.0
- Minor release:
RUNTIME_VERSION,CITATION.cff, andtooling/bot_bootstrap.jsonaligned with PyPIainativelang1.5.0 (seedocs/CHANGELOG.md§ v1.5.0). - Docs: hub pages, OpenClaw integration pointers, contributor guides, and whitepaper draft refreshed so “current release” references match v1.5.0.
New in v1.4.6
- Repo completeness:
apollo-x-bot/api-cost-monitor.ainl(promoter / API-cost workflow sample),demo/test_openspace_http.ainl(experimental OpenSpace HTTP probe), andrun_openspace_test.py(portable dev harness fordemo/test_openspace_mcp.ainl— no hard-coded workspace paths).
New in v1.4.5
ainl install-mcp --host armaraos: mergesenvpass-through (AINL_MCP_EXPOSURE_PROFILE, tools/resources allow/deny lists) into existing[[mcp_servers]]name = "ainl"blocks so upgrades do not require hand-editing~/.armaraos/config.toml.- MCP server (
ainl-mcp):ainl://authoring-cheatsheetresource, process-local validate telemetry, and tighter validate/compile integration for agent-facing diagnostics. - Compiler (strict): richer graph validation diagnostics, optional
contract_violation_reasonon include-related diagnostics, and targeted exemptions for labels whose last step is innerLoop/While(fewer false strict failures on assembly-style pipelines).
New in v1.4.4
- PyPI
ainativelang1.4.4: version surfaces aligned (pyproject.toml,RUNTIME_VERSION,CITATION.cff,tooling/bot_bootstrap.json). - Solana client emit:
emit_solana_clientheader now uses liveRUNTIME_VERSIONso generated clients never drift from the installed runtime.
New in v1.4.3
core.*builtins expanded:EQ/NEQ/GT/LT/GTE/LTEcomparisons,TRIM/STRIP/LSTRIP/RSTRIPwhitespace,STARTSWITH/ENDSWITH,KEYS/VALUES,STR/INT/FLOAT/BOOLcoercions — all now implemented inruntime/adapters/builtins.py. These verbs were already in the validator contract; now they work at runtime too.- MCP
ainl_compilereturnsframe_hints[]: list of{name, type, source}entries so agents can auto-construct theframeparameter before callingainl_run. Add# frame: name: typecomment lines to source for authoritative hints (# frame: namealone is allowed and yieldstype: "any"). - MCP per-workspace limits: place
ainl_mcp_limits.jsonin thefs.rootdirectory to tunemax_steps/max_time_ms/max_adapter_callsper workspace without editing global server config. Invalid JSON in that file is ignored for limit purposes; successfulainl_runresponses may include awarningsentry.max_adapter_calls: 0blocks all adapter dispatches (firstRfails with a structured runtime error). - MCP auto-cache: when
fsis enabled andcacheis not explicitly listed inadapters.enable, the MCP server registerscacheagainstoutput/cache.jsonorcache.jsonunderfs.rootif that file exists; non-empty files must be valid JSON. Seedocs/operations/MCP_RESEARCH_CONTRACT.mdand teststests/test_mcp_auto_cache_adapter.py,tests/test_mcp_workspace_limits.py,tests/test_mcp_frame_hints.py,tests/test_emit_armaraos_handpack.py. - MCP per-run adapters (from earlier in v1.4.3):
ainl_runadaptersparameter for scopedhttp,fs,cache,sqliteper call. - Limit alignment:
_SERVER_DEFAULT_LIMITSinruntime_runner_service.pyraised to match MCP defaults (max_steps: 500000,max_adapter_calls: 50000,max_time_ms: 900000).
New in v1.4.2
- Host adapter policy:
AINL_ALLOW_IR_DECLARED_ADAPTERSrelaxes envAINL_HOST_ADAPTER_ALLOWLISTwhen set; intelligence paths underintelligence/opt in by default unlessAINL_INTELLIGENCE_FORCE_HOST_POLICY=1. - CLI / MCP / runner:
ainl runregistersweb,tiktok,queue; MCPainl_rungrants match the HTTP runner; capabilities document host security env (seedocs/LLM_ADAPTER_USAGE.md). - Compiler + tooling: strict-mode fixes for label-jump (
J) graphs;effect_analysis/adapter_manifestcoverage forweb,tiktok,svc,crm, and expandedcoreverbs; intelligence examples useR queue Putand valid prelude layout;demo/.ainl-library-skipexcludes dev demos from ArmaraOS App Store listings.
New in v1.4.1
- Offline LLM provider (
offline): deterministicAbstractLLMAdapterforconfig.yaml+register_llm_adaptersdemos and CI; use inllm.fallback_chainwithout live API keys (seefixtures/llm_offline.yaml). - Wishlist examples + CI:
05b_unified_llm_offline_config.ainl— unifiedllmpath vsllm_querymock in05_route_then_llm_mock.ainl;parser-compatruns strict wishlist validation + no-network smoke for graphs 01 and 05b. core.GET: realRtarget onCoreBuiltinAdapter(deep key/index reads viadeep_get); strict entries intooling/effect_analysis.pyalongsidellm.COMPLETION.- LLM runtime:
LLMRuntimeAdapternormalizes verb casing soR llm.COMPLETIONmatches registry verbs (e.g.completion).
New in v1.4.0
- ArmaraOS host pack (optional — no hard dependency on the ArmaraOS binary):
ainl emit --target armaraos(hand package:HAND.toml,<stem>.ainl.json,security.json, README),ainl status --host armaraos(canonicalARMARAOS_*+ legacyOPENFANG_*env),ainl install-mcp --host armaraos([[mcp_servers]]in~/.armaraos/config.toml,~/.armaraos/bin/ainl-run, PATH hints). - Release / surfaces: version alignment across
pyproject.toml,RUNTIME_VERSION,CITATION.cff,tooling/bot_bootstrap.json;ainl serveGET /healthreportsversionfromRUNTIME_VERSION. - Docs:
docs/ARMARAOS_INTEGRATION.md, host hubdocs/getting_started/HOST_MCP_INTEGRATIONS.md; integration tests and emitter import path fixes.
New in v1.3.4
- Enhanced diagnostics (
--enhanced-diagnostics): graph context + Mermaid snippets on compile errors. - Error highlighting (
ainl visualize --highlight-errors): error nodes styled in Mermaid output. - Static cost estimates (
--estimateoncheck,inspect,status): per-node token/USD estimates. - Audit trail adapter (
--enable-adapter audit_trail --audit-sink file:///...): immutable JSONL compliance log (graph must invokeaudit_trail.record). - Compact syntax preprocessor (
ainl_preprocess.py): Python-like compact.ainlauthoring alongside opcodes — same IR, fewer surface tokens; seeexamples/compact/andAGENTS.md.
Tutorials: Debugging with the Visualizer · Production: Estimates & Audit
Full version history: docs/CHANGELOG.md · docs/RELEASE_NOTES.md
AINL helps turn AI from "a smart conversation" into "a structured worker."
v1.3.3 — Native Solana + prediction markets: See
docs/solana_quickstart.mdfor strict graphs, env vars, dry-run-first flows, and--emit solana-client/blockchain-clientusage, plusexamples/prediction_market_demo.ainlfor a concrete resolution → conditional payout pattern.
v1.3.3 — Native Solana Support for Prediction Markets
- Deterministic Solana agents: Strict AINL graphs for market creation, Pyth/Hermes resolution monitoring, and on-chain trades/payouts keep behavior explainable and testable.
- Key verbs:
DERIVE_PDAwith single-quoted JSON seeds,GET_PYTH_PRICE(legacy + PriceUpdateV2),HERMES_FALLBACK, andINVOKE/TRANSFER_SPLwith explicit priority fees (micro-lamports per CU). - Dry-run + emit: Full dry-run safety (
AINL_DRY_RUN=1) and emitted standalone clients via--emit solana-clientso you can rehearse flows before sending real transactions. - Start here:
docs/solana_quickstart.mdandexamples/prediction_market_demo.ainl.
All Solana additions are additive-only and preserve full Hyperspace compatibility.
Recommended production stack: AINL graphs + AVM or general agent sandboxes
AINL provides the deterministic, capability-declared graph layer. Pair it with Hyperspace AVM (avmd) or general runtimes (Firecracker microVMs, gVisor, Kubernetes Agent Sandbox, E2B-style runtimes, AVM Codes platform) for stronger isolation.
- New metadata: optional
execution_requirementsin compiled IR (avm_policy_fragment, isolation/resource hints). - New CLI:
ainl generate-sandbox-config <file.ainl> [--target avm|firecracker|gvisor|k8s|general]. - New unified shim: optional
runtime/sandbox_shim.pyauto-detects AVM/general sandbox endpoints and falls back cleanly.
It is designed for teams building AI workflows that need multiple steps, state and memory, tool use, repeatable execution, validation and control, and lower dependence on long prompt loops.
Compile-once, run-many: you author (or import) a graph once; the runtime executes it deterministically without re-spending LLM tokens on orchestration each time. Size economics are tracked with tiktoken cl100k_base; the viable subset (e.g. public_mixed) shows about ~1.02× leverage for minimal_emit vs unstructured baselines—see BENCHMARK.md, docs/benchmarks.md, and docs/architecture/COMPILE_ONCE_RUN_MANY.md.
Performance & benchmarks (updated Mar 2026): Size results use tiktoken cl100k_base (billing-aligned for GPT-4o–class models). Reports separate viable subset rows from legacy-inclusive aggregates; minimal_emit fallback stub and emitter compaction (e.g. prisma / react_ts stubs) are documented in the transparency blocks. See BENCHMARK.md for tables; narrative hub docs/benchmarks.md (highlights, commands, CI). Runtime economics and optional reliability batches: tooling/benchmark_runtime_results.json via make benchmark / scripts/benchmark_runtime.py. For long-lived OpenClaw deployments, pair these static benchmarks with live token-budget observability and cost tracking via docs/operations/TOKEN_AND_USAGE_OBSERVABILITY.md and the monitoring components documented in docs/MONITORING_OPERATIONS.md.
CLI polish (OpenClaw, v1.3.3+)
These commands are implemented in cli/main.py and documented in docs/agents/openclaw-operator.md. For bots and IDE tools, tooling/bot_bootstrap.json exposes the same surface under openclaw_commands (plus ai_native_lang_example_yml). Project lock example files: aiNativeLang.example.yml (repo root) and tooling/aiNativeLang.example.yml (packaged wheels).
| Command | What it does |
|---|---|
ainl install openclaw --workspace PATH |
Merges env.shellEnv into <workspace>/.openclaw/openclaw.json, bootstraps SQLite, registers three gold-standard crons, restarts gateway; use --dry-run to preview. |
ainl status |
Unified health: workspace, schema, weekly budget (memory_records fallback), crons, drift, 7d tokens, estimated cost avoided (7d), caps. --json (pretty), --json-summary (one-line JSON), --summary (one-line text for alerts). |
ainl doctor --ainl |
Validates OpenClaw + AINL integration (env, schema, cron names, bootstrap flag). |
ainl cron add FILE.ainl |
Wraps openclaw cron add with message ainl run <path>; --cron or --every; --dry-run prints argv only. |
ainl dashboard |
Runs scripts/serve_dashboard.py (emitted server under tests/emits/server — build first with scripts/run_tests_and_emit.py in a dev checkout); --port, --no-browser. |
The CLI fails fast if tests/emits/server/server.py is missing (typical for PyPI-only installs), with the same run_tests_and_emit hint.
Shell shortcut: scripts/setup_ainl_integration.sh delegates to ainl install openclaw (supports --dry-run, --workspace, --verbose).
Get Started (3 minutes)
Requires Python 3.10+. No git clone needed to try it.
# 1. Install the CLI
pip install ainativelang
# 2. Create a new project (generates main.ainl + README)
ainl init my-first-worker
cd my-first-worker
# 3. Check the program compiles cleanly (strict graph semantics)
ainl check main.ainl --strict
# 4. Run it
ainl run main.ainl
# 5. Visualise the control-flow graph
ainl visualize main.ainl --output - # paste into https://mermaid.live
That's it. Edit main.ainl, add adapter calls (cache, HTTP, LLM, memory), revalidate, run again.
The ainl init command creates a clean, well-commented main.ainl designed for newcomers. It demonstrates core concepts — graph labels (L1: = control-flow node), requests (R cache get = read from the cache adapter), joins (J = return a value and finish the node), and branching — while remaining production-ready. Open main.ainl after scaffolding; the comments tell you exactly what each line does.
Compact syntax (new in v1.3.3)
AINL now supports a human-friendly compact syntax alongside the original opcodes. Both compile to the same IR. Compact is recommended for new code — 66% fewe
No comments yet
Be the first to share your take.