ZapBot is the default runtime agent used by DZapSDK.
It is not a chatbot. It is a deterministic NLP pipeline wired to DeFi execution primitives.
What the NLP Engine does
| Category | Examples |
|---|
| Read | balances, prices, pools, docs retrieval, search |
| Plan | token resolution, route/calldata generation |
| Execute | session-gated zap execution and chain switching |
| Track | structured step logs and session history snapshots |
NLP pipeline
User prompt
→ Tokenization & normalization
→ Intent classification
→ Entity extraction (tokens, amounts, chains, addresses)
→ Ambiguity resolution
→ Tool selection & orchestration
→ Structured result
Supported intent types
| Intent | Example prompt |
|---|
| Swap | ”Swap 100 USDC for WETH on Arbitrum” |
| Bridge | ”Move 0.5 ETH from Base to Optimism” |
| Balance check | ”What’s my USDC balance across all chains?” |
| Price lookup | ”What’s the current price of stETH?” |
| Route discovery | ”Find the best route to zap into the ETH/USDC pool” |
| Portfolio summary | ”Show me my full portfolio breakdown” |
The engine identifies and resolves the following entity types from natural language:
| Entity | Examples |
|---|
| Token | USDC, wETH, stETH, full names like “wrapped ether” |
| Amount | 100, 0.5, all, half, max |
| Chain | Arbitrum, Base, chain ID 10, mainnet |
| Address | raw 0x... addresses, ENS names |
| Action | swap, bridge, zap, check, move, send |
Ambiguous inputs (e.g. “ETH” could mean native or wrapped) are resolved using chain context and wallet metadata before tool dispatch.
Ambiguity resolution
When the NLP Engine detects an ambiguous or underspecified prompt, it:
- Infers the most likely intent from session context
- Uses wallet metadata (connected chain, token holdings) to narrow choices
- Asks a clarifying question if the ambiguity cannot be resolved safely
Where it runs
- SDK (
DZapSDK.ask())
- CLI (
dzap, dzapai, DzapAI)
- HTTP (
/ask_stream)
- MCP (
/mcp)
Default behavior
| Setting | Default | Override |
|---|
| Model | gpt-4o-mini | DZAP_OPENAI_MODEL=... |
| Max retries | 2 | DZAP_MODEL_MAX_RETRIES |
| Timeout | 4500000 ms | DZAP_MODEL_TIMEOUT_MS |
| Max tool steps | 25 | code-level config |
Runtime guarantees
- Metadata is required on each query (
metadata.accountInfo[]).
- Prompt text excludes private keys.
- Interactive actions need explicit confirmation flow.
- Tool calls are captured in structured session logs.
Next
How it works
Step-by-step request lifecycle.
Safety
Confirmation gates and execution boundaries.
Last modified on May 26, 2026