feat: Add AVE Cloud Skills as conversational agent tools (#56) #58

Merged
shoko merged 4 commits from fix/issue-56 into main 2026-04-13 14:56:33 +02:00
Owner

Summary

This PR adds AVE Cloud Skills integration to replace and expand the conversational agent tools as specified in issue #56.

Changes

  • Added ave-cloud-skill as git submodule at project root
  • Created symlink at src/backend/app/ave pointing to ../../ave-cloud-skill/scripts/ave for Python imports
  • Replaced search_tokens tool to use ave-cloud-skill library's /tokens API endpoint
  • Added new tools:
    • get_token - Get detailed token information using /tokens/{address}-{chain} endpoint
    • get_price - Get token prices using /tokens/price endpoint
    • get_risk - Get token risk analysis using /contracts/{address}-{chain} endpoint

Implementation

The implementation uses the ave.http.api_get and ave.http.api_post functions from the ave-cloud-skill library directly, with environment variables set from the application's settings.

Tool Descriptions

Tool Description
search_tokens(keyword, limit) Search for tokens by keyword on BSC
get_token(address, chain) Get detailed token info (price, market cap, pairs)
get_price(token_ids) Get current prices for multiple tokens
get_risk(address, chain) Get risk/honeypot analysis for a token

Dependencies

  • Must be done before building slash command help system
  • Priority: HIGH - Sponsor requirement
## Summary This PR adds AVE Cloud Skills integration to replace and expand the conversational agent tools as specified in issue #56. ### Changes - **Added** `ave-cloud-skill` as git submodule at project root - **Created** symlink at `src/backend/app/ave` pointing to `../../ave-cloud-skill/scripts/ave` for Python imports - **Replaced** `search_tokens` tool to use `ave-cloud-skill` library's `/tokens` API endpoint - **Added** new tools: - `get_token` - Get detailed token information using `/tokens/{address}-{chain}` endpoint - `get_price` - Get token prices using `/tokens/price` endpoint - `get_risk` - Get token risk analysis using `/contracts/{address}-{chain}` endpoint ### Implementation The implementation uses the `ave.http.api_get` and `ave.http.api_post` functions from the `ave-cloud-skill` library directly, with environment variables set from the application's settings. ### Tool Descriptions | Tool | Description | |------|-------------| | `search_tokens(keyword, limit)` | Search for tokens by keyword on BSC | | `get_token(address, chain)` | Get detailed token info (price, market cap, pairs) | | `get_price(token_ids)` | Get current prices for multiple tokens | | `get_risk(address, chain)` | Get risk/honeypot analysis for a token | ### Dependencies - Must be done before building slash command help system - Priority: HIGH - Sponsor requirement
shoko added 1 commit 2026-04-13 11:55:44 +02:00
- Add ave-cloud-skill as git submodule
- Create symlink for Python import at src/backend/app/ave
- Replace search_tokens with new library-based implementation
- Add get_token, get_price, get_risk tools using ave-cloud-skill library
- Update TOOLS array and SYSTEM_PROMPT_WITH_TOOLS

Implements issue #56
First-time contributor

rather than copying the code from ave cloud skills, is it possible to call them directly? for example in the data-rest SKILL.md said to use this script python scripts/ave_data_rest.py trending --chain <chain> [--page 0] [--page-size 20] to get trending tokens. so can we from the tool spec just call this python script instead of copying the code from ave_data_rest.py to the conversation python script?

rather than copying the code from ave cloud skills, is it possible to call them directly? for example in the data-rest SKILL.md said to use this script `python scripts/ave_data_rest.py trending --chain <chain> [--page 0] [--page-size 20]` to get trending tokens. so can we from the tool spec just call this python script instead of copying the code from ave_data_rest.py to the conversation python script?
shoko added 1 commit 2026-04-13 12:24:50 +02:00
Instead of importing library functions directly, now calling the
ave_data_rest.py CLI script via subprocess. This follows the
recommended approach from the SKILL.md documentation.

Changes:
- Add _call_ave_script helper method for subprocess calls
- Update search_tokens, get_token, get_price, get_risk to use CLI
- Set AVE_USE_DOCKER=false to run scripts directly without Docker
- Remove direct imports of ave.http module
shoko added 2 commits 2026-04-13 14:53:55 +02:00
- Add subprocess-based AVE Cloud Skills CLI integration for token data
- Add new tools: search_tokens, get_token, get_price, get_risk, get_trending
- Add get_trending tool for trending tokens on BSC
- Replace direct API calls with CLI subprocess calls

Bug fixes:
- Fix repo_root path calculation (5 → 6 dirname() calls)
- Handle API response where data is a list instead of dict
- Add defensive type checking for all API responses
- Handle string values in market_cap and volume formatting
- Handle None values before calling len()
- Handle nested token data structure (data.token) and alternative field names
- Handle integer/bool types for honeypot check (1/0 vs true/false)
- Handle -1 as unknown for honeypot status
- Show raw API response for debugging when data is missing
han approved these changes 2026-04-13 14:55:29 +02:00
han left a comment
First-time contributor

lgtm

lgtm
shoko merged commit 7e03101e7b into main 2026-04-13 14:56:33 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/randebu#58