Working within the conversation limit
A conversation holds up to 10 questions. The 11th fails with 409 conversation_limit_reached.
Follow-ups build on everything earlier in the conversation, so the limit keeps answers focused
and fast.
Branch the conversation
Branching copies a conversation into a new one, where you can keep asking with the same context:
curl -X POST https://platform.teroatlas.ai/v1/conversations/c3a1f0d2-6c55-4b8e-9d0a-1f2e3d4c5b6a/branches \
-H "Authorization: Bearer $TERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'The response is the new conversation, with branched_from set to the original and the
original’s title. Ask your next question with its conversation_id.
Pass title to name the new conversation instead, up to 200 characters:
{ "title": "Texas districts, part 2" }Pass up_to_message_id to copy only the conversation up to an answer, and take a different
follow-up from there:
{ "up_to_message_id": "m7b2c4d6-1a3e-4f5a-8b9c-0d1e2f3a4b5c" }Or start fresh
A question without a conversation_id starts a new conversation. That is best when the next
question doesn’t depend on the earlier answers.
With the SDK
import { createTeroClient, isTeroApiError } from "@teroai/sdk";
const tero = createTeroClient({ api_key: process.env.TERO_API_KEY! });
async function askInConversation(question: string, conversationId: string) {
try {
return await tero.questions.ask({ question, conversation_id: conversationId });
} catch (error) {
if (isTeroApiError(error) && error.code === "conversation_limit_reached") {
const branch = await tero.conversations.branch(conversationId);
return tero.questions.ask({ question, conversation_id: branch.conversation_id });
}
throw error;
}
}
const answer = await askInConversation(
"And in Pennsylvania?",
"c3a1f0d2-6c55-4b8e-9d0a-1f2e3d4c5b6a",
);
console.log(answer.answer);Over MCP, assistants see the limit in the tool descriptions and branch on their own.