Run Your First AI Agent#
Give your AI agent onchain capabilities — check prices, query market data — through natural language.
Preparation: Have an AI Agent#
This guide uses Claude Code, but OnchainOS supports all major agents. (Cursor, OpenClaw, etc.)
Step 1: Add OnchainOS to Your Agent#
Tell your agent:
Install OnchainOS skills by running: npx skills add okx/onchainos-skills
Important: Use the skill directory that belongs to the current agent.Your agent will install the skills automatically. Click the GitHub link for more information.
Step 2: Try It Out!#
Ask your agent:
What is the current price of OKB?Your agent will return something like:
OKB is currently trading at $80.34.Step 3: Set Up Your Own API Keys#
The built-in sandbox keys are for testing only and may be subject to rate limits. For stable production usage, set up your own API credentials:
- Go to the OKX Developer Portal.
- Generate your API Key, Secret Key, and Passphrase.
Tell your agent:
Create a .env file with these variables: OKX_API_KEY, OKX_SECRET_KEY, and OKX_PASSPHRASE. Add .env to .gitignore.
And open it, tell me what to do next, and remind me to save after I filled out the passkeys.Your agent will create the file and open it — paste your keys there.
Never commit .env to git (add it to .gitignore) and never expose these
credentials in logs, screenshots, or chat messages
Your agent is now onchain — start exploring!
Having Trouble?#
If something went wrong, try following the full installation guide: