Governed AI Execution Framework
Batoi AIF is a PHP-first, provider-neutral framework for inference, embeddings, moderation, retrieval, and tool execution. Governed mode keeps policy, approvals, evaluations, evidence, and operational controls inside one explicit runtime boundary.
Batoi Intelligence is the experience. Batoi AIF is the engineering foundation.
Batoi Intelligence is the managed assistance and orchestration capability people encounter across Batoi products. Batoi AIF supplies provider-neutral execution, routing, policy, reviews, tools, evaluation, and evidence for governed AI engineering. They have related purposes but are not interchangeable names.
What AIF Provides
The 1.0 runtime combines production controls with portable contracts, development implementations, and host-specific adapters.
Capability-Aware Routing
Route inference, embeddings, moderation, and supported streaming through normalized provider capabilities, health checks, and deterministic fallback.
Governed Gateway
Fail closed in governed mode when trusted caller context, policy enforcement, or audit persistence is unavailable.
Prompt Governance
Resolve immutable approved prompt versions, validate variables, and keep templates outside controllers and page code.
Review and Tool Safety
Pause for human approval, bind decisions to the original request hash, prevent replay, and constrain side-effecting tools.
Audit Evidence
Capture canonical hashes, caller and trace correlation, latency, provider metadata, policy outcomes, evaluations, and terminal status.
Evaluation and Metrics
Run pre- and post-execution checks with block, warn, or annotate outcomes and emit vendor-neutral operational metrics.
Governed RAG
Chunk, embed, retrieve, and generate with workspace and ACL filters applied before ranking and with citation evidence retained.
Durable Work
Support idempotent dispatch, leases, retry, delay, cancellation, acknowledgment, crash recovery, and dead-letter handling.
Controls Before, During, And After Execution
Every governed operation validates trusted context, applies operation-aware policy, controls provider or tool side effects, and attempts one correlated terminal audit record.
Explore the execution lifecycle- 1ValidateRuntime dependencies, caller context, and request shape
- 2GovernApproved prompts, policy decisions, redaction, and review
- 3ExecuteCapability-aware provider, retrieval, or permission-aware tool
- 4EvaluatePre- and post-execution block, warn, and annotate outcomes
- 5EvidenceAudit status, hashes, correlation, latency, usage, and metrics
Framework Independent, Platform Ready
AIF core has no required dependency on RAD, Laravel, Symfony, a particular queue, or a vector database. Host applications own routing, secrets, and deployment; adapters connect their context and infrastructure to AIF contracts.
Read the framework boundaryBatoi RAD Profile
IncludedPDO adapters persist provider catalogs, prompts, policy, audit, reviews, and durable queue jobs with forward and rollback migrations.
Batoi UIF Contract
PublishedUIF can render provider management, prompt review, policy settings, execution review, and audit surfaces.
REST API Contract
IncludedAifApi exposes stable transport-neutral success and safe error envelopes without leaking internal exceptions.
Queue Adapters
IncludedIn-memory and RAD/MySQL adapters implement dispatch, idempotency, leases, retry, cancellation, recovery, and dead-letter behavior.
Vector Store Adapters
IncludedGoverned retrieval contracts require workspace and ACL filter pushdown; an in-memory adapter supports development and tests.
Laravel and Symfony
Integration packagesIsolated, tested integration packages cover controllers, configuration, context resolution, and dependency wiring.
Install and Configure AIF
Install the package, then follow the governed configuration guidance for trusted context, policy enforcement, provider connections, approvals, and persistent audit storage.
composer require batoi/aif:^1.0
Batoi AIF Is Public On GitHub
Version 1.0.1 was released on 17 July 2026. Review the source, release notes, integration packages, migrations, and verification suite in the public repository.