Add mercadopago-agent-toolkit example#1477
Open
naza00000 wants to merge 1 commit intovercel:mainfrom
Open
Conversation
Adds a Next.js example where an agent drives Mercado Pago billing flows (Subscriptions, Payments, Refunds, Cuotas) via the @ar-agents/mercadopago package, Vercel AI SDK 6, and AI Gateway. The route handler picks anthropic/claude-sonnet-4-6 by string model name so the Anthropic key stays on the Gateway side, and wires the 89 MP tools into streamText with stepCountIs(8). Idempotency keys are auto-derived in the package. Live demo: https://ar-agents.vercel.app
Contributor
|
@naza00000 is attempting to deploy a commit to the Vercel Examples Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new
solutions/mercadopago-agent-toolkit/example: a Next.js app where an agent drives Mercado Pago billing flows (Subscriptions, Payments, Refunds, Cuotas) via@ar-agents/mercadopago, Vercel AI SDK 6, and the AI Gateway.The agent picks the right tool from a natural-language prompt:
Cobrale $25.000 mensual a juan@example.com con razón Plan Pro.routes tocreate_subscription.Buscá pagos de los últimos 30 días por más de $5.000.routes tosearch_payments.Reembolsame el último pago de juan@example.com.confirms then callsrefund_payment.Vercel-native bits used:
anthropic/claude-sonnet-4-6), so the Anthropic key never touches the client bundle./api/agent: the package is Web-Crypto based.@ar-agents/mercadopago/vercel-kv(subscription state, OAuth tokens, idempotency cache, audit log, distributed rate limiter) and@ar-agents/mercadopago/otel(OpenTelemetry instrumentation) as subpath exports.Demo URL
https://ar-agents.vercel.app (the live landing has a "Try it with a live agent" panel that runs the same code path against mocked MP tools).
Type of Change
New Example Checklist
npm run new-examplewas used to create the example.gitignore,package.jsonwith MIT license,README.mdwith front matter metadata +deployUrl+demoUrl,.env.example)Notes for reviewers