Skills#
Beyond simply "retrieving documentation," Skills encapsulate domain knowledge and engineering workflows into stable capabilities.
They enable the Agent not only to answer "how to write the docs," but also to handle "which endpoint to choose, what the next step is, and how to deal with errors."
Why OnchainOS Trade Skills for AI#
- Covers the full DEX swap lifecycle: supported chains → liquidity sources → approve → quote → swap → sign → broadcast.
- Provides an Intent Router: maps user instructions ("swap 0.1 ETH for USDC", "get me a quote for 500 USDT → SOL", "what DEXs are available on Arbitrum?") to the correct API and the appropriate first action.
- Plug-and-play for AI agents: structured, framework-agnostic capability modules that directly encapsulate the OKX DEX API for AI Agents. Each Skill corresponds to a specific capability (e.g., generating transaction execution data, fetching quotes, querying token information) and defines clear input/output schemas, enabling seamless integration into any Agent architecture.
Quickstart#
skills:npx skills add okx/onchainos-skills
Example interactions#
Once the Skills is uploaded to your agent, an Agent can respond to natural-language instructions like:
What chains support DEX swaps?
# Call dex-aggregator-supported-chains
Which DEXs are available on X-layer?
# Call dex-liquidity
How much USDC will I get for 1 ETH on X-layer?
# Call dex-quote
I need to approve USDT before swapping, generate the calldata
# Call dex-approve-transaction
Build a swap transaction: 100 USDT → ETH, wallet 0xd8dA..., slippage 0.5%
# Call dex-swap
Swap 2 SOL for USDC on Solana, wallet DYw8...
# Call dex-solana-swap-instruction
Sisällysluettelo
