Ask your Gambit agent
ask_gambit_agentTalk to YOUR Gambit trading agent (the API key's user — requires the api:chat scope, 403 without it): market takes, analysis of your positions and recommendations, strategy discussion. Advisory only — this channel cannot execute trades or move funds. Each turn is a real agent run: it consumes your AI token quota (or runs on the user's own LLM key when they saved one in Settings) and can take 1-2 minutes, so don't call it speculatively. A done result carries data.llm (provider, model, key_source user or gambit), data.used_fallback, data.fallback_reason and data.notice: used_fallback true means the user's own key failed (fallback_reason: invalid_key, insufficient_credits, rate_limited, provider_error, model_unavailable, request_rejected) and Gambit's model answered instead — pass the notice on to the user. A reply that is ready within about 45 seconds comes back as data.status done with data.reply. A longer turn comes back as data.status running with data.conversation_id and data.asked_at: the turn keeps running and its reply is saved, so call get_conversation with wait_for_reply_after=asked_at, which returns the moment the reply lands, instead of asking again. The conversation persists server-side and continues across calls; pass new_conversation: true to start a fresh thread. To talk about one of YOUR Gambits, pass its case_id (from list_gambits): the turn goes to that Gambit's own conversation, the same thread the user sees on the Gambit in the app, and the agent answers with that Gambit in context (one thread per Gambit, so case_id cannot be combined with new_conversation). To show the agent a chart or screenshot, upload each image first (POST /api/chat/images with the raw image bytes and its Content-Type, api:chat; PNG, JPEG, WebP or GIF) and pass the returned url values as image_urls (up to 24). Read, rename or delete past conversations with list_conversations, get_conversation and manage_conversation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"message": "<message>"
},
"name": "ask_gambit_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| case_id | No | talk about this Gambit in its own conversation; a Gambit id from list_gambits (UUID) | |
| message | Yes | ||
| image_urls | No | url values returned by POST /api/chat/images | |
| new_conversation | No | start a fresh conversation instead of continuing |