Batoi AIF Documentation
Batoi AIF is a provider-neutral PHP framework for governed AI execution. It keeps provider abstraction, policy, prompt handling, audit evidence, and application integration inside an explicit runtime boundary.
The public repository is in early foundation work. Evaluate the current source and its stated boundaries before adopting it in a production application. The framework requires PHP 8.3 or newer and uses the Apache 2.0 license.
Use these docs when you need to:
- fail closed when caller context, policy, or audit persistence is unavailable
- route AI operations by normalized provider capabilities
- govern prompts, sensitive-data obligations, and human approvals
- build tenant-safe RAG and controlled tool workflows
- run durable work with explicit retry, lease, and dead-letter behavior
- integrate with Batoi RAD, Laravel, Symfony, REST endpoints, UIF, queues, and vector stores
The public repository is available at github.com/batoisystems/batoi-aif.
Recommended Reading Path
- Start with Getting Started.
- Review Architecture.
- Confirm Framework Independence.
- Plan providers with Provider Abstraction.
- Configure production controls with Gateway and Policy.
- Add approvals with Review Workflows.
- Build retrieval with RAG and Governed Retrieval.
- Control actions with Tools and Bounded Agents.
- Use REST API Contract when exposing AIF to web or product surfaces.
Where AIF Fits
AIF is one of the Batoi Platform engineering foundations:
- Batoi RAD: governed application execution
- Batoi UIF: interface framework and micro app surfaces
- Batoi AIF: governed AI execution
See Engineering Foundations for the public framework stack.