Skip to content

AIXP-Labs/AIAP

AIAP — AI Application Protocol

中文版 README

License Protocol Axiom 0

AI Application Protocol — An open protocol defining how AI programs are structured, validated, and governed.

Protocol:    AIAP V1.0.0
Full Name:   AI Application Protocol
Authority:   aiap.dev
Seed:        aisop.dev
Executor:    soulbot.dev
Axiom 0:     Human Sovereignty and Wellbeing

What is AIAP?

AIAP defines the governance layer for AI programs. While A2A addresses how agents communicate and MCP defines how models access tools, AIAP addresses a different challenge: how AI programs themselves should be governed — structured, validated, and secured before runtime.

Core philosophy: Rules are compiled, not hinted. AIAP validators reject ambiguous programs before runtime — the same way compilers reject invalid syntax.

Key Features

  • Semantic Compiling — Validators act as compilers, rejecting ambiguous instructions, unhandled error routes, and semantic contradictions before runtime
  • Zero-Entropy Resonance — Rigid structural patterns collapse the possibility space, minimizing tokens available for free-form LLM interpretation
  • L0/L1 Isolation — Strict separation of machine-readable state (L0) from human-readable narrative (L1) prevents cross-contamination in multi-agent cascades
  • Dual Blueprints.aisop.json (Mermaid flow) and .aisip.json (JSON flow) — equivalent formats, same governance
  • 7 Structural Patterns — Pattern A (script) through Pattern G (embedded runtime with Code Trust Gate)
  • 109 Quality Rules — 7 series: Correctness (C×7), Intrinsic (I×15), Detail (D×10), Multi-File (MF×37), Pipeline (PL×28), Threat (AT×7), Regression Guard (QRG×5)
  • Trust Levels T1–T4 — Graduated autonomy; sys.io.confirm remains forced-blocking even at T4 (Axiom 0 invariant)
  • sys.* Governance — AIAP-level rules over AISOP system calls — see Appendix G
  • Governance Hash — SHA-256 integrity verification of all program files; tamper-proof
  • MCP / A2A Interop — Bidirectional MCP tool mapping + A2A agent card integration via Pattern G
  • Axiom 0 Enforcement — Hard alignment to "Human Sovereignty and Wellbeing" — not a suggestion but an immutable constraint (MF32 + AT7)

Protocol Stack

┌─────────────────────────────────────┐
│    Application Layer                │
├─────────────────────────────────────┤
│    AILP — Discovery Layer           │  Service directories, certificates
├─────────────────────────────────────┤
│    AIVP — Value Layer               │  Contracts, settlement, commerce
├─────────────────────────────────────┤
│    AIBP — Social Layer              │  Trust, relationships
├─────────────────────────────────────┤
│  ★ AIAP — Governance Layer          │  ← This protocol
├─────────────────────────────────────┤
│    AISOP — Execution Layer          │  Flow programs (.aisop.json)
├─────────────────────────────────────┤
│    SoulBot — Runtime                │  Reference executor
└─────────────────────────────────────┘

AIAP governs program structure and rules; sibling protocols govern orthogonal concerns. Each independently upholds Axiom 0.

Quick Start

1. Create an AIAP program directory

my_program_aiap/
├── AIAP.md              # Governance contract
└── main.aisop.json      # Entry module (Mermaid or JSON flow)

2. Declare the governance contract

---
protocol: "AIAP V1.0.0"
authority: aiap.dev
axiom_0: Human_Sovereignty_and_Wellbeing
name: my_program
version: "1.0.0"
pattern: A
trust_level:
  level: 2
  justification: "Read-only tools only"
license: Apache-2.0
---

3. Validate against the quality standards

# via SoulBot reference runtime
soulbot validate ./my_program_aiap/
# → Grade: A  (Correctness 4.5 / Intrinsic 4.8 / Detail 4.2)

The pipeline runs the 109 rules defined in specification/standards/. Any implementer-equivalent runtime is acceptable — SoulBot is the reference implementation.

Examples

Seven working examples covering every structural pattern:

# Example Pattern Demonstrates
1 pattern-a-calculator/ A Minimal single-script program
2 pattern-b-expense-tracker/ B Multi-module package
3 pattern-c-invoice-processor/ C Shared logic module (reused by 2+ siblings)
4 pattern-d-extension-demo/ D Nested sub-programs
5 pattern-e-research-assistant/ E Three-layer memory (working / episodic / semantic)
6 pattern-f-content-pipeline/ F Ecosystem orchestration (3+ peer AIAPs)
7 pattern-dg-creator/ D+G Embedded runtime with Code Trust Gate

See examples/README.md for the pattern-selection decision tree.

Documentation

Document Description
AIAP_Protocol.md Full protocol specification
Quality Standards 109 validation rules (5 JSON files)
aiap.proto Proto3 schemas for governance services
Topics Conceptual guides (axiom-0, security-model, zero-entropy-resonance, …)
Guides Step-by-step tutorials (first program, pattern selection, quality walkthrough)
Reference Field-level reference (AIAP.md, AISOP fields, rule codes, glossary)
ADRs Architecture Decision Records
CHANGELOG Release history

AIXP Labs aixp.dev

AIXP Labs develops and maintains the following core projects:

Project Description Website
HSAW Human Sovereignty and Wellbeing — Axiom 0 white paper (foundation) hsaw.dev
AILP AI List Protocol — agent discovery and capability advertising ailp.dev
AIVP AI Value Protocol — international commerce, crypto asset settlement aivp.dev
AIRP AI RMB Protocol — Mainland China commerce, RMB licensed settlement airp.dev
AIBP AI Bot Protocol — social communication and trust aibp.dev
AIAP AI Application Protocol — governance and compliance (this project) aiap.dev
AISOP AI Standard Operating Protocol — flow program definition aisop.dev
SoulBot AI agent runtime and framework soulbot.dev
SoulACP Adapter library — bridging CLI tools and LLM providers soulacp.dev

Contributing

AIAP is an open protocol. Contributions, feedback, and discussion are welcome.

⚠️ Disclaimer

This protocol specification and the reference implementations are provided for research and educational purposes only. They are experimental and not intended for production use. Use at your own risk. The authors assume no liability for any damages arising from use of this software. See LICENSE for full terms (Apache 2.0).

License

Apache License 2.0 - Copyright 2026 AIXP Labs AIXP.dev | AIAP.dev

The AIXP ecosystem uses unified Apache 2.0 licensing across all layers (aisop.dev, aiap.dev, soulbot.dev) for patent protection and ecosystem consistency. See GOVERNANCE.md.


Align Axiom 0: Human Sovereignty and Wellbeing. Version: AIAP V1.0.0. www.aiap.dev

About

AIAP — AI Application Protocol

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors