Skip to content

feat(typescript): add tokenSafety action provider#1258

Open
mehmetkr-31 wants to merge 1 commit into
coinbase:mainfrom
mehmetkr-31:feat/token-safety-action-provider
Open

feat(typescript): add tokenSafety action provider#1258
mehmetkr-31 wants to merge 1 commit into
coinbase:mainfrom
mehmetkr-31:feat/token-safety-action-provider

Conversation

@mehmetkr-31
Copy link
Copy Markdown

Summary

Adds a new tokenSafety action provider to AgentKit.

Motivation

AgentKit allows AI agents to trade cryptocurrency assets autonomously, but lacks built-in safety features to protect users and agents from scams, honeypots, or unsafe tokens.

This PR implements the tokenSafety action provider in the TypeScript SDK, enabling agents to query token safety scores and security warnings prior to executing trades or token swaps.

Changes

  • Implements TokenSafetyActionProvider with the scan_token action.
  • Connects to the public ERC Token Safety API at https://cryptogenesis.duckdns.org/token/scan to retrieve security flags, verdicts (e.g. SAFE, UNSAFE), and safety scores (0-100).
  • Registers and exports the provider under src/action-providers/tokenSafety.
  • Adds unit tests covering validation, API fallbacks, error handling, and mock fetch simulations.

Fixes #1091

@mehmetkr-31 mehmetkr-31 requested a review from murrlincoln as a code owner June 2, 2026 17:28
@cb-heimdall
Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

Action Provider: Token safety checks before trading (SafeAgent)

2 participants