Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions skills/agentfx/skill.json
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 }
}
}
Comment on lines +45 to +56

Copy link
Copy Markdown

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_data and create_bot_quote both require mint, but Line 45-56 only send wallet and 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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"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 }
}
}
"request_body": {
"wallet": { "type": "string", "required": true },
"mint": { "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 }
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentfx/skill.json` around lines 45 - 56, Add an explicit market
identifier to the start_bot_loop request schema so the backend can trade a
specific asset deterministically. Update the request_body in skill.json to
require a mint (or equivalent market identifier) alongside wallet and strategy,
and make sure the schema aligns with the inputs expected by get_market_data and
create_bot_quote. Verify any callers of start_bot_loop are updated to pass the
new field consistently.

}
},
{
"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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

stop_bot_loop needs a loop selector.

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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"name": "stop_bot_loop",
"description": "Triggers immediate teardown of the active on-chain trading loop.",
"path": "/bot/stop",
"method": "POST"
"name": "stop_bot_loop",
"description": "Triggers immediate teardown of the active on-chain trading loop.",
"path": "/bot/stop",
"method": "POST",
"request_body": {
"wallet": { "type": "string", "required": true }
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentfx/skill.json` around lines 60 - 63, The stop_bot_loop endpoint
is missing a selector to identify which running loop to stop, while the start
flow already scopes by wallet; update the skill definition in stop_bot_loop to
include the same loop identity (for example wallet or another unique loop key)
in its parameters or request body so the backend can target the correct bot
instance. Use the existing stop_bot_loop and start-loop contract entries in
skill.json as the place to align the request shape and make the stop action
unambiguous.

}
],
"streams": {
"websocket_url": "wss://pumpportal.fun/api/data",
"subscriptions": [
"subscribeNewToken",
"subscribeTokenTrade"
]
}
}