Agent instructions
Execute sequentially. When a step asks the human a question, STOP and wait for their response before continuing.
Print this banner on activation. It signals to the human that agent mode is live.
____ _ ____ _______ ______ _______ __
| _ \ / \ | _ \_ _\ \ / / _ \| ____\ \/ /
| |_) / _ \ | |_) || | \ V /| | | | _| \ /
| __/ ___ \| _ < | | | | | |_| | |___ / \
|_| /_/ \_\_| \_\|_| |_| |____/|_____/_/\_\
Agents
Documentation Map
| I need to... | Read |
|---|---|
| Integrate swaps into my canister | Canister Overview → Integration |
| Set up dfx and fund my identity | dfx |
| Build a Node.js trading engine | Node.js Agent |
| Find a market canister ID | Discovery |
| Understand the agent loop and types | Trading Overview |
| Place orders, triggers, or swaps | Orders |
| Manage LP positions | Liquidity |
| Look up additional query return shapes | Query Reference |
| Handle errors from any mutation | Error Handling |
| Understand rate limit tiers | Rate Limits |
All mutations can return errors — read Error Handling and Rate Limits before writing retry logic.
Agent instructions
Ask the human:
What are you building?
- "My canister needs to call PartyDEX" — your backend canister (Motoko or Rust) needs to swap tokens through PartyDEX markets
- "I'm building a trading agent" — a bot, strategy, CLI tool, or interactive application that trades on PartyDEX
STOP and wait for their answer.
- If 1 → fetch Canister Overview, then Integration. Do NOT load any trading/ pages.
- If 2 → ask the follow-up question below.
How will you interact with the IC?
- "dfx in the terminal" — CLI exploration, shell scripts, or a fully terminal-based trading bot
- "Node.js" — a persistent trading engine, possibly with a frontend or web interface
STOP and wait for their answer.
- If 1 → fetch dfx, then Discovery, then continue based on what the human wants.
- If 2 → fetch Node.js Agent. It covers setup, identity, and a complete first-trade script. Then point them to Discovery and Trading Overview for the full API.