sbhooley/ainativelang

AINL helps turn AI from "a smart conversation" into "a structured worker." 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. AINL is a compact, graph-canonical, AI-native programming system for (READ: README)

734 ★31 forksPythonUpdated 1mo ago

What you need to know

AI Native Lang (AINL) is a compact, graph-first AI workflow language and toolchain (Apache-2.0 open-core) that compiles .ainl programs to a canonical deterministic IR graph executed without prompt loops; it ships an MCP v1 server (ainl-mcp) so coding agents can author, validate, and run workflows.

Install

pipx install 'ainativelang[mcp]' && ainl setup --auto  (one-command agent install, auto-detects hosts)
pip install ainativelang  (CLI only)
pip install -e ".[mcp]" && ainl-mcp  (MCP server, stdio)
ainl install-mcp --host openclaw|hermes|zeroclaw|armaraos  (per-host install)

Usage

  • Create a project: ainl init my-first-worker, then ainl check main.ainl --strict, ainl run main.ainl, ainl visualize main.ainl --output - (Mermaid).
  • Author in compact syntax (recommended, 66% fewer tokens) or opcode syntax; both compile to the same IR.
  • Emit to other platforms: ainl emit your.ainl --target langgraph -o graph.py, or serve as HTTP API with ainl serve --port 8080.
  • From an MCP host, call ainl_validate, ainl_compile, ainl_capabilities, ainl_security_report, and ainl_run over the ainl-mcp stdio server.

Key features

  • Graph-first deterministic execution: compile-once, run-many; no LLM re-generation for graph routing and adapter orchestration on each run (claimed ~90-95% fewer orchestration tokens vs prompt loops on recurring monitors).
  • Strict-mode guarantees: canonical graph emission, no undeclared references, adapter arity validation, controlled exits, with structured diagnostics and llm_repair_hint.
  • Adapter-based effect system: 29 core + 16 extended adapters (http, sqlite, postgres, mysql, redis, dynamodb, airtable, supabase, fs, tools, a2a, code_context, etc.) with privilege tiers and security profiles.
  • Multi-target emission: FastAPI, React/TypeScript, Prisma, OpenAPI, Docker/Compose, Kubernetes, cron/queue/scraper, LangGraph and Temporal hybrid wrappers.
  • MCP v1 server with safe defaults (core-only adapters, conservative limits), exposure profiles, capability grants, per-run adapters, and workspace limits.

Best for

Teams running 20+ recurring monitor/digest/scheduled workflows driven by LLM prompt loops who want deterministic, auditable, compile-once-run-many orchestration with strict validation.

Caveats

  • Token savings only apply vs prompt-loop baselines (~90-95% if re-prompting every run, ~1.3-1.5x vs hand-optimized runners, ~0% vs pure deterministic runners).
  • Open-core: enterprise audit/policy packs, managed ops, and hosted runtime are paid/optional; core DSL, compiler, runtime, and MCP server are open (Apache-2.0).
  • No third-party (Class a) paying customer deployment publicly committed yet; evidence is operator deployments and modeled benchmarks.
  • AINL is the workflow layer, not a sandbox/security layer - containment and network policy are the hosting environment's responsibility.
  • Requires Python 3.10+; some CLI features (ainl dashboard) fail fast if the emitted demo server is missing on PyPI-only installs.
Platforms: macOS · Linux · WindowsClients: Claude Code · Cursor · Cline · Codex · OpenClaw · Hermes · ZeroClaw · ArmaraOS · Gemini CLI
Documentation ↗

Reviewed 2026-08-07

Topics

agent-orchestrationai-agentsai-native-languageainlclaude-codecompilerdeterministic-executiondomain-specific-languagedslgraph-irlangchain-alternativellm-orchestrationmcpmodel-context-protocolmulti-agentopenaiopenclawprompt-engineeringpythonworkflow-engine
View on GitHub ↗
Stars
734★
Forks
31
Language
Python
License
Apache-2.0
Created
2026-03-10
Last push
2026-06-25