Recompile Conversation
Manually trigger system prompt recompilation for a conversation.
ParametersExpand Collapse
conversationID: string
The conversation identifier. Can be a conversation ID (‘conv-
params: ConversationRecompileParams { dry_run, agent_id, compaction_settings }
dry_run?: boolean
Query param: If True, do not persist changes; still returns the compiled system prompt.
agent_id?: string | null
Body param: Agent ID for agent-direct mode with ‘default’ conversation. Use with conversation_id=‘default’ in the URL path.
Body param: Configuration for conversation compaction / summarization.
Per-model settings (temperature, max tokens, etc.) are derived from the default configuration for that handle.
clip_chars?: number | null
The maximum length of the summary in characters. If none, no clipping is performed.
model?: string | null
Model handle to use for sliding_window/all summarization (format: provider/model-name). If None, uses lightweight provider-specific defaults.
model_settings?: OpenAIModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 4 more } | SgLangModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 5 more } | AnthropicModelSettings { effort, max_output_tokens, parallel_tool_calls, 6 more } | 14 more | null
Optional model settings used to override defaults for the summarizer model.
OpenAIModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 4 more }
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
SgLangModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 5 more }
SGLang model configuration (OpenAI-compatible runtime with SGLang-specific parsing).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
AnthropicModelSettings { effort, max_output_tokens, parallel_tool_calls, 6 more }
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
strict?: boolean
Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas.
GoogleAIModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 3 more }
response_schema?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
GoogleVertexModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 3 more }
response_schema?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
AzureModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 2 more }
Azure OpenAI model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
XaiModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 2 more }
xAI model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
MoonshotModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 3 more }
Moonshot/Kimi model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
ZaiModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 3 more }
Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
MoonshotCodingModelSettings { effort, max_output_tokens, parallel_tool_calls, 6 more }
Kimi Code model configuration (Anthropic-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
strict?: boolean
Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas.
GroqModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 2 more }
Groq model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
DeepseekModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 2 more }
Deepseek model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
TogetherModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 2 more }
Together AI model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
BedrockModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 2 more }
AWS Bedrock model configuration.
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
OpenRouterModelSettings { max_output_tokens, parallel_tool_calls, provider_type, 2 more }
OpenRouter model configuration (OpenAI-compatible).
response_format?: TextResponseFormat { type } | JsonSchemaResponseFormat { json_schema, type } | JsonObjectResponseFormat { type } | null
Recompile Conversation
import Letta from '@letta-ai/letta-client';
const client = new Letta({
apiKey: process.env['LETTA_API_KEY'], // This is the default and can be omitted
});
const response = await client.conversations.recompile('default');
console.log(response);"string"Returns Examples
"string"