automation
Senpi Trading Runtime: The Contract Every Agent Needs
Learn how the senpi-trading-runtime skill helps AI agents verify Senpi strategy wiring, scan contracts, and DSL stop-loss protection on Hyperliquid.
Where this fits
You have a Senpi trading agent on Hyperliquid that uses runtime.yaml to point at a Python module exporting scan(inputs, ctx). The runtime supervises the strategy and calls it every interval, but you are not sure whether open positions are actually protected by a DSL trailing-stop exit. This skill is the canonical contract that explains how the runtime behaves, so an agent can audit config, debug exits, and stop guessing about execution ownership.
Why agents benefit
- Reads and validates
runtime.yaml: checks that the strategy module exists and exports a callablescan(inputs, ctx). - Enforces ownership boundaries: the strategy only produces signals; the runtime owns execution, risk guard-rails, and two-phase DSL trailing-stop exits.
- Audits live positions: can inspect whether a position has a working stop-loss in the DSL exit engine and flag unprotected trades.
- Disambiguates
ctxandexternal_scannerbehavior so the agent does not invent runtime semantics. - Points to the correct lifecycle skill — author, ops, discover — instead of mixing build/install concerns into a runtime question.
Practical scenarios
Auditing a position after a missed exit
A user asks, "Why didn't my trailing stop fire?" The agent loads this skill, reads the DSL exit-engine section, and checks that the position's stop-loss is actually registered in the runtime. It identifies gaps, such as a signal-only strategy that assumed the runtime would manage stops.
Scaffolding a new runtime.yaml
An agent is asked to wire a newly authored strategy into the runtime. With this skill, it can generate a correct runtime.yaml, point it at the Python module, and confirm the scan(inputs, ctx) signature matches the versioned contract.
Resolving external_scanner confusion
Another internal skill mentions external_scanner. The agent needs to know how the runtime invokes it and what ctx carries. Instead of guessing, it uses the canonical description in this skill and avoids recommending unsupported configuration.
Add it to your agent workflow
Install the skill with:
npx skills add Senpi-ai/senpi-skills --skill senpi-trading-runtime
Then add a short instruction to your agent:
When asked about Senpi runtime behavior or DSL exits, read the
senpi-trading-runtime skill before answering.
A minimal example the agent can reason about:
strategy:
module: strategies/my_strategy.py
interval: 1m
The agent now knows the module must export scan(inputs, ctx), and that the runtime — not the strategy — is responsible for execution and stop-loss management.
Compare before adopting
Compare senpi-trading-runtime with senpi-strategy-author, senpi-strategy-ops, and senpi-strategy-discover when picking a skill for a task. Check quality signals: version 4.0.0, Apache-2.0 license, clear scope, and an explicit "NOT for" section. Also consider maintenance freshness and whether the skill is kept current with @senpi-ai/runtime. For non-Senpi setups, this skill is not the right fit; it is specific to Senpi on Hyperliquid.
Why it is worth tracking
The skill has 119 GitHub stars, is part of the Senpi lifecycle family, and is the shared contract the other skills reference. That makes it a high-value checkpoint for any agent working on Senpi trading infrastructure; a wrong assumption about the runtime can cause real financial risk. Track it if you are building on Hyperliquid and Senpi strategies. You can also track changes to this skill's README via its OpenAgentSkill listing: https://www.openagentskill.com/skills/senpi-ai-senpi-trading-runtime
Featured Skill
senpi-trading-runtime
Skill by Senpi-ai