packstub/agents
packstub/agents is a Laravel package that provides a clean, extensible foundation for defining and running AI agents, with support for tools, prompts, and workflows that integrate smoothly into your application.
DecisionClassifier contract with three sources: the bundled agent side-agent (default, no extra vendor), a hosted jev driver (~100 ms, per-question confidence, no reasoning), or your own class. The product decision is reversible — you can ship on the default, measure, then switch drivers via AGENT_DECISION_CLASSIFIER_DRIVER without touching feature code. That de-risks the roadmap item instead of committing to a vendor up front.AGENT_DECISION_CLASSIFIER_MIN_CONFIDENCE (default 0.8) means a low-confidence read becomes a clarifying question rather than an executed action. This is a policy knob you can tune per environment (conservative in prod, loose in staging) and defend to risk/compliance without an engineering sprint. Note the asymmetry: the agent driver returns no confidence and is exempt from the floor, so the policy only binds once you adopt jev or a custom classifier — decide deliberately which driver your risk posture assumes.AgentTurn::decisionDriver() and decisionConfidence() persist which classifier read each reply and how sure it was. That gives you the raw material for an automation-rate / escalation-rate / low-confidence-rate dashboard, per driver and per model. It supports concrete decisions: is jev actually better than the side agent, what confidence floor maximizes completed approvals without misreads, and can confident auto-decisions be sold as a premium tier.jev driver sends the human's reply and the proposal questions to TypeSafe. For regulated or Enterprise buyers this is a gating product decision, not an implementation detail; the custom-classifier path is the escape hatch for self-hosting or an approved vendor. Worth capturing as an explicit supported deployment mode.AgentRun, a command, or the email channel now execute in the same request instead of waiting on a worker; a click that completes a held decision still goes to the worker. That's the difference between "instant" and "come back later" in an approval flow — a UX commitment you can now make.agents:run --tenant=acme, email channel) that would otherwise show up as a POC blocker. This supports "we support your database" in RFPs rather than a caveat.Adopt when:
Look elsewhere or postpone when:
DecisionClassifier yourself — in that case you're limited to the word lists plus the side agent, and the confidence-floor story doesn't apply.agent driver still implies LLM cost and latency on the fallback path.For executives: This release turns "the agent asks, a person answers" from a demo into an operable capability. We can now choose who interprets a human's typed decision — our own model, a fast hosted one, or ours later — and we can require a confidence threshold before the system acts, so uncertain reads become questions instead of mistakes. Every decision is recorded with its source and confidence, which gives us the numbers to prove it works and the audit trail to satisfy reviewers. No lock-in: the classifier is swappable, and the fixes for Postgres and multi-proposal conversations remove the blockers we'd hit in a customer pilot.
For engineering: Additive minor release, no breaking changes. Decision reading is now behind Packstub\Agents\Contracts\DecisionClassifier, selected by AGENT_DECISION_CLASSIFIER_DRIVER (agent default, jev, or your own class/binding). AGENT_DECISION_CLASSIFIER_MIN_CONFIDENCE (0.8) only binds drivers that return confidence — agent returns null and is exempt. Turn records expose decisionDriver() and decisionConfidence(). Word-list matching still runs first, and undecided proposals or classifier failures still fall back to a question. Also fixed: synchronous execution for typed decisions via AgentRun/command/email, Postgres case-insensitive chat search, tenant-slug lookups that previously errored on Postgres, and a stuck-conversation bug when a reply arrives after one of two proposals is decided. CI now covers Postgres and MySQL in addition to SQLite.
How can I help you explore Laravel packages today?