Download the PHP package rawphp/laravel-capabilities-ai without Composer

On this page you can find all versions of the php package rawphp/laravel-capabilities-ai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-capabilities-ai

rawphp/laravel-capabilities-ai

Status: 0.x pre-stable — not Packagist-published.
Install: package VCS or monorepo path.

Conversation / turn / proposal runtime for the Laravel Capabilities bus.

Monorepo path: packages/laravel-capabilities-ai/ in laravel-capabilities-monorepo.

Scope (this package)

Is Optional turn / proposal runtime: queue a turn, claim it, loop LLM → tools, stream progress (array/Redis); tool side effects only via CapabilityBus::invoke; host seams for conversation context and tool catalog; thin LlmClient (fake + Anthropic) for turns and host completions that must not embed domain rules
Multimodal User message content on ConversationContextProvider / LlmClient may be a string or a list of provider content blocks (text + base64 image for Anthropic vision). Hosts hydrate attachment bytes into context — this package does not store, claim, or fetch chat attachment files. End-to-end photo coach flows still need host upload + context hydration.
Is not The capability bus / registry; chat channel bots (use messaging); product CLI; a general app-wide LLM SDK replacing laravel/ai; domain run(); generative UI or agent-native OS

Requires rawphp/laravel-capabilities. Consumers install this package repo, not the monorepo.

Doc Where
User guide docs/user-guide.md
Upgrade (accept/reject wire) CHANGELOG Unreleased Breaking
Upgrade (chat HTTP non-proposal routes) CHANGELOG Unreleased Breaking (history / showTurn / cancelTurn / turnEvents / destroyConversation; 404 / 409; routes.enabled)
Upgrade (LlmClient / tool rounds) CHANGELOG Unreleased Breaking
Upgrade (tool progress + tool messages) CHANGELOG Unreleased Breaking
Upgrade (Anthropic default model ID) CHANGELOG Unreleased Breaking
Upgrade (manual DI / constructor / job handle) CHANGELOG Unreleased Breaking
Core package rawphp/laravel-capabilities
Messaging sibling rawphp/laravel-capabilities-messaging
Monorepo design laravel-capabilities-monorepo

Install (path package)

Host app: require rawphp/laravel-capabilities-ai and register Rawphp\CapabilitiesAi\CapabilitiesAiServiceProvider (auto-discovery via extra.laravel.providers).

Config

Publish:

Key defaults (config/capabilities-ai.php):

Key Default
table_prefix capabilities_ai_
progress.driver array (or redis) — prod: redis; array outside testing throws unless CAPABILITIES_AI_ALLOW_UNSAFE=1
llm.driver fake (set CAPABILITIES_AI_LLM_DRIVER=anthropic or bind LlmClient for production) — fake outside testing throws unless CAPABILITIES_AI_ALLOW_UNSAFE=1
llm.anthropic.model claude-sonnet-4-6 (CAPABILITIES_AI_ANTHROPIC_MODEL)
llm.anthropic.max_tokens 64000 (CAPABILITIES_AI_ANTHROPIC_MAX_TOKENS)
user_model null → falls back to auth.providers.users.model (CAPABILITIES_AI_USER_MODEL)
claim_ttl 120 (seconds; worker heartbeat / job timeout window)
queue.connection null (CAPABILITIES_AI_QUEUE_CONNECTION) — applied to default RunTurnJob dispatch when set
queue.name null (CAPABILITIES_AI_QUEUE_NAME) — applied to default dispatch; also marks AI-chat for core capabilities:integration-health when non-empty
proposals.enabled true Phase-1 BC (CAPABILITIES_AI_PROPOSALS_ENABLED) — greenfield: set false
reaper.stale_queued_minutes 30 (CAPABILITIES_AI_REAPER_STALE_QUEUED)
reaper.stale_running_grace_seconds 60 (CAPABILITIES_AI_REAPER_RUNNING_GRACE)
allow_unsafe false (CAPABILITIES_AI_ALLOW_UNSAFE) — local demos only
max_tool_rounds 8
routes.enabled false

Progress events live in array/Redis — not MySQL product tables.

