Skip to main content
Batoi AIF v1.0.1

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.

v1.0.1 PHP 8.3+ Apache 2.0
Product and Foundation

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.

Framework Capabilities

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.

Governed Lifecycle

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
  1. 1
    ValidateRuntime dependencies, caller context, and request shape
  2. 2
    GovernApproved prompts, policy decisions, redaction, and review
  3. 3
    ExecuteCapability-aware provider, retrieval, or permission-aware tool
  4. 4
    EvaluatePre- and post-execution block, warn, and annotate outcomes
  5. 5
    EvidenceAudit status, hashes, correlation, latency, usage, and metrics
Architecture Boundary

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 boundary

Batoi RAD Profile

Included

PDO adapters persist provider catalogs, prompts, policy, audit, reviews, and durable queue jobs with forward and rollback migrations.

Batoi UIF Contract

Published

UIF can render provider management, prompt review, policy settings, execution review, and audit surfaces.

REST API Contract

Included

AifApi exposes stable transport-neutral success and safe error envelopes without leaking internal exceptions.

Queue Adapters

Included

In-memory and RAD/MySQL adapters implement dispatch, idempotency, leases, retry, cancellation, recovery, and dead-letter behavior.

Vector Store Adapters

Included

Governed retrieval contracts require workspace and ACL filter pushdown; an in-memory adapter supports development and tests.

Laravel and Symfony

Integration packages

Isolated, tested integration packages cover controllers, configuration, context resolution, and dependency wiring.

Quick Start

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.

Installation Command
composer require batoi/aif:^1.0
Public Source

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.