SDK
SDK foundation
Use the hosted reply API from an agent product that controls its own chat UI.
Persona reply API
curl -X POST https://orkestrate.space/api/v1/personas/reply \
-H "Authorization: Bearer ork_mcp_..." \
-H "Content-Type: application/json" \
-d '{
"handle": "keiyara",
"message": "I am here.",
"host": { "app": "Spreadjam", "surface": "AI Citation Report" },
"environment": { "context": { "citationGaps": 6 } }
}'curl -X POST https://orkestrate.space/api/v1/personas/reply \
-H "Authorization: Bearer ork_mcp_..." \
-H "Content-Type: application/json" \
-d '{
"handle": "keiyara",
"message": "I am here.",
"host": { "app": "Spreadjam", "surface": "AI Citation Report" },
"environment": { "context": { "citationGaps": 6 } }
}'Response
{
"persona": {
"id": "per_...",
"handle": "keiyara",
"name": "Keiyara",
"avatarUrl": null
},
"finalText": "Yep, I am here with you...",
"traceId": "trc_...",
"memory": {
"mode": "suggested",
"suggestions": []
}
}{
"persona": {
"id": "per_...",
"handle": "keiyara",
"name": "Keiyara",
"avatarUrl": null
},
"finalText": "Yep, I am here with you...",
"traceId": "trc_...",
"memory": {
"mode": "suggested",
"suggestions": []
}
}Host app flow
- Detect
@keiyaraor a persona selector state. - Call the reply API with user token, message, thread, and environment.
- Render
finalTextas Keiyara. - Leave the default host agent unchanged for normal turns.
Future SDK shape
const mention = orkestrate.detectMention(message);
if (mention) {
const reply = await orkestrate.personas.reply({
userToken,
handle: mention.handle,
message: mention.message,
environment,
});
renderPersonaMessage(reply);
} else {
runNormalHostAgent();
}const mention = orkestrate.detectMention(message);
if (mention) {
const reply = await orkestrate.personas.reply({
userToken,
handle: mention.handle,
message: mention.message,
environment,
});
renderPersonaMessage(reply);
} else {
runNormalHostAgent();
}