Bus principal (tool + accept invokes): TurnRunner and ProposalService resolve the conversation’s Laravel user via user_model / auth provider and pass caller=job plus that user as actor on CapabilityBus::invoke. Missing/unresolvable conversation.user_id fails closed (no silent default user). README “bare” tool invokes means no idempotency_key — not “no invoke options.”

Host integration (D-024 seams)

Happy-path AI-chat hosts configure — they do not rebind package runtime for queue or progress:

Seam Do Do not
Queue Set CAPABILITIES_AI_QUEUE_NAME / CAPABILITIES_AI_QUEUE_CONNECTION Full ConversationService rebind only to pick a queue
Progress side-effects app()->extend(ProgressStore::class, …) in boot() after package bind singleton(ProgressStore::class, …) replacing redis/array
Idempotency readiness Leave SP default StoreBoundIdempotencyReadiness (live core store ping; fail closed when unbound) Bind AlwaysReadyIdempotency in production (tests-only)
Proposals CAPABILITIES_AI_PROPOSALS_ENABLED=false on greenfield Assume routes-only gate — flag also skips TurnRunner fence extract + history proposals
Stale turns Schedule php artisan capabilities-ai:reap-stale-turns Host reapers on wrong tables / dual chat stores without a kill date
Product HTTP UX Host routes → bus / AI services Package route surgery or hijacking package chat HTTP for product UX
Diagnostics Core php artisan capabilities:integration-health Confuse with HTTP GET …/capabilities/health

Full greenfield checklist, kill-list template, and extend snippet: docs/user-guide.md.

Host seams

Bind before running turns:

Custom LlmClient: implement supportsToolRounds(). Prefer use LlmClientDefaults (returns false) and override to true only if the client accepts tool-result messages on the next complete() (OpenAI-style role=tool or Anthropic tool_result blocks). Lying opens a bus-then-crash path. (PHP interfaces still cannot ship method bodies on supported PHP; the trait is the fail-closed default for hosts.) Host upgrade callouts: CHANGELOG Breaking.

MVS product default: multi-round tools are off until a client opts in. AnthropicLlmClient and FakeLlmClient opt in (supportsToolRounds() === true); hosts using LlmClientDefaults stay fail-closed until they override. Empty tool defs + refuse-before-bus is defense-in-depth for non-tool-round clients, not a second product surface.

Proposals (single accept/reject model): Gated by proposals.enabled (CAPABILITIES_AI_PROPOSALS_ENABLED). When false: accept/reject routes are not registered, TurnRunner skips fence → proposal extract, and history omits/empties proposals. When true: Accept returns typed AcceptOutcome for every known status (rejected/expired → refuse); HTTP maps outcomes + 404 when missing. Reject uses CAS + RuntimeException → 409 for non-pending. Greenfield: set false until you need proposals. Host upgrade callouts: CHANGELOG Breaking.

Env: ANTHROPIC_API_KEY (never required in CI — tests use Http::fake / FakeLlmClient).

Flow

  1. Cheap create — ConversationService::createUserMessage inserts message + queued turn, dispatches RunTurnJob (no LLM).
  2. Claim + run — TurnClaim atomic update; TurnRunner loops LLM → tools via CapabilityBus::invoke only.
  3. Proposals — ProposalService::accept / reject as above (bus-only side effects on accept).

ProgressStore

Package binds ProgressStore in register() when unbound (array or redis from config). Hosts that need side-effects (TTS, metrics, …) must wrap with extend in boot() so the package store is the $inner:

Forbidden: host singleton(ProgressStore::class, …) that replaces redis/array wiring (rebind, not extend).

Kinds: status | token | tool | error | terminal.

License

MIT

Non-chat / MVS host jobs

Hosts may resolve LlmClient without a Conversation (e.g. Macro Validation Suite jobs):

The LlmClient interface has no conversation-only dependency. Testing default is FakeLlmClient (no network).


All versions of laravel-capabilities-ai with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
rawphp/laravel-capabilities Version *
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rawphp/laravel-capabilities-ai contains the following files

Loading the files please wait ...