Build AI agents in Laravel.

Build resilient AI systems with execution graphs, durable execution, streaming, observability, and human-in-the-loop workflows.

The orchestration layer PHP never had is finally here.
Laravel PrismPHP Redis any LLM provider

MIT GitHub Packagist PHP 8.2+

Works with OpenAI Anthropic Gemini OpenRouter Ollama PrismPHP Laravel Redis

Why scripts collapse

Scripts get you started. Graphs get you to production.

A weekend script gets a demo working. Production needs checkpoints, branching, retries, and a trace you can read at 3am. That is orchestration, not more glue code.

Stateless Amnesia

No checkpoint, no second chance.

Your script times out or the deploy lands mid-run, and the agent loses everything. No memory, no continuity, start over.

Spaghetti Control Flow

Control flow stitched from if/else and glue.

Loops, retries, fan-out, conditional branching - bolted together with nested if/else and queue glue until no one can follow it.

Blind in Production

Failure without a trace is guesswork.

When an agent fails, you're grepping logs guessing which step broke, what the state was, where the cost went.

Features

Everything an agent needs to survive production.

Execution graphs, durable checkpoints, live tracing, and human approvals - in PHP, where your app already lives.

Execution graphs

Branch, join, and retry by design.

Fan out across specialists, converge on one deliverable, and retry failed nodes without re-running the graph.

Durable execution

Survive deploys and timeouts.

Checkpoints persist state, so a new worker resumes mid-graph instead of starting over from zero.

Live tracing

Every node, token, and dollar.

A readable waterfall shows which step broke, what the state was, and where the cost went.

Human-in-the-loop

Approve without restarting.

Interrupt for review, then resume from checkpoint. The agent picks up exactly where it left off.

Scripts chain steps.
Graphs model execution.

A script is one brittle lane. A graph fans out, joins, checkpoints, and resumes without starting over.

Laravel first.
AI second.

A Laravel-native framework for building AI agents with expressive APIs and native PHP, so you can use the patterns you already know to build the AI systems you couldn't before.

ContentGraph.php
final class ContentGraph implements GraphProvider
{
    public static function build(): AgenticGraph
    {
        return GraphBuilder::create('content')
            ->addNode('plan', PlanNode::class)
            ->addNode('research', ResearchNode::class)
            ->addNode('review', ReviewNode::class)
            ->addNode('publish', PublishNode::class)

            ->addEdge('plan', 'research')
            ->addEdge('research', 'review')
            ->addConditionalEdge('review', ReviewRouter::class)

            ->setEntryPoint('plan')
            ->addExitPoint('publish')

            ->build();
    }
}

See every run

3am. The agent failed. You'll know which node, which state, which dollar.

Every run produces a full trace: node spans, state diffs, LLM calls with token counts and cost, checkpoint lands, interrupt and resume markers. No more grepping Laravel logs and guessing.

Tracing ships with the package. AgenticPulse renders it as a waterfall at pulse.agenticgraph.dev.

Open interactive trace demo

exec_8f3c2a1d · research-agent

waiting
graph
6.8s
node: plan
0.5s
llm · gpt-4o-mini
412 tok · $0.0008
llm · gpt-4o
1,847 tok · $0.0184
tool: search_web
0.9s
node: search
1.4s
llm · gpt-4o-mini
892 tok · $0.0009
llm · gpt-4o
2,104 tok · $0.0312
resume
0.2s

AgenticPulse

total $0.0513

AI systems, not demos.

What ships when orchestration is a first-class concern.

Ship research reports that fan out, converge, and land on deadline.

Parallel specialists, one join node, one final deliverable. No manual stitching when branches complete at different times.

orchestrator parallel

Approve drafts without restarting the run.

Interrupt for human review. Resume from checkpoint. The agent picks up where it left off.

Delegate until the job is actually done.

A supervisor routes work across specialists in a loop until exit criteria are met.

Runs that survive deploys, timeouts, and queue restarts.

Checkpoints persist state. A new worker resumes mid-graph instead of re-running from zero.

checkpoint:resume

Typed all the way down

We hate magic as much as you do.

AgenticGraph is built with strict typing and explicit contracts. Your IDE knows exactly what methods are available, what arguments are required, and what every return type is. No stringly-typed guessing, no runtime surprises. Full autocompletion, static analysis, and refactor safety.

Give your agents a graph.

One Composer command. Your first workflow is minutes away.

Copied

Read the docs · GitHub · Packagist