API Reference
Public reference for creating agents and interacting with them over REST API. Internal context assembly, memory management, and state orchestration are platform-managed and intentionally omitted.
Authentication
All API calls require Bearer authentication with your project API key.
Authorization: Bearer YOUR_PROJECT_API_KEYREST API
Public HTTP endpoints for agent lifecycle, real-time agent interaction, and proactive delivery. Memory, mood, relationship, and context-management internals are handled by the platform.
Server-side only. The API does not accept browser requests. For web apps, proxy through your backend. See the Integration Guide.
Agent Lifecycle
/api/v1/agentsCreate a new agent. Returns the agent with a platform-generated UUID.
Parameters
namestringAgent name (required)personality_promptstringCustom system prompt (optional)big5objectBig Five scores: openness, conscientiousness, extraversion, agreeableness, neuroticism (0.0-1.0)speech_patternsstring[]Speech patterns (optional)true_interestsstring[]Agent interests (optional)project_idstringProject UUID to assign agent to (optional)languagestringISO language code, e.g. "en" (optional)Response
{ "agent_id": "uuid", "name": "...", ... }
/api/v1/agentsList agents. Filter by project_id query param.
Parameters
project_idstringFilter by project (query param, optional)Response
Array of agent objects
/api/v1/agents/{agentId}Get agent by ID.
Response
Agent object with personality, mood, profile
Chat
/api/v1/agents/{agentId}/chatChat with agent via SSE streaming. Returns Server-Sent Events.
Parameters
messagesCEChatMessage[]Conversation messagesuser_idstringUser identifierResponse
SSE stream of chat completion chunks
Proactive Notifications
/api/v1/agents/{agentId}/notificationsList pending proactive messages.
Parameters
statusstringFilter by status: pending | consumed (default: pending, query param)user_idstringFilter by user (optional, query param)limitintMax results (default: 50, max: 500, query param)Response
List of proactive messages with message_id, agent_id, user_id, check_type, intent, generated_message, status, created_at
/api/v1/agents/{agentId}/notifications/{messageId}/consumeMark a notification as consumed after delivery.
Response
Confirmation
/api/v1/agents/{agentId}/notifications/historyList all notifications across all statuses.
Response
Full notification history
Agent Lifecycle (Detailed)
CreateAgentCreates a new agent with personality configuration. Generates personality prompt, speech patterns, and emotional tendencies.
Request
user_idstringOwner user identifieragent_namestringAgent display namegenderstring"male", "female", or "non_binary"biostringAgent biography (optional)avatar_urlstringAvatar image URL (optional)big5CEBig5ScoresBig Five personality scores (0.0-1.0)languagestringPrimary languageequipped_outfitstringInitial outfit ID (optional)skillsCESkillLevel[]Initial skill levels (optional)model_tierint32LLM model tier (optional)project_idstringProject to assign agent to (optional)agent_idstringCaller-specified ID for deterministic agents (optional)personality_promptstringCustom system prompt (optional)generate_goalsboolAuto-generate goals after creation (optional)provided_goalsstring[]Store these goals directly (optional)speech_patternsstring[]Speech patterns (optional)true_interestsstring[]Agent interests (optional)true_dislikesstring[]Agent dislikes (optional)user_display_namestringOwner display name (optional)generate_avatarboolAuto-generate an AI avatar on creation (default: true, costs 1 credit). Set to false to skip.Response
agent_id (UUID), status ('completed' or 'in_progress')
GetAgentRetrieves an agent's current state including personality, mood, and profile.
Request
agent_idstringAgent UUIDResponse
Agent ID, name, bio, gender, avatar_url, Big5 scores, owner, created_at
UpdateAgentUpdates agent fields (name, bio, avatar, personality, interests, speech patterns).
Request
agent_idstringAgent UUIDnamestringNew name (optional)biostringNew bio (optional)avatar_urlstringNew avatar URL (optional)big5CEBig5ScoresUpdated Big5 scores (optional)true_interestsstring[]Updated interests (optional)true_dislikesstring[]Updated dislikes (optional)speech_patternsstring[]Updated speech patterns (optional)personality_promptstringUpdated system prompt (optional)Response
success (bool)
DeleteAgentPermanently deletes an agent and all associated data (memory, mood, relationships).
Request
agent_idstringAgent UUIDResponse
success (bool)
RegenerateAvatarGenerates or regenerates an AI-created avatar for the agent. Uses LLM to create an image prompt from personality data, then generates and uploads the image. Costs 1 credit. Avatars are auto-generated on agent creation unless disabled.
Request
agent_idstringAgent UUID (URL param)stylestringOptional style hint (e.g. 'watercolor anime', 'realistic portrait')Response
success (bool), avatar_url (string), prompt (string), generation_time_ms (int64)
UpdateAgentPersonalityUpdates an agent's authored Big5 personality configuration when your product intentionally changes the agent design.
Request
agent_idstringAgent UUIDbig5CEBig5ScoresUpdated Big Five scores with confidenceResponse
success (bool)
Proactive Behaviors
ScheduleWakeupSchedules the agent to proactively reach out to a user after a delay.
Request
agent_idstringAgent UUIDuser_idstringUser identifiercheck_typestringType of check: check_in, follow_up, mood_drivenintentstringWhy the agent wants to reach outdelay_hoursint32Hours to delay before wakeupResponse
wakeup_id (string), scheduled_at (Timestamp)
GetPendingWakeupsRetrieves pending wakeup events for an agent.
Request
agent_idstringAgent UUIDResponse
List of PendingWakeup (wakeup_id, user_id, check_type, intent, scheduled_at)
Streaming Chat
Primary public conversation RPC. Send the agent, user, application context, and message history; the platform handles context assembly and state updates automatically.
StreamChatStreams AI responses for an agent interaction while the platform handles internal memory and state updates behind the scenes.
Request
agent_idstringAgent UUIDuser_idstringUser identifiersession_idstringUnique session IDgame_contextGameContextApplication state contextmessagesCEChatMessage[]Conversation messagescontinuation_tokenstringResume from previous response (optional)request_typestring"chat", "guide", or "outing"capabilitiesstring[]Unlocked capabilities (optional)languagestringISO language code (optional)interaction_rolestring"owner" or "non_owner"skill_levelsmap<string, int32>Skill levels (optional)Response
Stream of StreamChatEvent (delta | message_boundary | complete | side_effects | error)
StreamChatEvent is a oneof with these event types:
StreamChatDelta (delta)contentstringText chunk from the AImessage_indexint32Index in multi-message responseis_follow_upboolWhether this is a follow-up messagereplacementboolIf true, replaces all previous contentStreamChatComplete (complete)full_contentstringComplete response textfinish_reasonstring"stop", "length", or "content_filter"continuation_tokenstringToken for continuing the conversationmessage_countint32Number of messages in responseStreamChatError (error)messagestringError messagecodestringError codeAI Generation
Platform-managed AI content generation for bios, goals, personalities, diary entries, and images.
GenerateBioGenerates or rewrites an agent's biography using AI based on their personality and context.
Request
agent_idstringAgent UUIDuser_idstringUser identifiercurrent_biostringCurrent bio for rewriting (optional)stylestringStyle: casual, formal, poetic, etc. (optional)Response
bio (string), tone (string), confidence (double)
GenerateGoalsGenerates personality-driven goals for an agent based on traits, interests, and memories.
Request
agent_idstringAgent UUIDagent_namestringAgent display namebig5CEBig5ScoresBig5 scorestrue_interestsstring[]Agent intereststrue_dislikesstring[]Agent dislikesspeech_patternsstring[]Speech patternsrecent_memoriesCERecentMemory[]Recent memories for contextcurrent_goalsCEGoalSummary[]Existing goals to avoid duplicationmax_goalsint32Maximum goals to generatemodel_configCEModelConfigLLM model configuration (optional)custom_contextmap<string, string>Application-specific context (optional)Response
List of CEGeneratedGoal (type, title, description, priority, related_traits), reasoning
GeneratePersonalityGenerates speech patterns and interests from a template and Big5 scores.
Request
template_idstringTemplate identifierbase_promptstringBase personality promptbig5CEBig5ScoresBig5 scoresagent_namestringAgent namegenderstringAgent genderResponse
speech_patterns (string[]), true_interests (string[]), used_fallback (bool)
GenerateDiaryGenerates a diary entry from conversation messages and/or application events.
Request
agent_idstringAgent UUIDuser_idstringUser identifierdatestringDate in YYYY-MM-DD formatagent_namestringAgent display namelanguagestringLanguage for generated contentmessagesCEDiaryMessage[]Conversation messages (role, content, time)trigger_typestringdaily_summary, achievement, milestone, breakthroughtrigger_contextCEDiaryTriggerContextEvent trigger context (optional)modelstringLLM model override (optional)temperaturedoubleTemperature override (optional)timezonestringTimezone for date handling (optional)Response
user_id, date, diary (title, body_lines, tags), generation_time_ms
GenerateImageGenerates an image from a text prompt and stores it in cloud storage.
Request
promptstringImage generation promptnegative_promptstringNegative prompt (optional)modelstringModel to use (optional)providerstringProvider to use (optional)output_bucketstringGCS bucket for output (optional)output_pathstringOutput path in bucket (optional)cdn_domainstringCDN domain for public URL (optional)Response
success, image_id, gcs_uri, public_url, mime_type, generation_time_ms, error
Voice & Media
Voice matching, text-to-speech, voice chat, and reflection capabilities.
VoiceMatchMatches an agent to an appropriate TTS voice based on personality traits.
Request
big5CEBig5ScoresBig5 scores for matchingpreferred_genderstringPreferred voice gender (optional)agent_idstringAgent UUID (auto-lookup Big5 if provided without big5)Response
voice_id, voice_name, match_score, reasoning
TextToSpeechText-to-speech using Google Gemini voices with emotional context awareness.
Request
textstringText to convertvoice_namestringGemini voice namelanguagestringLanguage code (optional)emotional_contextCEEmotionalContextEmotional themes and tone (optional)Response
audio (bytes), content_type, voice_name
VoiceChatSingle-turn voice chat: transcribes audio, generates AI response, returns TTS audio.
Request
agent_idstringAgent UUIDuser_idstringUser identifieraudiobytesRaw audio dataaudio_formatstringAudio format (opus, pcm, wav)voice_namestringTTS voice namecontinuation_tokenstringResume from previous turn (optional)languagestringLanguage code (optional)game_idstringApplication identifier (optional)Response
transcript, response (text), audio (bytes), content_type, continuation_token, side_effects_json
ListVoicesLists available Gemini TTS voices, optionally filtered by gender.
Request
genderstringFilter by gender (optional)Response
List of CEGeminiVoice (name, gender)
ReflectGenerates an AI reflection on a capability unlock, milestone, or other event.
Request
agent_idstringAgent UUIDuser_idstringUser identifierreflection_typestring"capability_unlock", "milestone", etc.capabilitystringCapability namecapability_sourcestringSource of capabilitycontextstringAdditional context string (optional)new_capabilities_jsonbytesNew capabilities JSON (optional)session_idstringSession ID for auto context build (optional)interaction_rolestring"owner" or "non_owner" (default: "owner")Response
success (bool), reflection (string), side_effects_json (bytes)
Streaming Voice Chat
Bidirectional streaming voice chat with server-side VAD (voice activity detection). Client streams audio chunks continuously; server handles speech detection, transcription, AI response, and TTS.
StreamVoiceChatBidirectional streaming: client sends init + audio chunks, server returns transcripts and TTS audio. No manual stop button needed.
Request
initVoiceChatInitFirst message: session initializationaudio_chunkVoiceAudioChunkSubsequent messages: raw audio dataResponse
Stream of events: ready | vad | transcript | response_delta | audio | turn_complete | error
VoiceChatInitagent_idstringAgent UUIDuser_idstringUser identifieraudio_formatstring"opus", "pcm", "wav" (default: "opus")sample_rateint32Sample rate in Hz (default: 48000 for opus)voice_namestringTTS voice namelanguagestringLanguage code (default: "en")game_idstringApplication identifiercontinuation_tokenstringResume from previous session (optional)VoiceAudioChunkaudiobytesRaw audio data (e.g., Opus frame)end_of_speechboolOptional client-side VAD hintServer response events:
VoiceStreamReadysession_idstringAssigned session IDVoiceStreamVADspeakingbooltrue = speech started, false = speech endedVoiceStreamTranscripttextstringTranscript textis_finalbooltrue = final transcript for this utteranceVoiceStreamAudioaudiobytesAudio data chunkcontent_typestringe.g., "audio/opus", "audio/wav"VoiceStreamTurnCompletecontinuation_tokenstringToken for continuing the sessionside_effects_jsonbytesJSON-serialized AgentSideEffects (optional)VoiceStreamErrormessagestringError messagecodestring"vad_error", "stt_error", "llm_error", "tts_error"fatalboolIf true, session should be closedAnalysis & Search
AI-powered conversation analysis, summarization, and grounded search.
AnalyzeConversationAnalyzes a conversation to extract side effects (personality deltas, habits, memories, etc.).
Request
agent_idstringAgent UUIDagent_namestringAgent display nameuser_idstringUser identifiermessagesCEAnalyzeConversationMessage[]Messages to analyze (role, content)is_finalboolWhether this is the final batch of messagesResponse
success, side_effects_json (bytes), summary, latency_ms
SummarizeConversationGenerates a concise summary of a conversation with topic extraction.
Request
messagesCESummarizeConversationMessage[]Messages (role, content, time)agent_namestringAgent nameuser_namestringUser display namemax_summary_lengthint32Max summary length in charactersResponse
summary (string), topics (string[]), message_count (int)
GenerateSearchQueryGenerates an optimized search query from a topic and category for web search.
Request
topicstringTopic to search forcategorystringCategory for contextResponse
query (string), context (string)
GroundedSearchPerforms grounded web search with multiple queries and returns summarized results with sources.
Request
queriesstring[]Search queriescontextstringContext for search relevanceagent_namestringAgent name for response framingResponse
List of CEGroundedSearchResult (query, summary, sources with title/url/snippet)
Multi-Agent Dialogue
Agent-to-agent conversations for outings, dialogues, and multi-agent scenes.
AgentDialogueGenerates an agent response in a multi-agent dialogue context (e.g., outings between agents).
Request
agent_idstringAgent UUID (the responding agent)user_idstringUser identifiermessagesCEChatMessage[]Dialogue messagesrequest_typestring"outing", "dialogue", etc.scene_guidancestringScene-specific prompt guidancetool_config_jsonbytesTool configuration JSON (optional)session_idstringSession ID for auto context build (optional)interaction_rolestring"owner" or "non_owner" (default: "owner")Response
response (string), side_effects_json (bytes)
Application Events
Notify the platform about significant application events. The platform may generate diary entries, update goals, or take other AI actions. Fires OnDiaryGenerated webhook when diary is created.
TriggerGameEventAccepts application events (achievements, milestones, breakthroughs, completions) and triggers AI content generation.
Request
agent_idstringAgent UUIDuser_idstringUser identifierevent_typestring"achievement", "milestone", "breakthrough", "level_up"event_descriptionstringHuman-readable context for the AImetadatamap<string, string>Additional context (achievement_id, level, etc.)languagestringLanguage for generated content (default: "en")Response
accepted (bool), event_id (string)
Knowledge Base
Project-scoped knowledge graph. Upload documents or push structured data via the API — the platform extracts entities, builds a graph, and gives agents a knowledge_search tool to query it during conversations.
Documents
/projects/{projectId}/knowledge/documentsUpload a document (multipart/form-data with 'file' field, max 50 MB). Returns 202 with document_id and triggers async extraction.
Parameters
filemultipartThe document fileResponse
document_id, file_name, file_size, checksum, status, gcs_path
/projects/{projectId}/knowledge/documentsList documents. Query: limit (default 50, max 200).
Response
documents[], total
/projects/{projectId}/knowledge/documents/{docId}Get a single document.
Response
KBDocument object
/projects/{projectId}/knowledge/documents/{docId}Delete a document.
Response
204 No Content
Facts & Graph
/projects/{projectId}/knowledge/factsInsert entities and relationships into the knowledge graph. Resolves against existing nodes, creates/updates with version history.
Parameters
sourcestringSource identifier (default: 'api')facts[]arrayEntities: entity_type, label, propertiesrelationships[]arrayEdges: from_label, to_label, edge_typeResponse
processed, created, updated, details[]
/projects/{projectId}/knowledge/nodesList knowledge graph nodes. Query: type (filter), limit (default 100, max 500).
Response
nodes[], total
/projects/{projectId}/knowledge/nodes/{nodeId}Get a node with connected edges. Query: history=true for version history.
Response
node, outgoing[], incoming[], history[]
/projects/{projectId}/knowledge/nodes/{nodeId}Soft-delete a node (sets is_active=false).
Response
204 No Content
/projects/{projectId}/knowledge/nodes/{nodeId}/historyGet version history for a node. Query: limit (default 50, max 200).
Response
history[], total
Search
/projects/{projectId}/knowledge/searchFull-text search with graph traversal. Query: q (required), limit, history, type, filters (JSON).
Parameters
qstringSearch query (required)limitintMax results (default 20, max 100)typestringComma-separated entity types to filterfiltersJSON stringProperty filter objecthistoryboolInclude version historyResponse
query, results[] (with related nodes), total
Schemas
/projects/{projectId}/knowledge/schemasCreate an entity type schema with fields and optional similarity config.
Parameters
entity_typestringEntity type name (required)fields[]arrayField definitions: name, type, requireddescriptionstringSchema descriptionsimilarity_configobjectmatch_fields[], thresholdResponse
KBEntitySchema object
/projects/{projectId}/knowledge/schemasList entity schemas for a project.
Response
schemas[], total
/projects/{projectId}/knowledge/schemas/{schemaId}Update an entity schema.
Parameters
entity_typestringUpdated entity type namefields[]arrayUpdated field definitionsResponse
KBEntitySchema object
/projects/{projectId}/knowledge/schemas/{schemaId}Delete an entity schema.
Response
204 No Content
Stats
/projects/{projectId}/knowledge/statsGet knowledge base statistics (document counts, node counts, edge count, extraction tokens).
Response
documents {total, indexed, pending, failed}, nodes {total, active}, edges, extraction_tokens
Analytics
/projects/{projectId}/knowledge/analytics/rulesCreate an analytics rule (recommendation or trend).
Parameters
rule_typestring'recommendation' or 'trend'namestringRule nameconfigobjectRule configurationenabledboolWhether the rule is activeResponse
KBAnalyticsRule object
/projects/{projectId}/knowledge/analytics/recommendationsGet recommendations. Query: rule_id, source_id (both required), limit.
Response
recommendations[], total
/projects/{projectId}/knowledge/analytics/trendsGet trend aggregations. Query: node_id (required).
Response
trends[], total
/projects/{projectId}/knowledge/analytics/feedbackRecord recommendation feedback (shown/converted).
Parameters
source_node_idstringSource node IDtarget_node_idstringTarget node IDrule_idstringAnalytics rule IDconvertedboolWhether the user convertedscore_at_timefloatScore when recommendation was shownResponse
status: 'recorded'
User Priming
Pre-load user metadata and content so AI agents already “know” users from their first conversation. Metadata (name, company, title) becomes instant facts; content blocks (text, chat transcripts) are processed asynchronously via LLM extraction.
Prime a User
/agents/{agentId}/users/{userId}/primePrime a user with metadata and content. Returns 202 with a job ID; LLM extraction of content runs asynchronously.
Parameters
display_namestringUser's display namemetadataobjectcompany, title, email, phone, custom (map)content[]arrayContent blocks: type ('text', 'chat_transcript'), bodysourcestringSource identifier (e.g., 'crm', 'linkedin')Response
job_id, status ('queued'), facts_created
/agents/{agentId}/users/{userId}/prime/{jobId}Get the status of a priming job.
Response
ImportJob object (job_id, status, facts_created, error_message, etc.)
Content
/agents/{agentId}/users/{userId}/contentAdd content blocks for async LLM extraction (e.g., append chat transcripts after priming).
Parameters
content[]arrayContent blocks: type, bodysourcestringSource identifierResponse
job_id, status ('queued')
Metadata
/agents/{agentId}/users/{userId}/metadataGet priming metadata for a user.
Response
UserPrimingMetadata object
/agents/{agentId}/users/{userId}/metadataPartially update priming metadata. New facts are auto-generated from updated fields.
Parameters
display_namestringUpdated namecompanystringUpdated companytitlestringUpdated titleemailstringUpdated emailphonestringUpdated phonecustommapCustom key-value pairs (merged)Response
metadata (updated), facts_created
Batch Import
/agents/{agentId}/users/importImport multiple users with metadata and content in a single request. Metadata facts are created synchronously; content extraction runs async.
Parameters
users[]arrayArray of {user_id, display_name, metadata, content[]}sourcestringSource identifierResponse
job_id, status ('queued'), total_users, facts_created
/agents/{agentId}/users/import/{jobId}Get the status of a batch import job.
Response
ImportJob object
/agents/{agentId}/users/importsList recent import jobs for an agent. Query: limit (default 20).
Response
jobs[], count
Shared Types
GameContextcustom_fieldsmap<string, string>Arbitrary application-specific key-value pairs passed through to promptsgame_state_jsonbytesOptional structured state as JSON (pass-through to prompts)CEBig5ScoresopennessdoubleOpenness to experience (0.0-1.0)conscientiousnessdoubleOrganization and discipline (0.0-1.0)extraversiondoubleSocial energy and enthusiasm (0.0-1.0)agreeablenessdoubleWarmth and cooperation (0.0-1.0)neuroticismdoubleEmotional sensitivity (0.0-1.0)confidencedoubleAssessment confidence (0.0-1.0)MoodStatevalencedoublePleasure/displeasure spectrum (0-100)arousaldoubleActivation/energy level (0-100)tensiondoubleStress/calmness state (0-100)affiliationdoubleSocial warmth/closeness (0-100)CEChatMessagerolestring"user" or "assistant"contentstringMessage texttimestampTimestampWhen the message was sentMemoryCandidatecontentstringMemory content textfact_typestringpreference, commitment, fact, experience, correctionimportancedoubleImportance score (0.0-1.0)entitiesstring[]Related entitiesHabitnamestringHabit namecategorystringHabit categorystrengthdoubleCurrent strength (0.0-1.0)last_observedTimestampLast observation timeis_formedboolWhether the habit is fully formedCEGoalidstringGoal identifierdescriptionstringGoal descriptionstatusstring"active", "completed", "abandoned"prioritystringPriority levelrelated_traitsstring[]Related personality traitscreated_atTimestampWhen the goal was createdInteresttopicstringInterest topiccategorystringInterest categoryconfidencedoubleDetection confidence (0.0-1.0)discovered_atTimestampWhen the interest was discoveredresearch_statusstring"pending" or "researched"CEModelConfigproviderstringLLM provider namemodelstringModel identifiertemperaturedoubleSampling temperaturemax_tokensint32Maximum tokens to generateProactiveMessagemessage_idstringUnique message identifieragent_idstringAgent that generated the messageuser_idstringTarget userwakeup_idstringAssociated wakeup eventcheck_typestringType of check (check_in, follow_up, mood_driven)intentstringWhy the agent wants to reach outgenerated_messagestringThe actual message textstatusstringpending, consumed, expired, failed_generationcreated_atTimestampWhen generated