Skip to content

docs: correct README's description of the payment agent to match the actual implementation - #28

Open
pplmaverick wants to merge 2 commits into
circlefin:masterfrom
pplmaverick:docs/correct-agent-description
Open

docs: correct README's description of the payment agent to match the actual implementation#28
pplmaverick wants to merge 2 commits into
circlefin:masterfrom
pplmaverick:docs/correct-agent-description

Conversation

@pplmaverick

Copy link
Copy Markdown

Summary

Discovered while studying the repo as a reference for building a live payment system on Arc.

The README describes the payment agent (agent.mts, run via npm run agent) as an
LLM-driven agent built with LangChain and Deep Agents that "autonomously" decides which
tools to call, with a documented fallback to a "scripted mock run" and a natural-language
query example (npm run agent -- "Buy me a quote at ...").

None of this matches the actual implementation:

  • agent.mts has zero references to langchain, openai, or deepagents anywhere in
    the file (verified via full read + repo-wide grep).
  • parseArgs() (agent.mts:15-32) only recognizes a single --limit <number> flag. Any
    other CLI argument — including the quoted natural-language query shown in the README
    example — is silently ignored and has no effect on execution.
  • There is no OPENAI_API_KEY branch, no LLM call, and no "mock mode" anywhere in the
    script. The agent's behavior is unconditional and deterministic regardless of whether
    OPENAI_API_KEY is set.
  • The actual behavior (agent.mts:91-296) is: generate an ephemeral wallet, fund it from
    BUYER_PRIVATE_KEY, deposit USDC into Circle Gateway (gateway.deposit), then run a
    fixed setInterval loop (agent.mts:259-293) that round-robins through the 4 hardcoded
    /api/premium/* endpoints at 1 request/second, auto-topping-up the Gateway deposit
    below a 0.5 USDC threshold (agent.mts:172, 199-221).
  • package.json still lists @langchain/core, @langchain/openai, and deepagents as
    dependencies, but they are unused — not imported anywhere in the codebase.

This is misleading for anyone evaluating the demo's actual capabilities (e.g. assuming
it demonstrates LLM tool-use, or that the query example does something).

Changes

  • Rewrote the project intro, the "Run the AI payment agent" step, and the "How It Works"
    bullet to describe the agent as what it is: a scripted, deterministic payment loop.
  • Removed the non-functional "custom query" example (npm run agent -- "Buy me a quote at ..."), since arbitrary arguments are silently ignored by parseArgs().
  • Removed the Prerequisites bullet about an optional OPENAI_API_KEY enabling
    "LLM-driven" behavior, since the script never reads that variable.
  • No code changes — this PR only touches README.md. The unused LangChain/Deep Agents
    dependencies in package.json are a separate, follow-up cleanup (removing them, or
    actually wiring them up if LLM-driven behavior was the intent) and are out of scope
    here.

Test plan

  • Diff reviewed against current agent.mts and package.json to confirm accuracy
  • Markdown renders correctly (headings, code fences, bold/link syntax)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant