Skip to Content
MindedDocsGet started

Prompts and replies

Send Minded a prompt, then read its reply as it streams.

Send Minded a prompt with send_prompt. Read the reply with read_chat. Both are tools on Minded's MCP server, https://mcp.minded.com.

The chat in Minded

A prompt sent with a key becomes a normal Minded chat.

  • It shows in your Recents with the mark of the tool that sent it (Claude, ChatGPT, Codex, GitHub Copilot or Gemini), read from the call: an MCP client's name, or the HTTP user agent. Any other tool shows the API mark.
  • Its first message is yours, with the key's name as its source (for example Claude Code).
  • Roles, approvals and usage apply as in any chat. Minded works as you, with your role.
  • The key's Recent usage on Settings › Integrations › API keys lists each call it made, with the chat it reached.
  • The Usage page counts the chat under Chats, like any chat.

You can carry on in either place. A follow-up typed in Minded and another prompt sent to the same chat from Claude land in the order sent, and each is answered.

send_prompt

Starts a chat, or adds a prompt to a chat you already have. Needs Chats: Read and write. It is marked as a write, so Claude and ChatGPT may ask you before calling it.

Input
texttext, requiredWhat you want Minded to do, up to 100,000 characters
chatIdtext, optionalA chat to add the prompt to. Leave it out to start a new chat
clientIdtext, requiredYour own id for this prompt, new for each prompt. Sent again after a lost reply, the same prompt lands once
Returns
chatIdThe chat the prompt went to. Pass it to read_chat, answer_question and read_usage
seqWhere your prompt sits in the chat
openA link that opens the chat in Minded

When no usage is left, the prompt is refused with a link to Billing and no chat is made (Errors).

read_chat

Reads the chat from where you last stopped: Minded's reply, any question it asks, and whether it is still working. Needs Chats: Read only.

Input
chatIdtext, requiredThe chat to read
afterSeqnumber, optionalThe nextAfterSeq from your last read. Leave it out (or pass 0) to read the whole chat
waitSecondsnumber, optionalThe longest to wait for Minded to finish before returning, 0 to 50. Leave it out to wait 50 seconds
Returns
statusWhere the chat stands (below)
nextAfterSeqWhere this read stopped. Pass it as afterSeq next time
messagesWhat came after afterSeq, in order (below)
openA link that opens the chat in Minded

Each message has a seq and one of three shapes:

  • A message: from (you or minded) and text.
  • A question or an approval Minded asks: from: "minded", its waitId, question, choices and questions (Questions and approvals).
  • A turn that stopped before it was done: stopped, with why (below).
statusMeans
workingMinded is still writing, or there is more to read. Read again
waiting_for_answerMinded asked a question or needs an approval
idleNothing more to do: the reply is complete, or the turn stopped
stoppedMeans
stopped_out_of_usageNo usage was left
stopped_conversation_limitThe chat reached its conversation limit
errorMinded could not run
interruptedSomeone pressed Stop in the Minded chat
prompt_declinedMinded declined the prompt before it ran
stopped_suspiciousMinded stopped the turn at a step that could send data out

Stop waiting, read the rest later

How long to wait is your call. Stop waiting whenever you like. Minded keeps working in the Minded chat.

Read again with the nextAfterSeq you last got as afterSeq. You get the rest of the chat, from where you stopped, with no part twice. A long piece of work (building an agent can take minutes) is safe to check on later.

Stopping in Claude or ChatGPT only stops waiting. To stop Minded's work, press Stop in the Minded chat.

// Check back on a chat started earlier, and print only what is new.
const result = await minded.callTool({
  name: 'read_chat',
  arguments: { chatId: savedChatId, afterSeq: savedAfterSeq, waitSeconds: 30 },
});
const read = JSON.parse(result.content[0].text);
for (const message of read.messages) if (message.from === 'minded' && message.text) console.log(message.text);
saveAfterSeq(read.nextAfterSeq);
if (read.status === 'waiting_for_answer') askTheMember(read.messages.find((message) => message.waitId));

minded here is the MCP client from the Quickstart.

Over HTTP

The same actions are HTTP routes at https://app.minded.com/v1, JSON in and out, with the key as Authorization: Bearer. They take the same inputs and need the same access as the tools.

RouteWhat it does
POST /chatsStarts a chat: text and clientId. Returns chatId and seq
POST /chats/{chatId}/messagesSends a prompt in a chat: text and clientId
GET /chats/{chatId}/framesReads the chat after afterSeq, waiting up to waitSeconds. Returns frames, lastSeq and status
GET /chats/{chatId}/streamEvery frame after afterSeq, then each new one as it lands, as server-sent events
POST /chats/{chatId}/answersAnswers a question: waitId, answer or answers, and clientId
GET /chats/{chatId}/wake-upsThe chat's wake-ups still waiting, soonest first
DELETE /chats/{chatId}/wake-ups/{wakeUpId}Cancels a waiting wake-up, as Cancel on it in the chat does
GET /usageYour usage, and a chat's spend with chatId
# A new clientId for each prompt; send the same one again only to retry after a lost reply.
CLIENT_ID=$(uuidgen)
curl https://app.minded.com/v1/chats \
  -H "Authorization: Bearer $MINDED_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{ \"text\": \"Write the weekly support summary.\", \"clientId\": \"$CLIENT_ID\" }"