yukazakiri/lepton-agent
A lightweight AI agent toolkit for Laravel. Lepton Agent connects your app to LLM providers and offers simple abstractions for tools, conversation memory, and multi-step agent workflows, so you can ship chat and automation features with minimal configuration.
What this release is. v3.0.0-rc.1 is a repositioning, not an increment. The package moves from "CLI wrapper with gaps" to a Laravel-first SDK with a stable core (WalletGateway, four methods) plus optional capability interfaces. For a TPM, the material fact is that the contract changed even though the headline interface didn't.
Architecture fit. The shape is sound for a Laravel codebase: service provider + Lepton facade, Artisan commands (lepton:transfer, --estimate), injectable JsonTransport, and capability interfaces that let drivers advertise what they actually support. UnsupportedOperation replacing zero-balance/placeholder returns is exactly the right failure semantics for money movement — fail loud, never fabricate. Dry-run blocking signing and mutations, plus a transport that follows no redirects and retries no writes, are the correct defaults for a payments client and tell me the author has been burned before.
Integration feasibility — the blockers are environmental, not architectural.
feeLevel placement, and signing payloads previously did not match the Circle OpenAPI contract. Webhook verification previously used the Entity Secret RSA key instead of the ECDSA_SHA_256 public key. Anyone running v2 in anger may have been shipping incorrect signing payloads while believing the integration worked. Assume v2 correctness is unproven everywhere.Technical risk.
ECDSA_SHA_256 against original raw bytes is correct and is also the most common place Laravel integrations break — body parsers, middleware, and proxies all mutate payloads.Key questions for the maintainer.
Stack fit. Good fit for a Laravel service that holds USDC balances or initiates Circle transfers. Bind JsonTransport to a client with explicit timeouts and no redirects; register WalletManagementGateway / TransferObserver / TransferEstimator / WebhookVerifier behind capability checks rather than assuming a driver implements everything. Treat UnsupportedOperation as a first-class control-flow branch, not an error to swallow.
Migration path from 2.x. Do not do a lift-and-shift. Sequence:
WalletGateway keeps working; land read paths and estimation first, then webhooks, then mutations.Compatibility. Requires ext-curl, ext-openssl, PHP 8.5+. Confirm base image, CI, and any sidecar tooling. Verify the webhook route bypasses body-mutating middleware and that any ingress preserves raw bytes and does not buffer-rewrite.
Sequencing. Dev sandbox → dry-run wiring and estimation in CI → read operations against testnet → webhook verification with replayed fixtures → first live testnet mutation (wallet create, faucet, small transfer) → mainnet behind a flag with manual approval. Do not compress the live-testnet phase; it is the only phase this release has not de-risked for us.
Maintenance. Prerelease churn between rc.1 and GA is likely, so pin exactly and budget for a second upgrade inside the quarter. The package is a thin, well-tested layer; the ongoing maintenance burden is mostly ours — idempotency persistence, retry policy, capability negotiation, and webhook endpoint hygiene.
Support. With zero live exercise, the first real failure will be diagnosed by our team against the Circle OpenAPI spec, not by the maintainer's test suite. Budget for that. Escalation path to the maintainer should be agreed before mainnet.
Scaling. The HTTP transport is injectable, so connection pooling, timeouts, and observability are ours to own. Because writes are not retried at transport level, throughput and durability depend entirely on our queue design — which is correct, but means queue concurrency, tries, and backoff must be tuned with idempotency semantics in mind. Reads scale conventionally.
Failure modes to instrument.
UnsupportedOperation — alert on unexpected occurrences per driver; they indicate config drift.Ramp-up. Moderate. Engineers need PHP 8.5 tooling familiarity, comfort with the Circle OpenAPI contract, disciplined idempotency-key handling, and enough ECDSA/webhook knowledge to not accidentally verify against the wrong key. The capability-interface pattern is easy to learn and easy to misuse — establish a team convention that UnsupportedOperation is never caught and discarded.
Recommendation. Adopt rc.1 for evaluation and non-production integration now — it is a clear correctness improvement over v2, and the fail-loud semantics are worth the migration pain. Gate production on three things: PHP 8.5 available in the runtime, a completed live testnet certification with wallet creation, faucet, transfer, and webhook delivery all exercised, and an idempotency key store shipped and tested under queue retry. Until the live path is proven, treat this as unvalidated against the system it actually talks to.
How can I help you explore Laravel packages today?