-
Notifications
You must be signed in to change notification settings - Fork 5
Create skill.json #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,73 @@ | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| "id": "agentfx-magicblock-skill", | ||||||||||||||||||||||||
| "name": "AgentFX MagicBlock Trading Skill", | ||||||||||||||||||||||||
| "version": "2.6.0", | ||||||||||||||||||||||||
| "description": "High-performance autonomous trading and telemetry skill designed for execution on low-latency Solana infrastructures.", | ||||||||||||||||||||||||
| "author": "AgentFX Protocol", | ||||||||||||||||||||||||
| "base_url": "https://agentfx.fun/api/v1", | ||||||||||||||||||||||||
| "authentication": { | ||||||||||||||||||||||||
| "type": "x402", | ||||||||||||||||||||||||
| "platform_wallet": "ArQi1jCnvFQsF2sVhGJMwx9tVedDYeGZJDWG9pN12MpX", | ||||||||||||||||||||||||
| "cost_sol": 0.01, | ||||||||||||||||||||||||
| "duration_days": 90 | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| "actions": [ | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| "name": "get_market_data", | ||||||||||||||||||||||||
| "description": "Fetch real-time state data and metrics for a specific token mint.", | ||||||||||||||||||||||||
| "path": "/market/data", | ||||||||||||||||||||||||
| "method": "GET", | ||||||||||||||||||||||||
| "parameters": { | ||||||||||||||||||||||||
| "mint": { | ||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||
| "required": true, | ||||||||||||||||||||||||
| "description": "The target token mint address on Solana." | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| "name": "create_bot_quote", | ||||||||||||||||||||||||
| "description": "Construct an optimal execution transaction payload for token swaps.", | ||||||||||||||||||||||||
| "path": "/bot/quote", | ||||||||||||||||||||||||
| "method": "POST", | ||||||||||||||||||||||||
| "request_body": { | ||||||||||||||||||||||||
| "wallet": { "type": "string", "required": true }, | ||||||||||||||||||||||||
| "side": { "type": "string", "enum": ["buy", "sell"], "required": true }, | ||||||||||||||||||||||||
| "mint": { "type": "string", "required": true }, | ||||||||||||||||||||||||
| "amount": { "type": "string", "required": true } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| "name": "start_bot_loop", | ||||||||||||||||||||||||
| "description": "Initialize a state-monitored autonomous loop with precise strategy boundaries.", | ||||||||||||||||||||||||
| "path": "/bot/start", | ||||||||||||||||||||||||
| "method": "POST", | ||||||||||||||||||||||||
| "request_body": { | ||||||||||||||||||||||||
| "wallet": { "type": "string", "required": true }, | ||||||||||||||||||||||||
| "strategy": { | ||||||||||||||||||||||||
| "type": "object", | ||||||||||||||||||||||||
| "properties": { | ||||||||||||||||||||||||
| "entryThreshold": { "type": "number", "default": 0.05 }, | ||||||||||||||||||||||||
| "exitThreshold": { "type": "number", "default": 0.1 }, | ||||||||||||||||||||||||
| "maxPositionUsd": { "type": "number", "default": 100 }, | ||||||||||||||||||||||||
| "takeProfitPct": { "type": "number", "default": 0.2 }, | ||||||||||||||||||||||||
| "stopLossPct": { "type": "number", "default": 0.1 } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| "name": "stop_bot_loop", | ||||||||||||||||||||||||
| "description": "Triggers immediate teardown of the active on-chain trading loop.", | ||||||||||||||||||||||||
| "path": "/bot/stop", | ||||||||||||||||||||||||
| "method": "POST" | ||||||||||||||||||||||||
|
Comment on lines
+60
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Line 60-63 define a stop action with no parameters or body, while Line 46 requires a wallet to start one. Unless the backend guarantees a single global loop, this contract cannot unambiguously target the running bot. Proposed fix {
"name": "stop_bot_loop",
"description": "Triggers immediate teardown of the active on-chain trading loop.",
"path": "/bot/stop",
- "method": "POST"
+ "method": "POST",
+ "request_body": {
+ "wallet": { "type": "string", "required": true }
+ }
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||
| "streams": { | ||||||||||||||||||||||||
| "websocket_url": "wss://pumpportal.fun/api/data", | ||||||||||||||||||||||||
| "subscriptions": [ | ||||||||||||||||||||||||
| "subscribeNewToken", | ||||||||||||||||||||||||
| "subscribeTokenTrade" | ||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Add an explicit market identifier to
start_bot_loop.This request schema never tells the backend what asset the loop should trade.
get_market_dataandcreate_bot_quoteboth requiremint, but Line 45-56 only sendwalletand strategy, so callers cannot start a deterministic loop for a specific market.Proposed fix
"request_body": { "wallet": { "type": "string", "required": true }, + "mint": { "type": "string", "required": true }, "strategy": { "type": "object", "properties": {📝 Committable suggestion
🤖 Prompt for AI Agents