Core loop
The response includes:
result.finalText: user-facing answer
result.steps: step-by-step tool events
result.sessionId: memory and confirmation scope
Multi-turn context
With a stable sessionId, each turn carries forward:
- Previously resolved token/chain entities
- Wallet and balance context
- User preferences stated earlier in the session
Use a new sessionId to reset context and start a fresh conversation.
Tool choice is influenced by:
- Prompt clarity
- Available metadata (wallet, chain, account)
- Tool schemas and descriptions
- System prompt constraints
Error handling
SDKTool returns normalized error details with durations.
Model retries are bounded by DZAP_MODEL_MAX_RETRIES (default 2).
Streaming
sdk.ask() can stream intermediate NLP and tool events:
Memory behavior
Each turn is tied to a sessionId. Reuse it for multi-turn context, or start a new one to isolate conversations.Last modified on May 26, 2026