Skip to main content
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

CategoryExamples
Readbalances, prices, pools, docs retrieval, search
Plantoken resolution, route/calldata generation
Executesession-gated zap execution and chain switching
Trackstructured 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

IntentExample 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”

Entity extraction

The engine identifies and resolves the following entity types from natural language:
EntityExamples
TokenUSDC, wETH, stETH, full names like “wrapped ether”
Amount100, 0.5, all, half, max
ChainArbitrum, Base, chain ID 10, mainnet
Addressraw 0x... addresses, ENS names
Actionswap, 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:
  1. Infers the most likely intent from session context
  2. Uses wallet metadata (connected chain, token holdings) to narrow choices
  3. 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

SettingDefaultOverride
Modelgpt-4o-miniDZAP_OPENAI_MODEL=...
Max retries2DZAP_MODEL_MAX_RETRIES
Timeout4500000 msDZAP_MODEL_TIMEOUT_MS
Max tool steps25code-level config

Runtime guarantees

  1. Metadata is required on each query (metadata.accountInfo[]).
  2. Prompt text excludes private keys.
  3. Interactive actions need explicit confirmation flow.
  4. 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