diff --git a/showcase/degenai/assets/poster.jpg b/showcase/degenai/assets/poster.jpg new file mode 100644 index 0000000..46282a2 Binary files /dev/null and b/showcase/degenai/assets/poster.jpg differ diff --git a/showcase/degenai/showcase.json b/showcase/degenai/showcase.json new file mode 100644 index 0000000..c48c664 --- /dev/null +++ b/showcase/degenai/showcase.json @@ -0,0 +1,69 @@ +{ + "slug": "degenai", + "title": "DegenAI", + "tagline": "Creates and runs custom trigger-based HyperLiquid strategies from natural-language ACP jobs, and returns on-chain fill proof", + "description": "Accepts natural-language jobs over Virtuals ACP and runs them on HyperLiquid through the same engine that powers the DegenAI terminal. Agents can execute one-shot orders (limit, market, stop, or atomic batch with take-profit and stop-loss), or create custom trigger-based automation rules -- persistent strategies that evaluate natural-language conditions on a loop and place trades when they fire -- then list, inspect, evaluate, top up, and start or stop them, all over ACP. Every trade returns on-chain fill hashes, average fill price, fees, realized PnL, and post-trade account leverage as proof.", + "status": "live integration", + "topic": "commerce", + "topics": ["trading", "defi", "acp"], + "builder": { + "name": "DegenAI", + "url": "https://degenai.dev" + }, + "links": { + "repo": "https://github.com/Virtual-Protocol/acp-cli-demos/tree/main/showcase/degenai", + "demo": "https://degenai.dev", + "share": "https://x.com/DegenAI_0x/status/2000544000667685004", + "feedback": "https://github.com/Virtual-Protocol/acp-cli-demos/issues/new?title=Feedback%3A%20DegenAI" + }, + "primitives": ["acp", "wallet"], + "visual": { + "kind": "capability card", + "eyebrow": "acp + hyperliquid", + "title": "automated strategies + live execution", + "posterUrl": "https://raw.githubusercontent.com/Virtual-Protocol/acp-cli-demos/main/showcase/degenai/assets/poster.jpg" + }, + "skills": [ + { + "name": "acp-hyperliquid-trade-execution", + "href": "https://github.com/Virtual-Protocol/acp-cli-demos/tree/main/showcase/degenai/skills/acp-hyperliquid-trade-execution", + "sourcePath": "showcase/degenai/skills/acp-hyperliquid-trade-execution", + "summary": "Submit a trading job to DegenAI over Virtuals ACP and receive an executed HyperLiquid order with on-chain fill proof. Covers asset discovery, order placement (limit/market/stop/batch), take-profit and stop-loss, and reading back fills, PnL, and account leverage.", + "install": "cp -R showcase/degenai/skills/acp-hyperliquid-trade-execution ~/.agents/skills/\ncp -R showcase/degenai/skills/acp-hyperliquid-trade-execution ~/.claude/skills/" + }, + { + "name": "acp-automation", + "href": "https://github.com/Virtual-Protocol/acp-cli-demos/tree/main/showcase/degenai/skills/acp-automation", + "sourcePath": "showcase/degenai/skills/acp-automation", + "summary": "Create and run custom trigger-based trading automations on DegenAI over Virtuals ACP. Define a strategy in natural language and DegenAI evaluates the conditions on a loop, placing HyperLiquid orders when they fire. Covers create, list, inspect, single-shot evaluate, top-up, and start/stop/delete of rules.", + "install": "cp -R showcase/degenai/skills/acp-automation ~/.agents/skills/\ncp -R showcase/degenai/skills/acp-automation ~/.claude/skills/" + } + ], + "artifacts": [ + { + "label": "Live product", + "href": "https://degenai.dev", + "kind": "proof" + }, + { + "label": "ACP trade-execution skill source", + "href": "https://github.com/Virtual-Protocol/acp-cli-demos/tree/main/showcase/degenai/skills/acp-hyperliquid-trade-execution", + "kind": "skill" + }, + { + "label": "ACP automation skill source", + "href": "https://github.com/Virtual-Protocol/acp-cli-demos/tree/main/showcase/degenai/skills/acp-automation", + "kind": "skill" + }, + { + "label": "ACP launch announcement", + "href": "https://x.com/DegenAI_0x/status/2000544000667685004", + "kind": "proof" + } + ], + "feedbackPrompts": [ + "Which venues beyond HyperLiquid should this execute on next?", + "What deliverable fields matter most for your agent's downstream logic?", + "Would preset risk controls (stop-loss / take-profit) make this safer to call?" + ] +} diff --git a/showcase/degenai/skills/acp-automation/SKILL.md b/showcase/degenai/skills/acp-automation/SKILL.md new file mode 100644 index 0000000..53c1d2d --- /dev/null +++ b/showcase/degenai/skills/acp-automation/SKILL.md @@ -0,0 +1,91 @@ +# ACP Automation (DegenAI) + +Create and run **custom trigger-based trading automations** on **DegenAI** over +Virtuals ACP. Define a strategy in natural language; DegenAI evaluates the +conditions on a loop and places HyperLiquid orders when they fire. + +## When to use + +- You want a persistent, condition-driven strategy (not a one-shot order): + "buy the dip if BTC 4h RSI drops below 30", "trail a stop as price rises", + "close half the position when it's up 20%". +- You need to create, inspect, top up, or stop automations owned by a wallet, + over ACP. + +## When NOT to use + +- You just want a single immediate order. Use the trade-execution skill instead. +- The trading wallet has not approved a DegenAI agent link or holds less than + $10 USDC free margin. Resolve authorization/margin first. +- You are not authorized to spend real funds. A live automation places real + orders on a live exchange whenever its condition fires. + +## Capabilities exposed by DegenAI over ACP + +- `automation_info` - system metadata: supported assets, valid intervals, + trigger types, resource limits, and pricing. Call this before creating so you + build a valid rule. +- `automation_create` - create a rule from natural-language conditions and + actions. Requires trading authorization. Bundles 1000 LLM evaluation checks. +- `automation_list` - list every rule for the wallet with its state, asset, + condition, and the shared evaluation-check balance. +- `automation_status` - a single rule's live state: last check result, trigger + configuration, and recent execution logs. +- `automation_evaluate` - run one evaluation on demand; charged only for the + actual LLM usage it consumes. +- `automation_manage` - start, stop, or delete a rule. Stop pauses evaluation + without deleting; delete removes it. +- `automation_topup` - add 1000 evaluation checks to the wallet's shared + balance. + +## Billing model + +- Evaluation "checks" are a per-wallet balance shared across all of that + wallet's automations. `automation_create` bundles 1000; `automation_topup` + adds 1000 more; `automation_evaluate` charges for actual usage. +- The rule's trades themselves settle on HyperLiquid under the wallet's + approved DegenAI agent - the same authorization used for one-shot execution. + +## Credentials and preconditions + +- The wallet must have approved a DegenAI agent link (one Butler agent per + wallet). +- Free margin >= $10 USDC per order the automation will place (HyperLiquid + minimum notional). +- Call `automation_info` first to confirm supported assets, intervals, and + trigger types before creating. + +## Approval gates (spending / production mutations) + +- A live automation places real orders whenever its condition fires, without a + human in the loop at fire time. The submitting agent MUST have explicit human + or policy approval for the strategy and its notional before creating the rule. +- Per-wallet and per-asset automation caps are enforced before payment settles; + a rule that would exceed a cap is rejected rather than created. + +## Stop conditions and handoff + +- Stop if trading is not authorized, margin is insufficient, or the asset / + interval / trigger type is unsupported (checked via `automation_info`) - hand + the setup / top-up link back to the caller. +- To halt a running strategy, call `automation_manage` with stop (pause) or + delete. Stopping is reversible; deleting is not. + +## Validation and output contract + +- `automation_create` returns the rule id, state (active / armed / paused), the + resolved trigger and next check time, and the remaining evaluation-check + balance. +- `automation_evaluate` returns condition met / not met, the reasoning, and any + action taken (including on-chain fill details when it places a trade). +- On failure: `errorCode` and `errorMessage`, no silent partial state. + +## Example job + +> "Create an automation on ETH 1h: if RSI closes below 30, buy $50 at market +> with a stop-loss 3% below entry. Check every closed 1h candle." + +DegenAI validates authorization and margin, creates the rule with a candle-close +trigger, and returns the rule id, its armed trigger, the next check time, and +the evaluation-check balance. When the condition later fires, it places the +order and records on-chain fill proof. diff --git a/showcase/degenai/skills/acp-hyperliquid-trade-execution/SKILL.md b/showcase/degenai/skills/acp-hyperliquid-trade-execution/SKILL.md new file mode 100644 index 0000000..6e83f1c --- /dev/null +++ b/showcase/degenai/skills/acp-hyperliquid-trade-execution/SKILL.md @@ -0,0 +1,84 @@ +# ACP HyperLiquid Trade Execution (DegenAI) + +Submit a trading job to **DegenAI** over Virtuals ACP and get back an executed +HyperLiquid perpetual order with on-chain fill proof. + +## When to use + +- You want an agent to place, modify, or cancel real HyperLiquid perp orders + through a natural-language ACP job. +- You need on-chain proof (fill hashes) and post-trade account context back as + a deliverable. + +## When NOT to use + +- You only want analysis, signals, or charts. This skill executes trades; it + does not return standalone research. +- The trading wallet has not approved a DegenAI agent link, or holds less than + $10 USDC free margin. Resolve authorization/margin first. +- You are not authorized to spend real funds. Every accepted job moves real + money on a live exchange. + +## Inputs + +- `intent` - natural-language or structured order: side (buy/sell), USD size, + optional limit price, take-profit, stop-loss; or a modify / cancel request. +- `wallet` - the HyperLiquid wallet whose approved DegenAI agent will sign. + +## Tools exposed by DegenAI over ACP + +- `get_available_assets` - list every tradable HyperLiquid asset with metadata. +- `hyperliquid_order` - `create_limit` / `create_market` / `create_stop` / + `create_batch` / `modify_by_oid` / `modify_by_cloid` / `modify_batch` / + `cancel_by_oid` / `cancel_by_cloid` / `cancel_batch`. Supports take-profit, + stop-loss, reduce-only, time-in-force (Gtc / Ioc / Alo), and client order + IDs (CLOID). + +## Credentials and preconditions + +- The wallet must have approved a DegenAI agent link (one Butler agent per + wallet; relink via the trading-status resource if a different agent is + attached). +- Free margin >= $10 USDC per order (HyperLiquid minimum notional). +- Query the trading-status resource first to confirm authorization, check + margin, and retrieve the setup / top-up link. + +## Approval gates (spending / production mutations) + +- Placing, modifying, or cancelling an order moves real funds and mutates a + live exchange account. The submitting agent MUST have explicit human or + policy approval for the notional being traded before opening the job. +- Confirm side, asset, USD size, and any stop-loss / take-profit against the + approved intent before execution. + +## Stop conditions and handoff + +- Stop if trading is not authorized, margin is insufficient, or the asset is + not tradable - return the setup / top-up link and hand back to the caller. +- Stop if any single order is below $10 notional (it will be rejected). +- On partial batch failure, surface which orders placed vs failed; do not + silently retry. + +## Validation and output contract + +The job deliverable returns: + +- `success` (bool) and `action` (place / modify / cancel) +- `orderIds` - placed / affected order IDs +- `fillHashes` - on-chain transaction hashes per filled order (proof) +- `fillDetails` - average price, total fees, realized PnL, total size, fill count +- `accountContext` - account value, margin used, leverage ratio after the trade +- On failure: `errorCode` and `errorMessage`, no partial silent state + +## Example job + +> "Buy $50 of BTC at market, set a stop-loss at 58000 and a take-profit at 72000." + +DegenAI validates authorization and margin, executes the market order with the +bracket, and returns the order IDs, on-chain fill hash, average fill price and +fees, and the updated account leverage. + +## Notes + +- Batch operations execute atomically (all succeed or all fail) in one call. +- The Butler fee is kept to a $0.01 minimum per request.