agentleFS
AWSKnown publisherawslabs/agentcore-samples/01-features/08-agents-that-transact/01-payments-skills-and-cli/AGENTS.md

agentcore-samples / 01-payments-skills-and-cli

AGENTS.md3.4k starsChanged 6 months agoApache-2.0View on GitHub

This file is for the coding assistant (Claude Code, Codex, Cursor, Kiro). It is a thin orchestration layer that loads the aws-agents payments skill and hands off to it. Do not reinvent the skill's content -- load it and follow it. This runbook supports exactly two scenarios: A short request such as "use this folder to add AgentCore payments" is sufficient. If the scenario (existing vs new) cannot be determined from the prompt or workspace, ask one routing question before…

  • Reads credentials

Trending

Less talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 2 mentionsMay 2026: 3 mentionsJun 2026: 2 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the awslabs/agentcore-samples repository that our weekly crawl found: only 9 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about awslabs/agentcore-samples

The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 9

Talked about on GitHub (9 times).

On GitHub · 9

4 more on GitHub

The file

We split this AGENTS.md into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the scenario (existing vs new) cannot be determined from the prompt or workspace, ask one routing question before taking action.

    line 15
  2. Distinctive:

    If the plugin is not installed or not visible in the current session, stop and tell the developer:

    line 42
  3. Distinctive:

    Do not use the cloned fallback for plugin-capable assistants unless the developer explicitly requests it.

    line 50
  4. Distinctive:

    Read the skill directly from the local clone:

    line 55
  5. Distinctive:

    If neither route is available, stop and direct the developer to README.md -> "Prerequisites." Do not proceed from memory.

    line 67
  6. Distinctive:

    If the plugin is not available, attempt to install it automatically:

    line 72
  7. Very specific:

    Cursor: Import aws/agent-toolkit-for-aws as a team marketplace, install aws-agents

    line 76
  8. Distinctive:

    If the install succeeds, tell the developer:

    line 78
  9. Distinctive:

    If the install fails (timeout, network error, or unsupported tool), stop and direct the developer to the README prerequisites for manual …

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md -- Assistant Runbook

This file is for the coding assistant (Claude Code, Codex, Cursor, Kiro). It is a thin orchestration layer that loads the aws-agents payments skill and hands off to it. Do not reinvent the skill's content -- load it and follow it.

Developer prompt contract

This runbook supports exactly two scenarios:

  • Existing agent -- add AgentCore x402 payments to an agent project.
  • New agent -- scaffold a new agent, then add AgentCore x402 payments to it.

A short request such as "use this folder to add AgentCore payments" is sufficient. If the scenario (existing vs new) cannot be determined from the prompt or workspace, ask one routing question before taking action.

Good minimal prompts:

Use this folder to add AgentCore payments to my existing agent.
Use this folder to create a new AgentCore payments agent.

0. Load the skill

The skill must be loaded before any provisioning or payment steps. This is the one thing only the orchestration handles -- the skill cannot verify its own loading.

Plugin-capable tools (Claude Code, Codex, Cursor)

Invoke the payments capability under the agents-build skill via the assistant's native plugin route. After loading, state which route is being used:

Using aws-agents <AssistantName> plugin payments skill.

If the plugin is not installed or not visible in the current session, stop and tell the developer:

The aws-agents plugin is not installed or not visible in this session.
Install it per the README prerequisites and start a fresh session.

Do not use the cloned fallback for plugin-capable assistants unless the developer explicitly requests it.

Fallback (tools without plugin support, e.g. Kiro)

Read the skill directly from the local clone:

agent-toolkit-for-aws/plugins/aws-agents/skills/agents-build/references/payments.md

State that the fallback is being used:

Using cloned payments.md fallback because <AssistantName> has no aws-agents plugin route.

If neither route is available, stop and direct the developer to README.md -> "Prerequisites." Do not proceed from memory.

Plugin not available

If the plugin is not available, attempt to install it automatically:

  • Claude Code: /plugin install aws-agents@claude-plugins-official then /reload-plugins
  • Codex: codex plugin marketplace add aws/agent-toolkit-for-aws then install aws-agents
  • Cursor: Import aws/agent-toolkit-for-aws as a team marketplace, install aws-agents

If the install succeeds, tell the developer:

Plugin installed. Start a new session in this folder to continue -- the plugin
loads at session startup and is not visible until then.

Then stop. Do not continue the payment flow in the same session.

If the install fails (timeout, network error, or unsupported tool), stop and direct the developer to the README prerequisites for manual installation.

1. Run the skill

Hand the developer's request to the skill's Process section and run it from Step 0 through Step 8. Do not skip steps. The skill handles:

  • CLI verification (Step 0)
  • Project detection or scaffolding (Step 1)
  • Situation routing -- detecting existing managers, deciding what to create vs reuse (Step 2)
  • Provisioning manager and connector (Step 3)
  • Deploy (Step 4)
  • Wiring the agent -- native plugin or generic tool (Step 5)
  • Instrument and session creation (Step 6)
  • Delegation and funding (Step 7)
  • Env vars and test (Step 8)

Trust the skill's routing logic. If a manager already exists, the skill detects it and skips creation. Do not force creation of new resources.

2. Human checkpoints -- pause and wait

The skill defines two points where you must hand control to the developer. Never handle credentials, never assume funding happened, never read agentcore/.env.local.

Checkpoint A -- provider credentials (skill Step 3b).

The developer runs agentcore add payment-connector (no flags -> interactive wizard). Present the prerequisites, then wait for confirmation. After they confirm, collect the user id and email for the first wallet, then continue.

Checkpoint B -- delegation and funding (skill Step 7).

Surface the wallet_address / redirect_url from the setup script output. Wait until the developer confirms the instrument is active and funded.

3. Cleanup

agentcore remove payment-connector --manager <ManagerName> --name <ConnectorName> -y
agentcore remove payment-manager --name <ManagerName> -y
agentcore deploy -y

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.