The 6-stage project initialization pipeline. Each stage progressively unblocks CharacterOS capabilities, from manuscript upload through studio readiness. Most projects complete in 5-15 minutes.
30 seconds
2-5 minutes
1-2 minutes
1-3 minutes
2-4 minutes
30 seconds
Projects transition through these statuses: Upload → Analyzing → CharacterOS → Demo Scene → Demo Audio → Complete. Users see progress in the dashboard with estimated time remaining.
Each stage is tracked as a background job in PostgreSQL. Polling endpoint: GET /api/jobs/{id}. Returns status, progress_percent, eta_seconds. If a job stalls longer than 2 hours, a background scanner marks it failed and sends alert.
State at each stage is committed to PostgreSQL (character profiles, embeddings, voice configs). If a stage fails, users can trigger a retry. Retried stages skip already-computed data using cache keys. No redundant API calls or reprocessing.
Stage parallelization is limited (e.g., character extraction uses semaphore to prevent memory exhaustion). Scene and audio stages are optional demos — users familiar with the tool can skip them. Caching layer bridges requests across stages: embeddings stored in PostgreSQL pgvector, character profiles cached in Redis.
Client uploads file up to 100MB via multipart form. Backend validates MIME type, extracts text (python-docx for .docx, PyPDF for .pdf, plain text otherwise). File stored in Cloud blob with unique key. Word/character counts streamed to database immediately, unblocking UI "Corpus" display.
ProgressiveAnalysisEngine chunks manuscript, runs character extraction with multi-pass LLM prompts, detects relationships, and builds canon snapshot. Caching prevents redundant analysis of identical text blocks. Results written to characters table with extracted traits, dialogue samples, and canon scope.
AgentRuntime initializes: canon chunks → embeddings via BatchEmbeddingService (the embedding model, 1,536D) → stored in PostgreSQL pgvector. MemoryBridge tables created. RAG system tested with sample query. This stage blocks character chat and scene generation until complete.
WriterAgent generates 1-2 character demo scene to verify: RAG retrieval works, WriterAgent output is coherent, ContinuityAgent validation passes. Scene displayed in dashboard. Good smoke test before handing off to user. Can be skipped by experienced users.
VoiceSelectionAgent maps characters to voices. VoiceConfigurationAgent applies mood and pacing. Short test audio synthesized and cached. Users hear voice quality before generating full audiobooks. Optional stage, frequently skipped.
Project status set to "Complete". All workflows unlocked: character chat, scene generation, collaboration, audio. Nightly reflection scheduler enabled. Users can now interact with their storyworld freely. Celebration animation shown in UI.