Download the PHP package ririkana/agent-framework without Composer
On this page you can find all versions of the php package ririkana/agent-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ririkana/agent-framework
More information about ririkana/agent-framework
Files in ririkana/agent-framework
Package agent-framework
Short Description Reusable Laravel package for governed, tenant-safe AI agent execution.
License MIT
Informations about the package agent-framework
Ririkana Agent Framework
A reusable, governed, tenant-safe Laravel 13 package for building business AI agents.
[]()
[
]()
[
]()
[
]()
[
]()
Overview
Ririkana Agent Framework provides the infrastructure layer for building production AI agents in Laravel. It handles governance, multi-tenancy, tool authorization, budgets, approvals, memory, and observability — freeing application developers to focus on domain-specific agent behavior.
Key principles:
- Multi-tenant by design — every agent run, tool call, and model request is tenant-scoped
- Governed, not gated — tools are classified by risk; high-risk operations require policy-based approval
- Provider-agnostic — agents reference logical model profiles, not hardcoded provider names
- Fully observable — every model call, tool execution, policy decision, and approval is audited
- Package-only — no frontend, no user model, no product business logic. Consuming apps provide those via contracts.
Installation
Publish the configuration:
Run the framework migrations:
Quick Start
1. Define an agent manifest
2. Register the agent
3. Register tools
4. Execute the agent
Core Contracts
| Contract | Purpose |
|---|---|
AgentRuntime |
Execute, stream, and queue agent runs |
AgentRegistry |
Register and query agent manifests |
ToolRegistry |
Register governed tools |
ToolExecutor |
Validate, authorize, and execute tool calls |
PolicyEngine |
Evaluate guardrail and policy decisions |
ModelRouter |
Select provider/model by capability and profile |
BudgetLedger |
Track and enforce usage budgets |
ConversationStore |
Store and retrieve conversation messages |
ApprovalGateway |
Request and resolve human approvals |
AuditSink |
Record audit events for every operation |
KnowledgeRetriever |
Retrieve evidence from RAG service |
WorkflowOrchestrator |
Dispatch n8n workflows |
RunRepository |
Persist agent runs with optimistic concurrency |
ContextResolver |
Resolve tenant/actor from HTTP request |
ContextSerializer |
Serialize/deserialize execution context |
Capabilities
Text / Chat
The primary agent capability. Agents receive prompts, execute tools, and return text or structured output.
Sub-Agent Delegation
Parent agents can delegate tasks to child agents through an allowlisted delegation policy.
Image Generation
Text-to-Speech
Speech Transcription
Architecture
- Domain must not import Laravel AI SDK, Eloquent, HTTP, Redis, n8n, or product namespaces
- Infrastructure implements contracts
- Controllers and commands call contracts, not internal classes
- Consuming applications call public contracts and registrars
Configuration
All configuration lives in config/ririkana-agent.php. Key sections:
| Section | Purpose |
|---|---|
database |
Connection and table prefix |
persistence |
Driver: memory (dev) or database (production) |
runtime |
Default runtime: fake or laravel-ai |
openrouter |
OpenRouter API key and default models |
rag |
Ririkana RAG service credentials |
n8n |
n8n workflow engine credentials |
routes |
Optional headless HTTP routes |
limits |
Tool result size and timeout defaults |
budgets |
Daily usage budget |
Environment variables are documented in .env.example.
AI Provider Setup
The package works with any provider supported by Laravel AI SDK. OpenRouter is recommended — one API key covers text, image, TTS, and transcription.
See docs/implementation/integrations/OPENROUTER-SETUP.md for detailed setup instructions.
Console Commands
Testing
Architecture Decisions
The framework follows 24 Architecture Decision Records (ADRs) in docs/09-adrs/. Key decisions:
- ADR-0003: Laravel AI SDK isolated behind
AgentRuntime - ADR-0004: Logical model profiles, not hardcoded model names
- ADR-0005: Laravel remains business source of truth
- ADR-0007: n8n must not write directly to business tables
- ADR-0014: Every tool classified by risk and side effects
- ADR-0016: PostgreSQL as durable default, Redis as supporting
- ADR-0018: W3C Trace Context across boundaries
Full documentation at docs/.
Requirements
- PHP 8.5+
- Laravel 13.x
- PostgreSQL (production) or SQLite (development)
- Laravel AI SDK 0.8.x (optional, for live provider calls)
License
MIT License. See LICENSE for details.
All versions of agent-framework with dependencies
illuminate/console Version ^13.0
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/http Version ^13.0
illuminate/support Version ^13.0