Skip to content

feat(python/agents): add crypto-payroll-agent sample#1917

Open
plagtech wants to merge 1 commit into
google:mainfrom
plagtech:feat/crypto-payroll-agent
Open

feat(python/agents): add crypto-payroll-agent sample#1917
plagtech wants to merge 1 commit into
google:mainfrom
plagtech:feat/crypto-payroll-agent

Conversation

@plagtech
Copy link
Copy Markdown

Summary

Adds crypto-payroll-agent, a sample that batch-pays multiple
recipients in ETH or ERC-20 tokens on Base in a single transaction. The
agent uses the Spraay batch payment tools from
google-adk-community.

Pattern demonstrated

  • Tool selection across four related tools: the agent picks among
    spraay_batch_eth, spraay_batch_token, and their _variable
    siblings based on whether the user wants equal or variable amounts
    and ETH or ERC-20.
  • Tool composition: a local split_pool_proportionally helper feeds
    the variable batch tools when the user supplies a total and weights
    rather than per-recipient amounts.
  • A local lookup_token_info helper resolves common Base tokens
    (USDC, WETH, cbBTC, DAI, etc.) so users don't need to know decimals.
  • Human-in-the-loop confirmation with a configurable USD ceiling.

What's included

  • crypto_payroll_agent/ — single LlmAgent with the four Spraay
    tools plus two local helpers
  • eval/ — five-case evalset covering each batch-tool selection path
    and a safety refusal
  • tests/ — 14 offline unit tests
  • deployment/deploy.py — reference Vertex AI Agent Engine deployment
  • README with four worked example interactions

Verification

  • uv sync clean
  • uv run pytest tests/ -v — 14 passed
  • All four Spraay tools import successfully
  • Agent loads in adk web

Note on the dependency

The Spraay tools are merged into google/adk-python-community main
but have not yet shipped in a PyPI release. The pyproject.toml pins
google-adk-community to git main for now; this can be relaxed to a
standard version constraint once a release ships.

Apache 2.0 license matches the repo default.

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