A.I.L. (AI Intelligence Layer) is a modular platform for managing, validating, and executing AI-driven workflows with strict architectural boundaries.
It is designed to ensure that AI remains a controlled dependency—not a source of unpredictable business logic—by enforcing structure, validation, and observability across all AI interactions.
- AI is a dependency, not the core
- Core systems produce truth; A.I.L. produces intelligence
- Context is the edge, not the model
- No domain logic leakage into the core
- Deterministic behavior over implicit behavior
A.I.L. exists to make AI reliable, auditable, and controllable inside real systems.
A.I.L. follows a modular monolith architecture with strict internal boundaries.
-
Execution
- Orchestrates AI execution requests
- Integrates provider selection and reliability layers
-
Prompt Registry
- Manages versioned prompts
- Enforces variable contracts and validation
- Supports lifecycle operations (create, activate, deactivate, promote)
- Deterministic resolution (highest active version wins)
-
Provider Registry
- Abstracts AI providers and models
- Validates provider/model combinations before execution
-
Reliability
- Handles retries, fallbacks, and failure behavior
- Ensures execution resilience across providers
-
Policy Registry
- Defines rules governing execution behavior
-
Context Engine
- Supplies structured context to execution requests
-
Observability
- Tracks execution metadata without leaking sensitive content
-
Audit
- Records execution events for traceability
The Prompt Registry is a core component of A.I.L.
- Versioned prompts (
v1,v2,v1.1, etc.) - Active/inactive state management
- Strict variable contract enforcement:
- Required variables must be provided
- Unknown variables are rejected
- Deterministic resolution:
- Explicit version → exact match required
- No version → highest active version selected
CreatePromptVersionAsyncActivatePromptVersionAsyncDeactivatePromptVersionAsyncPromotePromptVersionAsync
Prompt definitions are stored via IPromptDefinitionRepository.
Current implementation includes:
- In-memory repository (for testing/dev)
- File-based repository (durable local persistence)
- Request enters Execution module
- Prompt is resolved via Prompt Registry
- Provider + model selected via Provider Registry
- Reliability layer applies retry/fallback policy
- Execution occurs through provider abstraction
- Observability and Audit record metadata (no prompt leakage)
- Execution tests validate end-to-end behavior
- Prompt registry tests validate:
- version resolution
- lifecycle operations
- variable contract enforcement
- Architecture tests ensure boundary integrity
Foundation phase complete:
- Prompt registry with lifecycle and validation
- Repository-backed design
- File-based persistence
- Provider abstraction and reliability layer
- Clean execution integration
- Passing builds and tests
Next phases:
- Durable persistence expansion (beyond file storage)
- Prompt lifecycle management interfaces
- Memory Core (stateful intelligence layer)
- Decision Engine (policy-driven intelligence selection)
- Control Plane (system-wide orchestration and observability)
- Prefer explicit over implicit behavior
- Fail fast on invalid inputs
- Keep AI usage observable but secure
- Maintain strict separation of concerns
- Build foundation before expansion
A.I.L. is not an AI application.
It is the system that controls how AI is used—ensuring that intelligence is structured, validated, and scalable across real-world systems.