I built Agentic Actions for Laravel: write an operation once, and your forms, Artisan, queues, AI agents and MCP clients all call it
For the past few weeks I've been building a package around one idea: an operation should be written once.
You write it as an Action class. The same class then answers a web route (JSON and forms, with Precognition), an Artisan command, a queued job, a typed TypeScript function, a laravel/ai agent (a copilot in your app), and MCP clients like Claude.
#[Expose]
final class CreatePost extends Action
{
protected ?Effect $effect = Effect::Write;
public function schema(JsonSchema $schema): array { /* … */ }
public function authorize(ActionContext $context): bool { /* … */ }
public function handle(ActionContext $context, ValidatedInput $input): array { /* … */ }
}
Every caller goes through the same pipeline: exposure, token abilities, tenant membership, `authorize()`, validation, `handle()`, and an allowlist on the output. So the AI can't do anything your form wouldn't allow, and you don't keep a separate pile of agent-only tools that drift from your real validation.
The idea comes from Agent-Native by Builder.io, where one `defineAction()` serves the UI, the agent, HTTP, MCP and the CLI. This brings that to Laravel, built on laravel/ai and laravel/mcp.
It's in beta (0.9), MIT licensed, and the API can still change before 1.0.
- Docs: https://agentic-actions.com
- Demo (private 24-hour sandbox, no sign-up): https://demo.agentic-actions.com
- Code: https://github.com/agentic-actions/laravel
I'd really like feedback: what breaks, what's missing, and whether this fits how you build Laravel apps.