{"openapi":"3.1.0","info":{"title":"Document Analysis API","description":"Lean API for purpose-driven document analysis with knowledge graph, vector search, and agent management capabilities.","version":"2.0"},"paths":{"/healthz":{"get":{"tags":["health"],"summary":"Healthz","description":"Health check endpoint.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"security":[]}},"/healthz/agent-access/{agent_id}":{"get":{"tags":["health"],"summary":"Test Get Agent Access","description":"Health check endpoint with access check.","operationId":"test_get_agent_access_healthz_agent_access__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["health"],"summary":"Test Post Agent Access","description":"Health check endpoint with access check.","operationId":"test_post_agent_access_healthz_agent_access__agent_id__post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz/agent-query":{"get":{"tags":["health"],"summary":"Test Query Agent Access","description":"Health check endpoint with access check for query params.","operationId":"test_query_agent_access_healthz_agent_query_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz/bonfire-access/{bonfire_id}":{"get":{"tags":["health"],"summary":"Test Get Bonfire Access","description":"Health check endpoint with access check.","operationId":"test_get_bonfire_access_healthz_bonfire_access__bonfire_id__get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{job_id}/status":{"get":{"tags":["jobs"],"summary":"Get Job Status","description":"Get status of a specific job.","operationId":"get_job_status_jobs__job_id__status_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs":{"get":{"tags":["jobs"],"summary":"Get Recent Jobs","description":"Get recent jobs with optional filtering.","operationId":"get_recent_jobs_jobs_get","parameters":[{"name":"bonfire_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by bonfire ID","title":"Bonfire Id"},"description":"Filter by bonfire ID"},{"name":"workflow_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workflow type","title":"Workflow Type"},"description":"Filter by workflow type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of jobs to return","default":50,"title":"Limit"},"description":"Maximum number of jobs to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/active":{"get":{"tags":["jobs"],"summary":"Get Active Jobs","description":"Get all currently running jobs.","operationId":"get_active_jobs_jobs_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveJobsResponse"}}}}}}},"/jobs/trigger-daily-workflow":{"post":{"tags":["jobs"],"summary":"Trigger Daily Workflow","description":"Manually trigger the daily workflow. Requires an admin API key.","operationId":"trigger_daily_workflow_jobs_trigger_daily_workflow_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingest_content":{"post":{"tags":["content"],"summary":"Ingest Content","description":"Ingest content into the system for processing.","operationId":"ingest_content_ingest_content_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestContentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest_content_vector_only":{"post":{"tags":["content"],"summary":"Ingest Content Vector Only","description":"Ingest content but skip summarization/taxonomy and vectorize only.","operationId":"ingest_content_vector_only_ingest_content_vector_only_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestContentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/generate_summaries":{"post":{"tags":["content"],"summary":"Generate Summaries","description":"Generate summaries for a specific bonfire and run, tracked as a job.","operationId":"generate_summaries_generate_summaries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSummariesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfire/{bonfire_id}/labeled_chunks":{"get":{"tags":["content"],"summary":"Get Labeled Chunks","description":"Get all labeled chunks for a bonfire organized by taxonomy labels.","operationId":"get_labeled_chunks_bonfire__bonfire_id__labeled_chunks_get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Group results by 'document' for document-level view","title":"Group By"},"description":"Group results by 'document' for document-level view"},{"name":"preview_limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Number of preview chunks per document when group_by=document","default":3,"title":"Preview Limit"},"description":"Number of preview chunks per document when group_by=document"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number for pagination (1-indexed)","default":1,"title":"Page"},"description":"Page number for pagination (1-indexed)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":20,"title":"Page Size"},"description":"Number of items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabeledChunksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfires":{"get":{"tags":["content"],"summary":"List Bonfires","description":"List all available bonfires with taxonomy labels for agent selector.","operationId":"list_bonfires_bonfires_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireListResponse"}}}}},"security":[]}},"/bonfires/resolve-subdomain/{subdomain}":{"get":{"tags":["content","content","bonfires"],"summary":"Resolve Subdomain","description":"Resolve subdomain (slug or ObjectId) to bonfire_id and first agent_id.\n\nNo auth required - subdomain resolution happens before login.\nReturns 404 if subdomain cannot be resolved.","operationId":"resolve_subdomain_bonfires_resolve_subdomain__subdomain__get","parameters":[{"name":"subdomain","in":"path","required":true,"schema":{"type":"string","title":"Subdomain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubdomainResolutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfire/{bonfire_id}/taxonomy_stats":{"get":{"tags":["content"],"summary":"Get Taxonomy Stats","description":"Get per-taxonomy chunk statistics for a bonfire.\n\nThis endpoint is optimized for dashboard display, returning only aggregated\ncounts without full chunk data.","operationId":"get_taxonomy_stats_bonfire__bonfire_id__taxonomy_stats_get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/by_chunks":{"post":{"tags":["content"],"summary":"Get Documents By Chunk Ids","description":"Hydrate documents (and chunk metadata) for a list of chunk IDs.","operationId":"get_documents_by_chunk_ids_documents_by_chunks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{clerk_org_id}/bonfire-mapping":{"get":{"tags":["content","content","bonfires"],"summary":"Get Org Bonfire Mapping","description":"Look up the bonfire mapping for a Clerk organization.\n\nNo auth required — returns the bonfire_id, is_admin flag, and\nsubdomain slug for a given Clerk org ID. Single request for\norg-switch redirects.\nReturns {bonfire_id: null, is_admin: false, slug: null} if no mapping exists.","operationId":"get_org_bonfire_mapping_orgs__clerk_org_id__bonfire_mapping_get","parameters":[{"name":"clerk_org_id","in":"path","required":true,"schema":{"type":"string","title":"Clerk Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgBonfireMappingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}":{"delete":{"tags":["content"],"summary":"Delete Document","description":"Delete a document and all its associated chunks and summaries.","operationId":"delete_document_documents__document_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire ID the document belongs to","title":"Bonfire Id"},"description":"Bonfire ID the document belongs to"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest_pdf":{"post":{"tags":["content"],"summary":"Ingest Pdf","description":"Upload and ingest a PDF file with server-side text extraction.","operationId":"ingest_pdf_ingest_pdf_post","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire ID to ingest into","title":"Bonfire Id"},"description":"Bonfire ID to ingest into"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_pdf_ingest_pdf_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfires/{bonfire_id}/resolve-org":{"get":{"tags":["content","content","bonfires"],"summary":"Resolve Org For Bonfire","description":"Resolve which Clerk org a signed-in user should activate for this bonfire.\n\nRequires Clerk JWT authentication. Iterates the user's org memberships\nand checks ClerkOrgMapping to find a direct bonfire match or admin fallback.\nReturns null if the user has no org with access to this bonfire.","operationId":"resolve_org_for_bonfire_bonfires__bonfire_id__resolve_org_get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResolveOrgResponse"},{"type":"null"}],"title":"Response Resolve Org For Bonfire Bonfires  Bonfire Id  Resolve Org Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-review-batches/import":{"post":{"tags":["applicant_reviews"],"summary":"Import Batch","operationId":"import_batch_applicant_review_batches_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportApplicantBatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantReviewBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-review-batches":{"get":{"tags":["applicant_reviews"],"summary":"List Batches","description":"List all batches for a bonfire, newest first.","operationId":"list_batches_applicant_review_batches_get","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-review-batches/active":{"get":{"tags":["applicant_reviews"],"summary":"Find Active Batch","operationId":"find_active_batch_applicant_review_batches_active_get","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"source_name","in":"query","required":true,"schema":{"type":"string","title":"Source Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-review-batches/{batch_id}":{"get":{"tags":["applicant_reviews"],"summary":"Get Batch","operationId":"get_batch_applicant_review_batches__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"include_items","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Items"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-review-batches/{batch_id}/add":{"post":{"tags":["applicant_reviews"],"summary":"Add To Batch","operationId":"add_to_batch_applicant_review_batches__batch_id__add_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddToBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantReviewBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews":{"get":{"tags":["applicant_reviews"],"summary":"List Applications","operationId":"list_applications_applicant_reviews_get","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"batch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"shortlist_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Shortlist Only"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"score","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"rubric_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantReviewListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/batch-eval-runs":{"post":{"tags":["applicant_reviews"],"summary":"Create Batch Eval Run","operationId":"create_batch_eval_run_applicant_reviews_batch_eval_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchEvalRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchEvalRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/graph-runs":{"post":{"tags":["applicant_reviews"],"summary":"Create Graph Run","description":"Phase 1 entry point for the new ApplicantReviewGraphCoordinator path.\n\nEnqueues a single applicant_review_graph_task for the whole batch\n(instead of one task per applicant). Returns the BackgroundTask id.\nPhase 3 will rewire /batch-eval-runs to use this same code path.","operationId":"create_graph_run_applicant_reviews_graph_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGraphRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGraphRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/batch-eval-runs/by-batch/{batch_id}":{"get":{"tags":["applicant_reviews"],"summary":"List Runs For Batch","operationId":"list_runs_for_batch_applicant_reviews_batch_eval_runs_by_batch__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/batch-eval-runs/{run_id}":{"get":{"tags":["applicant_reviews"],"summary":"Get Batch Eval Run","operationId":"get_batch_eval_run_applicant_reviews_batch_eval_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEvalRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/batch-eval-runs/{run_id}/stream":{"get":{"tags":["applicant_reviews"],"summary":"Stream Batch Eval Run","operationId":"stream_batch_eval_run_applicant_reviews_batch_eval_runs__run_id__stream_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"resume_from_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resume From Seq"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/submission/{submission_hash}/average-scores":{"get":{"tags":["applicant_reviews"],"summary":"Get Submission Average Scores","operationId":"get_submission_average_scores_applicant_reviews_submission__submission_hash__average_scores_get","parameters":[{"name":"submission_hash","in":"path","required":true,"schema":{"type":"string","title":"Submission Hash"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Owning bonfire ID","title":"Bonfire Id"},"description":"Owning bonfire ID"},{"name":"rubric_version","in":"query","required":false,"schema":{"type":"string","default":"eth_security_badge_v1","title":"Rubric Version"}},{"name":"rubric_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-review-rubrics":{"get":{"tags":["applicant_reviews"],"summary":"List Rubrics","operationId":"list_rubrics_applicant_review_rubrics_get","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-review-rubrics/{rubric_document_id}":{"get":{"tags":["applicant_reviews"],"summary":"Get Rubric","operationId":"get_rubric_applicant_review_rubrics__rubric_document_id__get","parameters":[{"name":"rubric_document_id","in":"path","required":true,"schema":{"type":"string","title":"Rubric Document Id"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/{application_id}":{"get":{"tags":["applicant_reviews"],"summary":"Get Application Detail","operationId":"get_application_detail_applicant_reviews__application_id__get","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}},{"name":"rubric_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantReviewDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["applicant_reviews"],"summary":"Delete Application","operationId":"delete_application_applicant_reviews__application_id__delete","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews/{application_id}/shortlist":{"post":{"tags":["applicant_reviews"],"summary":"Shortlist","operationId":"shortlist_applicant_reviews__application_id__shortlist_post","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlistApplicantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantReviewActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applicant-reviews-export":{"get":{"tags":["applicant_reviews"],"summary":"Export Reviews Csv","operationId":"export_reviews_csv_applicant_reviews_export_get","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"batch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"}},{"name":"rubric_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/costs":{"get":{"tags":["insights"],"summary":"Get Costs","operationId":"get_costs_insights_costs_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"enum":["24h","7d","30d","90d"],"type":"string","default":"7d","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/graph-stats/global":{"get":{"tags":["insights"],"summary":"Get Global Graph Stats","operationId":"get_global_graph_stats_insights_graph_stats_global_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalGraphStatsResponse"}}}}}}},"/insights/graph-stats/bonfire/{bonfire_id}":{"get":{"tags":["insights"],"summary":"Get Bonfire Graph Stats","operationId":"get_bonfire_graph_stats_insights_graph_stats_bonfire__bonfire_id__get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireGraphStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trigger_taxonomy":{"post":{"tags":["taxonomy"],"summary":"Trigger Taxonomy","description":"Manually trigger taxonomy generation for a specific bonfire.","operationId":"trigger_taxonomy_trigger_taxonomy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyTriggerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/label_chunks":{"post":{"tags":["taxonomy"],"summary":"Label Chunks","description":"Label chunks with taxonomy categories for a specific bonfire.","operationId":"label_chunks_label_chunks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelChunksRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/taxonomy/resolve_uuids":{"post":{"tags":["taxonomy"],"summary":"Resolve Taxonomy Uuids","description":"Resolve Graphiti entity UUIDs for MongoDB taxonomy IDs.","operationId":"resolve_taxonomy_uuids_taxonomy_resolve_uuids_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveTaxonomyUuidsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labeling/hybrid":{"post":{"tags":["taxonomy"],"summary":"Run Hybrid Labeling","description":"Run hybrid labeling (vector + LLM) for a bonfire.","operationId":"run_hybrid_labeling_labeling_hybrid_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HybridLabelingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HybridLabelingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/setup":{"post":{"tags":["vector_store"],"summary":"Setup Vector Store","description":"Setup Weaviate collections and populate with MongoDB data.","operationId":"setup_vector_store_vector_store_setup_post","parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional run ID for filtering","title":"Run Id"},"description":"Optional run ID for filtering"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/update_labels":{"post":{"tags":["vector_store"],"summary":"Update Vector Labels","description":"Update vector store labels for a specific bonfire and run.","operationId":"update_vector_labels_vector_store_update_labels_post","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier","title":"Bonfire Id"},"description":"Bonfire identifier"},{"name":"run_id","in":"query","required":true,"schema":{"type":"string","description":"Run identifier","title":"Run Id"},"description":"Run identifier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/search":{"post":{"tags":["vector_store"],"summary":"Search Vector Chunks","description":"Unified search for chunks in Weaviate.","operationId":"search_vector_chunks_vector_store_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedVectorSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/search_label":{"post":{"tags":["vector_store"],"summary":"Search Vector Label","description":"Search for top matching labels based on chunk text.","operationId":"search_vector_label_vector_store_search_label_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLabelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorLabelSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/chunks/{bonfire_id}":{"get":{"tags":["vector_store"],"summary":"Get Labeled Chunks From Vector Store","description":"Get labeled chunks from Weaviate for a specific bonfire.","operationId":"get_labeled_chunks_from_vector_store_vector_store_chunks__bonfire_id__get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of chunks to return","default":10,"title":"Limit"},"description":"Maximum number of chunks to return"},{"name":"search_string","in":"query","required":false,"schema":{"type":"string","description":"Search string for filtering chunks","default":"*","title":"Search String"},"description":"Search string for filtering chunks"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/clear_chunks":{"post":{"tags":["vector_store"],"summary":"Clear Chunks From Vector Store","description":"Clear all chunks for a specific bonfire from Weaviate.","operationId":"clear_chunks_from_vector_store_vector_store_clear_chunks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearChunksRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/add_chunk":{"post":{"tags":["vector_store"],"summary":"Add Labeled Chunk To Vector Store","description":"Add a labeled chunk (or chunks) to the vector store.","operationId":"add_labeled_chunk_to_vector_store_vector_store_add_chunk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLabeledChunkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorStoreOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vector_store/diagnostics/{bonfire_id}":{"get":{"tags":["vector_store"],"summary":"Vector Store Diagnostics","description":"Get basic diagnostics (counts per collection) for a bonfire's vector store.","operationId":"vector_store_diagnostics_vector_store_diagnostics__bonfire_id__get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kg/add-triplet":{"post":{"tags":["knowledge_graph"],"summary":"Add Triplet","description":"Add a direct triplet to the knowledge graph.","operationId":"add_triplet_api_kg_add_triplet_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTripletRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TripletResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/episode_update":{"post":{"tags":["knowledge_graph"],"summary":"Knowledge Graph Episode Update","description":"Ingest a single agent episode update.","operationId":"knowledge_graph_episode_update_knowledge_graph_episode_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KGEpisodeUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/episode/create":{"post":{"tags":["knowledge_graph"],"summary":"Create Episode Direct","description":"Create an episode directly via Graphiti, bypassing the full episode stack.","operationId":"create_episode_direct_knowledge_graph_episode_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEpisodeDirectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEpisodeDirectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/entity":{"post":{"tags":["knowledge_graph"],"summary":"Create Entity","description":"Create a new Entity node in the knowledge graph.","operationId":"create_entity_knowledge_graph_entity_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/entity/{uuid}/update":{"post":{"tags":["knowledge_graph"],"summary":"Update Entity","description":"Update an existing Entity node in the knowledge graph.","operationId":"update_entity_knowledge_graph_entity__uuid__update_post","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/edge":{"post":{"tags":["knowledge_graph"],"summary":"Create Edge","description":"Create an edge between two existing entities by UUID.","operationId":"create_edge_knowledge_graph_edge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEdgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/edge/{uuid}/update":{"post":{"tags":["knowledge_graph"],"summary":"Update Edge","description":"Update fields on an existing RELATES_TO edge.","operationId":"update_edge_knowledge_graph_edge__uuid__update_post","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/edge/{uuid}/delete":{"post":{"tags":["knowledge_graph"],"summary":"Delete Edge","description":"Delete a RELATES_TO edge by UUID.","operationId":"delete_edge_knowledge_graph_edge__uuid__delete_post","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier for scoping","title":"Bonfire Id"},"description":"Bonfire identifier for scoping"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/episode/{uuid}":{"get":{"tags":["knowledge_graph"],"summary":"Get Episode By Uuid","description":"Return a single Episode by uuid, scoped by bonfire_id.","operationId":"get_episode_by_uuid_knowledge_graph_episode__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier for scoping","title":"Bonfire Id"},"description":"Bonfire identifier for scoping"},{"name":"include_edges","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include related edges","default":false,"title":"Include Edges"},"description":"Whether to include related edges"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/episodes/by-uuid/{uuid}":{"get":{"tags":["knowledge_graph"],"summary":"Get Episode By Uuid Mongo","description":"Look up a MongoDB Episode document by its Graphiti/Neo4j UUID, scoped by bonfire_id.","operationId":"get_episode_by_uuid_mongo_episodes_by_uuid__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier for scoping","title":"Bonfire Id"},"description":"Bonfire identifier for scoping"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/add_triples":{"post":{"tags":["knowledge_graph"],"summary":"Add Triples","description":"Batch add triples to the knowledge graph.","operationId":"add_triples_knowledge_graph_add_triples_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTriplesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriplesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/entities/batch":{"post":{"tags":["knowledge_graph"],"summary":"Batch Get Entities","description":"Batch fetch multiple entities by UUID, scoped by bonfire_id.","operationId":"batch_get_entities_knowledge_graph_entities_batch_post","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier for scoping","title":"Bonfire Id"},"description":"Bonfire identifier for scoping"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGetEntitiesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEntitiesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/entity/{uuid}":{"get":{"tags":["knowledge_graph"],"summary":"Get Entity By Uuid","description":"Return a single Entity by uuid, scoped by bonfire_id.","operationId":"get_entity_by_uuid_knowledge_graph_entity__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier for scoping","title":"Bonfire Id"},"description":"Bonfire identifier for scoping"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/node/{node_uuid}/episodes":{"get":{"tags":["knowledge_graph"],"summary":"Get Episodes For Node","description":"Get episodes that mention a specific node.\n\nReturns all episodes that have a MENTIONS relationship to the\nspecified entity node, similar to Zep's get-episodes-for-a-node API.","operationId":"get_episodes_for_node_knowledge_graph_node__node_uuid__episodes_get","parameters":[{"name":"node_uuid","in":"path","required":true,"schema":{"type":"string","title":"Node Uuid"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier for scoping","title":"Bonfire Id"},"description":"Bonfire identifier for scoping"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of episodes to return","default":50,"title":"Limit"},"description":"Maximum number of episodes to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeEpisodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/agents/{agent_id}/episodes/latest":{"get":{"tags":["knowledge_graph"],"summary":"Get Agent Latest Episodes","description":"Retrieve the latest episodes for a specific agent with hydrated nodes and edges.","operationId":"get_agent_latest_episodes_knowledge_graph_agents__agent_id__episodes_latest_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLatestEpisodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/agents/{agent_id}/attestations":{"get":{"tags":["knowledge_graph"],"summary":"Get Agent Attestations","description":"Retrieve attestation UIDs associated with an agent's episodes.","operationId":"get_agent_attestations_knowledge_graph_agents__agent_id__attestations_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of attestations to return","default":10,"title":"Limit"},"description":"Maximum number of attestations to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/agents/{agent_id}/episodes/search":{"post":{"tags":["knowledge_graph"],"summary":"Get Agent Episodes","description":"Retrieve episodes for a specific agent in a given time window.","operationId":"get_agent_episodes_knowledge_graph_agents__agent_id__episodes_search_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEpisodesSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLatestEpisodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/episodes/expand":{"post":{"tags":["knowledge_graph"],"summary":"Expand Episodes","description":"Expand episode node(s) by UUID with connected nodes and edges.\n\nSupports both single episode expansion (episode_uuid) and batch expansion (episode_uuids).","operationId":"expand_episodes_knowledge_graph_episodes_expand_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeExpandRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphExpandResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/expand/entity":{"post":{"tags":["knowledge_graph"],"summary":"Expand Entity","description":"Expand an entity node to reveal connected edges and nodes.\n\nReturns edges and connected entities/episodes for the specified entity,\nscoped to the given bonfire.","operationId":"expand_entity_knowledge_graph_expand_entity_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityExpandRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphExpandResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/delve":{"post":{"tags":["knowledge_graph"],"summary":"Delve","description":"Perform unified search across the knowledge graph using Graphiti.\n\nWhen present, the `x-bonfire-id` header overrides the request body's\n`bonfire_id` so clients can scope requests consistently across\ntransports.","operationId":"delve_delve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph/load":{"post":{"tags":["knowledge_graph"],"summary":"Load Graph State","description":"Load a persisted graph state by its hash ID.","operationId":"load_graph_state_graph_load_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadGraphRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/graphs":{"get":{"tags":["knowledge_graph"],"summary":"Get Agent Graphs","description":"Get all graphs belonging to an agent with optional filtering.","operationId":"get_agent_graphs_api_agents__agent_id__graphs_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"graph_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter graphs by type (Memory, Document, Custom)","title":"Graph Type"},"description":"Filter graphs by type (Memory, Document, Custom)"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of graphs to return","title":"Limit"},"description":"Maximum number of graphs to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGraphsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/ontology/ingest":{"post":{"tags":["knowledge_graph"],"summary":"Ingest Ontology","description":"Ingest an OWL/RDF ontology into the Owl_classes Weaviate collection.","operationId":"ingest_ontology_knowledge_graph_ontology_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/ontology/match":{"post":{"tags":["knowledge_graph"],"summary":"Match Ontology Labels","description":"Match Bonfire taxonomy labels against an ingested OWL ontology.","operationId":"match_ontology_labels_knowledge_graph_ontology_match_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/ontology/generate-profile":{"post":{"tags":["knowledge_graph"],"summary":"Generate Ontology Profile","description":"Generate an OntologyProfile from vector-matched taxonomy labels.","operationId":"generate_ontology_profile_knowledge_graph_ontology_generate_profile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyGenerateProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/ontology/gaps":{"post":{"tags":["knowledge_graph"],"summary":"Publish Ontology Gaps","description":"Store ontology gaps for a kEngram, published by the CLI pipeline.\n\nThe CLI runs gap extraction locally and POSTs the results here so the\nagent system can inject them into episode prompts.","operationId":"publish_ontology_gaps_knowledge_graph_ontology_gaps_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyGapPublishRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/ontology/gaps/{kengram_id}":{"get":{"tags":["knowledge_graph"],"summary":"Get Ontology Gaps","description":"Return stored ontology gaps for a kEngram, scoped by bonfire_id.","operationId":"get_ontology_gaps_knowledge_graph_ontology_gaps__kengram_id__get","parameters":[{"name":"kengram_id","in":"path","required":true,"schema":{"type":"string","title":"Kengram Id"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier for scoping","title":"Bonfire Id"},"description":"Bonfire identifier for scoping"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/communities/build":{"post":{"tags":["knowledge_graph"],"summary":"Build Communities Endpoint","description":"Build (or rebuild) Graphiti communities for a bonfire.\n\nDefault (async): enqueues the work on the arq worker and returns\n``task_id`` + ``status=queued`` in <1s. Large bonfires can take\nseveral minutes (hundreds of communities × LLM summary each) —\nasync dispatch avoids the ALB's 60s idle timeout cancelling the\nhandler mid-processing.\n\nSync mode (``sync=true``): runs inline and returns the full\n``community_count``/``member_edge_count``. Use only for small\nbonfires (<300 entities) where end-to-end completes under 60s.\n\nPartitioning uses Leiden by default (NERDDAO fork,\n``GRAPHITI_COMMUNITY_ALGO=leiden``). Existing communities for\nthis bonfire are removed before rebuild.","operationId":"build_communities_endpoint_knowledge_graph_communities_build_post","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier","title":"Bonfire Id"},"description":"Bonfire identifier"},{"name":"sample_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"description":"Optional. Limits each community summary to the top-K most representative members (highest in-community weighted degree, then longest summary). Cuts LLM cost from O(total_nodes) to O(num_communities * K). Recommended for graphs with >1k entities.","title":"Sample Size"},"description":"Optional. Limits each community summary to the top-K most representative members (highest in-community weighted degree, then longest summary). Cuts LLM cost from O(total_nodes) to O(num_communities * K). Recommended for graphs with >1k entities."},{"name":"sync","in":"query","required":false,"schema":{"type":"boolean","description":"When true, run inline and return full counts in the response. Safe only for small bonfires — the ALB 60s idle timeout will cancel larger runs mid-processing. Default false: enqueue on the arq worker, return task_id immediately, poll for completion.","default":false,"title":"Sync"},"description":"When true, run inline and return full counts in the response. Safe only for small bonfires — the ALB 60s idle timeout will cancel larger runs mid-processing. Default false: enqueue on the arq worker, return task_id immediately, poll for completion."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/search/local":{"post":{"tags":["knowledge_graph"],"summary":"Community Local Search Endpoint","description":"GraphRAG-style local search: semantic rerank inside the center's community.\n\nResolves the :Community containing ``center_uuid``, fetches all\nmembers, and ranks them by cosine similarity between ``query`` and\neach member's ``name_embedding``. Community boundary is the\nlocality filter — Leiden already decided \"what belongs together\"\nduring ``/knowledge_graph/communities/build``, so results are\nguaranteed structurally coherent.\n\nOrphan handling: if ``center_uuid`` isn't in any :Community (was\nfiltered out by minCommunitySize=5 during build, or communities\nhaven't been built yet), returns\n``{\"community\": null, \"results\": [], \"fallback\": \"...\"}`` so the\ncaller can degrade to global hybrid search.","operationId":"community_local_search_endpoint_knowledge_graph_search_local_post","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier","title":"Bonfire Id"},"description":"Bonfire identifier"},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Natural language query","title":"Query"},"description":"Natural language query"},{"name":"center_uuid","in":"query","required":true,"schema":{"type":"string","description":"Entity uuid that anchors the search","title":"Center Uuid"},"description":"Entity uuid that anchors the search"},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max results to return","default":10,"title":"Top K"},"description":"Max results to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/communities/entity/{entity_uuid}":{"get":{"tags":["knowledge_graph"],"summary":"Get Community For Entity Endpoint","description":"Get the community an entity belongs to, with its other members.","operationId":"get_community_for_entity_endpoint_knowledge_graph_communities_entity__entity_uuid__get","parameters":[{"name":"entity_uuid","in":"path","required":true,"schema":{"type":"string","title":"Entity Uuid"}},{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","description":"Bonfire identifier","title":"Bonfire Id"},"description":"Bonfire identifier"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/knowledge_graph/bonfire-graph":{"get":{"tags":["knowledge_graph"],"summary":"Get Bonfire Graph","description":"Return all entities, edges, and episodes for a bonfire.","operationId":"get_bonfire_graph_knowledge_graph_bonfire_graph_get","parameters":[{"name":"bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents":{"post":{"tags":["agents"],"summary":"Create Agent","description":"Create a new agent.","operationId":"create_agent_agents_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agents"],"summary":"List Agents","description":"List agents, optionally filtered by bonfire, active status, or username.","operationId":"list_agents_agents_get","parameters":[{"name":"bonfire_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by bonfire ID or name","title":"Bonfire Id"},"description":"Filter by bonfire ID or name"},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only return active agents","default":false,"title":"Active Only"},"description":"Only return active agents"},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by username","title":"Username"},"description":"Filter by username"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/agents/{agent_id}":{"get":{"tags":["agents"],"summary":"Get Agent","description":"Get agent by ID or username.","operationId":"get_agent_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agents"],"summary":"Update Agent","description":"Update agent properties.","operationId":"update_agent_agents__agent_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-config"],"summary":"Delete Agent","description":"Hard-delete an agent: permanently remove the agent document from the database.","operationId":"delete_agent_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/bonfire":{"get":{"tags":["agents"],"summary":"Get Agent Bonfire","description":"Get the bonfire an agent is registered to.","operationId":"get_agent_bonfire_agents__agent_id__bonfire_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBonfireResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/register":{"post":{"tags":["agents"],"summary":"Register Agent To Bonfire","description":"Register an agent to a bonfire.","operationId":"register_agent_to_bonfire_agents_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAgentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/unregister":{"post":{"tags":["agents"],"summary":"Unregister Agent From Bonfire","description":"Unregister an agent from a bonfire.","operationId":"unregister_agent_from_bonfire_agents_unregister_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnregisterAgentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/latest_episode":{"get":{"tags":["agents"],"summary":"Get Agent Latest Episode","description":"Retrieve the agent's most recent episode UUID for context.","operationId":"get_agent_latest_episode_agents__agent_id__latest_episode_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestEpisodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/chat":{"post":{"tags":["agents"],"summary":"Chat With Agent","description":"Chat with an agent using LangGraph-based conversation flow.","operationId":"chat_with_agent_agents__agent_id__chat_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LangGraphChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/chat/stream":{"post":{"tags":["agents"],"summary":"Stream Chat With Agent","description":"Stream chat responses with proper token-level streaming.","operationId":"stream_chat_with_agent_agents__agent_id__chat_stream_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LangGraphChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/stack/add":{"post":{"tags":["agents"],"summary":"Add Message To Stack","description":"Add a message or batch of messages to the agent's episodic stack.","operationId":"add_message_to_stack_agents__agent_id__stack_add_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAddResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/stack/status":{"get":{"tags":["agents"],"summary":"Get Stack Status","description":"Get current stack status for an agent.","operationId":"get_stack_status_agents__agent_id__stack_status_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/stack/search":{"post":{"tags":["agents"],"summary":"Search Stack","description":"Perform semantic search within the agent's stack.","operationId":"search_stack_agents__agent_id__stack_search_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/stack/process":{"post":{"tags":["agents"],"summary":"Process Stack","description":"Process the agent's stack in background.","operationId":"process_stack_agents__agent_id__stack_process_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/subscribers":{"post":{"tags":["agents"],"summary":"Add Subscriber","description":"Subscribe a target agent to receive episode summaries from this agent.","operationId":"add_subscriber_agents__agent_id__subscribers_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Subscriber Agents  Agent Id  Subscribers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agents"],"summary":"List Subscribers","description":"List current episode subscribers for this agent.","operationId":"list_subscribers_agents__agent_id__subscribers_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Subscribers Agents  Agent Id  Subscribers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/subscribers/{target_agent_id}":{"delete":{"tags":["agents"],"summary":"Remove Subscriber","description":"Remove a subscriber from this agent's episode notifications.","operationId":"remove_subscriber_agents__agent_id__subscribers__target_agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"target_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Target Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfires/{bonfire_id}/agents":{"get":{"tags":["agents","bonfires"],"summary":"Get Bonfire Agents","description":"Get all agents registered to a bonfire.","operationId":"get_bonfire_agents_bonfires__bonfire_id__agents_get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireAgentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfires/{bonfire_id}/pricing":{"get":{"tags":["agents","bonfires"],"summary":"Get Bonfire Pricing","description":"Get bonfire agent marketplace pricing.","operationId":"get_bonfire_pricing_bonfires__bonfire_id__pricing_get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfirePricingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agents","bonfires"],"summary":"Update Bonfire Pricing","description":"Update bonfire agent marketplace pricing (owner only).","operationId":"update_bonfire_pricing_bonfires__bonfire_id__pricing_put","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBonfirePricingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfirePricingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfires/list":{"get":{"tags":["bonfires"],"summary":"List Bonfires","description":"Return all bonfires as lightweight id+name pairs.\n\nUsed by the synthesis frontend dropdown to populate track filters.","operationId":"list_bonfires_bonfires_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Response List Bonfires Bonfires List Get"}}}}},"security":[]}},"/llm-models/list":{"get":{"tags":["llm-models"],"summary":"List Llm Models","description":"Return active LLM model presets (without providerConfig).\n\nUsed by the agent-config dashboard to populate model selector dropdowns.","operationId":"list_llm_models_llm_models_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Llm Models Llm Models List Get"}}}}}}},"/clusters":{"post":{"tags":["clusters"],"summary":"Create Cluster","operationId":"create_cluster_clusters_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBonfireClusterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireClusterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["clusters"],"summary":"List Clusters","operationId":"list_clusters_clusters_get","parameters":[{"name":"owner_bonfire_id","in":"query","required":true,"schema":{"type":"string","title":"Owner Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireClusterListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clusters/{cluster_id}":{"get":{"tags":["clusters"],"summary":"Get Cluster","operationId":"get_cluster_clusters__cluster_id__get","parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","title":"Cluster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireClusterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["clusters"],"summary":"Update Cluster","operationId":"update_cluster_clusters__cluster_id__patch","parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","title":"Cluster Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBonfireClusterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireClusterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["clusters"],"summary":"Delete Cluster","operationId":"delete_cluster_clusters__cluster_id__delete","parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","title":"Cluster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/clusters/{cluster_id}/members":{"post":{"tags":["clusters"],"summary":"Add Members","operationId":"add_members_clusters__cluster_id__members_post","parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","title":"Cluster Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterMembershipRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireClusterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["clusters"],"summary":"Remove Members","operationId":"remove_members_clusters__cluster_id__members_delete","parameters":[{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","title":"Cluster Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterMembershipRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonfireClusterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/env-vars":{"get":{"tags":["agent-config"],"summary":"List Env Vars","description":"List env var keys for an agent (values are masked for security).","operationId":"list_env_vars_agents__agent_id__env_vars_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvVarsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-config"],"summary":"Upsert Env Vars","description":"Create or update environment variables for an agent.","operationId":"upsert_env_vars_agents__agent_id__env_vars_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertEnvVarsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvVarsUpsertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/env-vars/{key}":{"delete":{"tags":["agent-config"],"summary":"Delete Env Var","description":"Delete a specific environment variable.","operationId":"delete_env_var_agents__agent_id__env_vars__key__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvVarDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/personality":{"get":{"tags":["agent-config"],"summary":"Get Personality","description":"Get personality traits for an agent, grouped by section.","operationId":"get_personality_agents__agent_id__personality_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/personality/traits":{"put":{"tags":["agent-config"],"summary":"Add Personality Traits","description":"Add new personality traits.","operationId":"add_personality_traits_agents__agent_id__personality_traits_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPersonalityTraitsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityTraitsModifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agent-config"],"summary":"Update Personality Traits","description":"Update existing personality traits by ID.","operationId":"update_personality_traits_agents__agent_id__personality_traits_patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonalityTraitsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityTraitsModifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-config"],"summary":"Delete Personality Traits","description":"Delete personality traits by IDs.","operationId":"delete_personality_traits_agents__agent_id__personality_traits_delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePersonalityTraitsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityTraitsModifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/personality/replace":{"put":{"tags":["agent-config"],"summary":"Replace Personality","description":"Replace entire personality with new traits.","operationId":"replace_personality_agents__agent_id__personality_replace_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplacePersonalityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/chat-config":{"get":{"tags":["agent-config"],"summary":"Get Chat Config","description":"Get chat configuration for an agent.","operationId":"get_chat_config_agents__agent_id__chat_config_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-config"],"summary":"Update Chat Config","description":"Update chat configuration for an agent.","operationId":"update_chat_config_agents__agent_id__chat_config_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/features":{"get":{"tags":["agent-config"],"summary":"Get Agent Features","description":"Get agent feature flags.","operationId":"get_agent_features_agents__agent_id__features_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFeaturesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-config"],"summary":"Update Agent Features","description":"Update agent feature flags.","operationId":"update_agent_features_agents__agent_id__features_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentFeaturesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFeaturesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/llm-config":{"get":{"tags":["agent-config"],"summary":"Get Llm Config","description":"Get per-agent LLM model configuration.","operationId":"get_llm_config_agents__agent_id__llm_config_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-config"],"summary":"Update Llm Config","description":"Update per-agent LLM model configuration.","operationId":"update_llm_config_agents__agent_id__llm_config_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLlmConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/skills":{"get":{"tags":["agent-config"],"summary":"Get Enabled Skills","description":"Get enabled skills for an agent.","operationId":"get_enabled_skills_agents__agent_id__skills_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Enabled Skills Agents  Agent Id  Skills Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-config"],"summary":"Update Enabled Skills","description":"Update enabled skills for an agent.","operationId":"update_enabled_skills_agents__agent_id__skills_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnabledSkillsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Update Enabled Skills Agents  Agent Id  Skills Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/mcp":{"get":{"tags":["agent-config"],"summary":"List Mcp Tools","description":"List available MCP tools.","operationId":"list_mcp_tools_tools_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolsListResponse"}}}}}}},"/tools/skills":{"get":{"tags":["agent-config"],"summary":"List Skills","description":"List available agent skills.","operationId":"list_skills_tools_skills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillsListResponse"}}}}}}},"/payment/config":{"get":{"tags":["payments"],"summary":"Get Payment Config","description":"Return x402 payment configuration for clients.\n\nClients use this to construct x402 payment headers with the correct\nrecipient address, network, and token contract.\n\nWhen hackathon_track_id or dataroom_id is provided, payTo is set to the\ntrack's escrow contract address so payments fund the hackathon prize pool.","operationId":"get_payment_config_payment_config_get","parameters":[{"name":"hackathon_track_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional hackathon track ID — overrides payTo with the track's escrow address","title":"Hackathon Track Id"},"description":"Optional hackathon track ID — overrides payTo with the track's escrow address"},{"name":"dataroom_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional dataroom ID — auto-detects if it belongs to a hackathon track","title":"Dataroom Id"},"description":"Optional dataroom ID — auto-detects if it belongs to a hackathon track"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/paid/agents/{agent_id}/chat":{"post":{"tags":["payments"],"summary":"Paid Agent Chat","description":"Execute payment-gated agent chat with microsub support.","operationId":"paid_agent_chat_paid_agents__agent_id__chat_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidAgentChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LangGraphChatResponseWithPayment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/paid/agents/{agent_id}/delve":{"post":{"tags":["payments"],"summary":"Paid Agent Delve","description":"Execute payment-gated delve search with microsub support.","operationId":"paid_agent_delve_paid_agents__agent_id__delve_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidDelveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelveResponseWithPayment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/microsubs":{"post":{"tags":["payments"],"summary":"Create Microsub","description":"Create a new microsub subscription without executing queries.","operationId":"create_microsub_microsubs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMicrosubRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMicrosubResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["payments"],"summary":"List Microsubs","description":"List all microsubs for a given wallet address.","operationId":"list_microsubs_microsubs_get","parameters":[{"name":"wallet_address","in":"query","required":true,"schema":{"type":"string","description":"Wallet address to filter microsubs","title":"Wallet Address"},"description":"Wallet address to filter microsubs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosubListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/microsubs/{tx_hash}/htn":{"get":{"tags":["payments"],"summary":"Get Microsub Htn Status","description":"Get HTN curriculum status for a specific microsub.","operationId":"get_microsub_htn_status_microsubs__tx_hash__htn_get","parameters":[{"name":"tx_hash","in":"path","required":true,"schema":{"type":"string","title":"Tx Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bonfires/{bonfire_id}/purchase-agent":{"post":{"tags":["payments"],"summary":"Purchase Agent","description":"Purchase an agent slot on a public bonfire via x402 payment.","operationId":"purchase_agent_bonfires__bonfire_id__purchase_agent_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/paid/voice/session":{"post":{"tags":["payments"],"summary":"Create Voice Session","description":"Create a paid voice session. Returns a signed JWT for LiveKit access.","operationId":"create_voice_session_paid_voice_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchased-agents":{"get":{"tags":["payments"],"summary":"List Purchased Agents","description":"List purchased-agent records for wallet resolution flows.","operationId":"list_purchased_agents_purchased_agents_get","parameters":[{"name":"wallet_address","in":"query","required":true,"schema":{"type":"string","description":"Purchaser wallet address","title":"Wallet Address"},"description":"Purchaser wallet address"},{"name":"bonfire_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional bonfire id filter","title":"Bonfire Id"},"description":"Optional bonfire id filter"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional agent id filter","title":"Agent Id"},"description":"Optional agent id filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchased-agents/{purchase_id}/reveal_nonce":{"get":{"tags":["payments"],"summary":"Get Reveal Nonce","description":"Get a nonce for API key reveal (Web purchased agents).","operationId":"get_reveal_nonce_purchased_agents__purchase_id__reveal_nonce_get","parameters":[{"name":"purchase_id","in":"path","required":true,"schema":{"type":"string","title":"Purchase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealNonceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchased-agents/{purchase_id}/reveal_api_key":{"post":{"tags":["payments"],"summary":"Reveal Api Key","description":"Reveal the API key for a purchased Web agent using wallet signature.","operationId":"reveal_api_key_purchased_agents__purchase_id__reveal_api_key_post","parameters":[{"name":"purchase_id","in":"path","required":true,"schema":{"type":"string","title":"Purchase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/hyperblogs":{"get":{"tags":["datarooms","marketplace","hyperblogs"],"summary":"Get All Public Hyperblogs","description":"Fetch public hyperblogs aggregated across all datarooms.\n\nReturns a paginated list of public hyperblogs from all datarooms. This endpoint\nenables marketplace-style discovery of AI-generated blog posts across the entire\nplatform. Results are sorted by creation date (newest first).\n\nThe endpoint is accessible at `/datarooms/hyperblogs` due to the router prefix.\n\nSupports optional filtering:\n- By dataroom_id: Limit results to a specific dataroom\n- By bonfire_id: Limit results to datarooms belonging to a bonfire\n- By status: Filter by generation_status ('generating', 'completed', 'failed')\n- By generation_mode: Filter by generation mode ('blog', 'card')\n\nArgs:\n    limit: Maximum number of hyperblogs to return (1-50, default 10)\n    offset: Number of hyperblogs to skip for pagination (default 0)\n    dataroom_id: Optional filter by specific dataroom ID\n    bonfire_id: Optional filter by bonfire ID\n    status: Optional filter by generation status\n    generation_mode: Optional filter by generation mode\n\nReturns:\n    AggregatedHyperBlogsResponse containing:\n        - hyperblogs: List of HyperBlogInfo objects with author enrichment\n        - count: Number of hyperblogs returned in this response\n        - limit: Maximum results per page (as requested)\n        - offset: Offset for pagination (as requested)\n\n    Each HyperBlogInfo includes:\n        - id, dataroom_id, user_query, blog_content preview\n        - author_wallet, author_name, author_username (enriched)\n        - blog_length, generation_status, is_public, tx_hash\n        - word_count, created_at\n\nRaises:\n    400: Invalid parameters (limit out of range, offset negative, invalid dataroom_id format)\n    500: Internal server error during query or enrichment\n\nExample:\n    GET /datarooms/hyperblogs?limit=20&offset=0&status=completed&bonfire_id=abc123\n\n    Returns first 20 completed public hyperblogs from datarooms belonging to the bonfire.","operationId":"get_all_public_hyperblogs_datarooms_hyperblogs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum number of hyperblogs to return (1-50)","default":10,"title":"Limit"},"description":"Maximum number of hyperblogs to return (1-50)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"dataroom_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter by dataroom ID","title":"Dataroom Id"},"description":"Optional filter by dataroom ID"},{"name":"bonfire_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter by bonfire ID (returns hyperblogs from all datarooms belonging to the bonfire)","title":"Bonfire Id"},"description":"Optional filter by bonfire ID (returns hyperblogs from all datarooms belonging to the bonfire)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter by generation status (generating, completed, failed)","title":"Status"},"description":"Optional filter by generation status (generating, completed, failed)"},{"name":"generation_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filter by generation mode (blog, card)","title":"Generation Mode"},"description":"Optional filter by generation mode (blog, card)"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order: 'created_at' (default) or 'upvotes'","title":"Sort By"},"description":"Sort order: 'created_at' (default) or 'upvotes'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedHyperBlogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms/hyperblogs/purchase":{"post":{"tags":["datarooms","hyperblogs","marketplace"],"summary":"Purchase Hyperblog","description":"Purchase and generate a HyperBlog from a dataroom.\n\nThis endpoint handles payment verification, settlement, and schedules\nbackground blog generation via TaskQueueService with persistent retries.\nThe blog generation happens asynchronously to avoid blocking the response.\n\nArgs:\n    request: PurchaseHyperBlogRequest with payment_header, dataroom_id, user_query, etc.\n\nReturns:\n    PurchaseHyperBlogResponse with hyperblog info and payment details\n\nRaises:\n    400: Invalid request parameters\n    402: Payment verification or settlement failed\n    404: DataRoom not found\n    409: DataRoom is inactive\n    500: Internal server error\n    503: Payment service unavailable\n\nNote:\n    The endpoint URL is /datarooms/hyperblogs/purchase (due to router prefix).\n    This is semantically correct as purchase is a dataroom operation.","operationId":"purchase_hyperblog_datarooms_hyperblogs_purchase_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseHyperBlogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseHyperBlogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms/hyperblogs/{hyperblog_id}/vote":{"post":{"tags":["datarooms","hyperblogs","social"],"summary":"Vote On Hyperblog","description":"Vote on a hyperblog (upvote or downvote).\n\nUsers can vote 'upvote' or 'downvote'. Voting the same type again removes the vote (toggle).\nVoting the opposite type changes the vote.\n\nArgs:\n    hyperblog_id: HyperBlog ObjectId\n    request: Vote request with vote_type and user_wallet\n\nReturns:\n    HyperBlogVoteResponse with updated counts and user's current vote status\n\nRaises:\n    400: Invalid ID format or vote type\n    404: Hyperblog not found\n    500: Server error","operationId":"vote_on_hyperblog_datarooms_hyperblogs__hyperblog_id__vote_post","parameters":[{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogVoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogVoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms/hyperblogs/{hyperblog_id}/comments":{"get":{"tags":["datarooms","hyperblogs","social"],"summary":"Get Hyperblog Comments","description":"Fetch paginated comments for a hyperblog.\n\nReturns comments sorted by creation date (newest first).\n\nArgs:\n    hyperblog_id: HyperBlog ObjectId\n    limit: Max results (1-100)\n    offset: Pagination offset\n\nReturns:\n    HyperBlogCommentsResponse with list of comments and total count\n\nRaises:\n    400: Invalid ID format or parameters\n    404: Hyperblog not found\n    500: Server error","operationId":"get_hyperblog_comments_datarooms_hyperblogs__hyperblog_id__comments_get","parameters":[{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum comments per page","default":20,"title":"Limit"},"description":"Maximum comments per page"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogCommentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]},"post":{"tags":["datarooms","hyperblogs","social"],"summary":"Add Hyperblog Comment","description":"Add a new comment to a hyperblog.\n\nSupports threaded replies via parent_comment_id.\n\nArgs:\n    hyperblog_id: HyperBlog ObjectId\n    request: Comment request with content and user_wallet\n\nReturns:\n    HyperBlogCommentInfo for the created comment\n\nRaises:\n    400: Invalid ID format, content length, or parent comment not found\n    404: Hyperblog not found\n    500: Server error","operationId":"add_hyperblog_comment_datarooms_hyperblogs__hyperblog_id__comments_post","parameters":[{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogCommentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogCommentInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms/hyperblogs/{hyperblog_id}/view":{"post":{"tags":["datarooms","hyperblogs","analytics"],"summary":"Record Hyperblog View","description":"Record a view event for a hyperblog.\n\nIncludes deduplication to prevent counting multiple views from the same user/session\nwithin a short time window (1 hour).\n\nArgs:\n    hyperblog_id: HyperBlog ObjectId\n    request: View request with user_wallet or session_id\n\nReturns:\n    HyperBlogViewResponse with updated view count\n\nRaises:\n    400: Invalid ID format\n    404: Hyperblog not found\n    500: Server error (will likely swallow error and return 0 count in controller)","operationId":"record_hyperblog_view_datarooms_hyperblogs__hyperblog_id__view_post","parameters":[{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogViewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogViewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/hyperblogs/{hyperblog_id}/banner":{"post":{"tags":["datarooms","hyperblogs","banner"],"summary":"Generate Hyperblog Banner","description":"Generate a banner image for a hyperblog using its image_prompt field.\n\nCalls external image generation API (SubNP) with the hyperblog's image_prompt.\nIf banner_url already exists, returns cached URL. Otherwise, generates new banner\nand stores URL in database.\n\nTheming is controlled via HTN templates and DataRoom system_prompt configuration,\nnot via API parameters. See THEMING_GUIDE.md for details.\n\nArgs:\n    hyperblog_id: HyperBlog ObjectId as string\n\nReturns:\n    HyperBlogBannerResponse with banner URL or error information:\n        - success: Whether banner generation succeeded\n        - banner_url: Generated banner URL or base64 data (None if failed)\n        - hyperblog_id: HyperBlog ObjectId as string\n        - cached: Whether the banner was already generated\n        - error: Error message if generation failed\n\nRaises:\n    400: Invalid hyperblog_id format\n    404: Hyperblog not found or no image_prompt available\n    500: Failed to generate banner","operationId":"generate_hyperblog_banner_datarooms_hyperblogs__hyperblog_id__banner_post","parameters":[{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperBlogBannerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/{dataroom_id}/hyperblogs/generate":{"post":{"tags":["datarooms","hyperblogs","internal"],"summary":"Generate Hyperblog Internal","description":"Generate a HyperBlog without X402 payment (auth-only).\n\nFor internal use by trusted systems (game server, automation).\nRequires WRITE permission on the bonfire via API key.","operationId":"generate_hyperblog_internal_datarooms__dataroom_id__hyperblogs_generate_post","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/hyperblogs/{hyperblog_id}/regenerate":{"post":{"tags":["datarooms","hyperblogs"],"summary":"Regenerate Hyperblog","description":"Regenerate a failed HyperBlog.\n\nRe-enqueues the generation task for a hyperblog that previously failed.\nOnly works on blogs with generation_status='failed'. No additional payment required.\n\nArgs:\n    hyperblog_id: HyperBlog ObjectId as string\n\nReturns:\n    Dict with hyperblog id and new generation status\n\nRaises:\n    400: Blog is not in failed state\n    404: HyperBlog not found","operationId":"regenerate_hyperblog_datarooms_hyperblogs__hyperblog_id__regenerate_post","parameters":[{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/hyperblogs/{hyperblog_id}":{"get":{"tags":["datarooms","hyperblogs","polling"],"summary":"Get Hyperblog For Polling","description":"Retrieve a specific HyperBlog by ID for status polling.\n\nThis endpoint allows fetching a hyperblog without knowing its dataroom_id,\nwhich is useful for frontend polling after purchase (via tx_hash) or direct\nlinking. Resolves to /datarooms/hyperblogs/{hyperblog_id}.\n\nArgs:\n    hyperblog_id: HyperBlog ObjectId as string\n    wallet: Optional wallet address for private blog access\n\nReturns:\n    SingleHyperBlogResponse with complete blog content\n\nRaises:\n    400: Invalid ID format\n    403: Access denied (private blog)\n    404: Not found\n    500: Server error","operationId":"get_hyperblog_for_polling_datarooms_hyperblogs__hyperblog_id__get","parameters":[{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}},{"name":"wallet","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Wallet address for private blog access verification","title":"Wallet"},"description":"Wallet address for private blog access verification"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleHyperBlogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms":{"post":{"tags":["datarooms","marketplace"],"summary":"Create Dataroom","description":"Create a new DataRoom.\n\nCreates a new data room with the specified configuration. Data rooms are\ncontainers for knowledge graphs, hyperblogs, and subscriptions.\n\nArgs:\n    request: CreateDataRoomRequest with name, description, bonfire_id, etc.\n\nReturns:\n    DataRoomInfo with created dataroom details\n\nRaises:\n    400: Invalid request data\n    500: Server error","operationId":"create_dataroom_datarooms_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataRoomRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRoomInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["datarooms","marketplace"],"summary":"List Datarooms","description":"List all DataRooms with pagination and filtering.\n\nReturns a paginated list of datarooms. Supports filtering by bonfire,\ncreator wallet, and active status.\n\nArgs:\n    limit: Maximum results (1-100)\n    offset: Pagination offset\n    include_inactive: Whether to include inactive datarooms\n    bonfire_id: Optional filter by bonfire\n    creator_wallet: Optional filter by creator\n    sort_by: Sort field ('created_at' or 'total_purchases')\n\nReturns:\n    DataRoomListResponse with list of datarooms and pagination info\n\nRaises:\n    400: Invalid parameters\n    500: Server error","operationId":"list_datarooms_datarooms_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of datarooms to return","default":10,"title":"Limit"},"description":"Maximum number of datarooms to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","description":"Include inactive datarooms","default":false,"title":"Include Inactive"},"description":"Include inactive datarooms"},{"name":"bonfire_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by bonfire ID","title":"Bonfire Id"},"description":"Filter by bonfire ID"},{"name":"creator_wallet","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by creator wallet address","title":"Creator Wallet"},"description":"Filter by creator wallet address"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order: 'created_at' (default) or 'total_purchases'","title":"Sort By"},"description":"Sort order: 'created_at' (default) or 'total_purchases'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRoomListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms/{dataroom_id}/contributions":{"get":{"tags":["datarooms","analytics","contributions"],"summary":"Get Dataroom Contributions","description":"Get contribution statistics for a dataroom.\n\nReturns aggregated statistics showing which users contributed the most\ncontent (entities/episodes) to HyperCards generated in this dataroom.\nUseful for reward distribution and contributor recognition.\n\nArgs:\n    dataroom_id: DataRoom ObjectId\n    limit: Max contributors to return (1-100)\n    min_contributions: Minimum entity contributions to include user\n\nReturns:\n    DataRoomContributionsResponse with dataroom_id, bonfire_id,\n    total_cards_analyzed, and contributors list sorted by contribution count\n\nRaises:\n    400: Invalid dataroom_id format\n    404: DataRoom not found\n    500: Server error","operationId":"get_dataroom_contributions_datarooms__dataroom_id__contributions_get","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum contributors to return","default":10,"title":"Limit"},"description":"Maximum contributors to return"},{"name":"min_contributions","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Minimum contribution count to include","default":1,"title":"Min Contributions"},"description":"Minimum contribution count to include"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRoomContributionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/{dataroom_id}/htn":{"get":{"tags":["datarooms","htn"],"summary":"Get Dataroom Htn","description":"Fetch HTN curriculum status for a dataroom.\n\nReturns the current Hierarchical Task Network (HTN) curriculum structure,\nprogress, and phase information for the specified dataroom. This endpoint\nenables initial page load HTN display, status refresh without chat interaction,\nand admin/debugging access to HTN data.\n\nOptionally fetch personalized HTN for a specific microsub (subscription).\nPersonalized HTNs track individual learner progress, while shared HTNs\nprovide curriculum structure for all learners in the dataroom.\n\nArgs:\n    dataroom_id: DataRoom ObjectId as string\n    microsub_id: Optional Microsub ID for personalized curriculum\n\nReturns:\n    HTN status dict with curriculum structure, progress, and current phase.\n\n    Success Response (HTN Found):\n    {\n        \"enabled\": true,\n        \"graph_id\": \"507f1f77bcf86cd799439011\",\n        \"graph_hash\": \"abc123...\",\n        \"current_phase\": {\n            \"id\": \"phase_1_intro\",\n            \"name\": \"Introduction\",\n            \"description\": \"Learn the basics...\",\n            \"order\": 1\n        },\n        \"progress\": {\n            \"completed_phases\": 0,\n            \"total_phases\": 5,\n            \"progress_percentage\": 0.0\n        },\n        \"next_phase\": {\n            \"id\": \"phase_2_eval\",\n            \"name\": \"Evaluation\"\n        },\n        \"all_phases\": [...],\n        \"htn_tree\": {\n            \"nodes\": [...],\n            \"edges\": [...]\n        },\n        \"dataroom_id\": \"507f1f77bcf86cd799439012\",\n        \"microsub_id\": null,\n        \"fetched_at\": \"2024-01-15T10:30:00Z\"\n    }\n\n    Not Found Response:\n    {\n        \"enabled\": false,\n        \"message\": \"No HTN curriculum available for this dataroom\",\n        \"dataroom_id\": \"507f1f77bcf86cd799439012\",\n        \"htn_tree\": {\n            \"nodes\": [],\n            \"edges\": []\n        }\n    }\n\nRaises:\n    400: If dataroom_id or microsub_id format is invalid, or microsub mismatch\n    404: If data room not found\n    503: If HTN tracking service unavailable\n    500: If internal server error occurs","operationId":"get_dataroom_htn_datarooms__dataroom_id__htn_get","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}},{"name":"microsub_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional Microsub ID for personalized HTN","title":"Microsub Id"},"description":"Optional Microsub ID for personalized HTN"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/{dataroom_id}/hyperblogs":{"get":{"tags":["datarooms","marketplace","hyperblogs"],"summary":"Get Dataroom Hyperblogs","description":"Fetch public hyperblogs for a dataroom.\n\nReturns a paginated list of public hyperblogs associated with the specified\ndataroom. Hyperblogs are AI-generated blog posts created from dataroom\nknowledge graphs. Results are sorted by creation date (newest first).\n\nArgs:\n    dataroom_id: DataRoom ObjectId as string\n    limit: Maximum number of hyperblogs to return (1-50, default 10)\n    offset: Number of hyperblogs to skip for pagination (default 0)\n\nReturns:\n    DataRoomHyperBlogsResponse with list of hyperblogs, count, dataroom_id, limit, and offset\n\nRaises:\n    400: If dataroom_id format is invalid or parameters out of range\n    404: If data room not found\n    500: If internal server error occurs","operationId":"get_dataroom_hyperblogs_datarooms__dataroom_id__hyperblogs_get","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum number of hyperblogs to return (1-50)","default":10,"title":"Limit"},"description":"Maximum number of hyperblogs to return (1-50)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRoomHyperBlogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms/{dataroom_id}/hyperblogs/{hyperblog_id}":{"get":{"tags":["datarooms","marketplace","hyperblogs"],"summary":"Get Single Hyperblog","description":"Fetch a single hyperblog by ID with full content.\n\nReturns the complete hyperblog including all sections with full markdown content.\nPublic blogs are accessible to all users. Private blogs require wallet address\nverification to ensure only the owner can access.\n\nArgs:\n    dataroom_id: DataRoom ObjectId as string\n    hyperblog_id: HyperBlog ObjectId as string\n    wallet: Optional wallet address for private blog access (required for private blogs)\n\nReturns:\n    SingleHyperBlogResponse with complete blog content, metadata, and author details\n\nRaises:\n    400: If dataroom_id or hyperblog_id format is invalid, or hyperblog doesn't belong to dataroom\n    403: If blog is private and wallet is missing or doesn't match owner\n    404: If hyperblog or dataroom not found\n    500: If internal server error occurs","operationId":"get_single_hyperblog_datarooms__dataroom_id__hyperblogs__hyperblog_id__get","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}},{"name":"hyperblog_id","in":"path","required":true,"schema":{"type":"string","title":"Hyperblog Id"}},{"name":"wallet","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Wallet address for private blog access verification","title":"Wallet"},"description":"Wallet address for private blog access verification"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleHyperBlogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/{dataroom_id}":{"get":{"tags":["datarooms","marketplace"],"summary":"Get Dataroom","description":"Get a single DataRoom by ID.\n\nReturns the full details of a specific dataroom.\n\nArgs:\n    dataroom_id: DataRoom ObjectId as string\n\nReturns:\n    DataRoomInfo with dataroom details\n\nRaises:\n    400: Invalid ID format\n    404: DataRoom not found\n    500: Server error","operationId":"get_dataroom_datarooms__dataroom_id__get","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRoomInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datarooms/{dataroom_id}/preview":{"post":{"tags":["datarooms","marketplace"],"summary":"Preview Dataroom","description":"Preview DataRoom entities and knowledge graph.\n\nReturns a preview of the dataroom's knowledge graph entities based on\nthe dataroom's description. Useful for marketplace previews before subscription.\n\nArgs:\n    dataroom_id: DataRoom ObjectId as string\n    num_results: Number of preview entities to return (1-50)\n\nReturns:\n    DataRoomPreviewResponse with preview entities\n\nRaises:\n    400: Invalid ID format or request\n    404: DataRoom not found\n    500: Server error","operationId":"preview_dataroom_datarooms__dataroom_id__preview_post","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}},{"name":"num_results","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of preview entities to return","default":10,"title":"Num Results"},"description":"Number of preview entities to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRoomPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/datarooms/{dataroom_id}/microsubs":{"get":{"tags":["datarooms","marketplace"],"summary":"List Dataroom Microsubs","description":"List microsubs for a specific DataRoom.\n\nReturns all micro-subscriptions associated with a dataroom.\nOptionally filter by wallet address.\n\nArgs:\n    dataroom_id: DataRoom ObjectId as string\n    wallet_address: Optional filter by subscriber wallet\n\nReturns:\n    DataRoomMicrosubsResponse with list of microsubs\n\nRaises:\n    400: Invalid ID format\n    404: DataRoom not found\n    500: Server error","operationId":"list_dataroom_microsubs_datarooms__dataroom_id__microsubs_get","parameters":[{"name":"dataroom_id","in":"path","required":true,"schema":{"type":"string","title":"Dataroom Id"}},{"name":"wallet_address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by wallet address","title":"Wallet Address"},"description":"Filter by wallet address"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRoomMicrosubsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hackathon/tracks":{"get":{"tags":["hackathon"],"summary":"List Tracks","description":"List active and upcoming hackathon tracks.","operationId":"list_tracks_hackathon_tracks_get","parameters":[{"name":"cadence","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by cadence: weekly, monthly, yearly","title":"Cadence"},"description":"Filter by cadence: weekly, monthly, yearly"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: upcoming, active, judging, completed","title":"Status"},"description":"Filter by status: upcoming, active, judging, completed"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["hackathon","admin"],"summary":"Create Track","description":"Create a hackathon track from a rubric (admin only).\n\nBody: {name, cadence, rubric_id, bonfire_ref, escrow_address, starts_at, ends_at,\n       description?, platform_fee_bps?, base_price_usd?, price_step_usd?, price_decay_rate?}","operationId":"create_track_hackathon_tracks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/hackathon/tracks/{track_id}":{"get":{"tags":["hackathon"],"summary":"Get Track","description":"Get track detail with current pricing and submission count.","operationId":"get_track_hackathon_tracks__track_id__get","parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["hackathon","admin"],"summary":"Update Track Status","description":"Update track status (admin only).","operationId":"update_track_status_hackathon_tracks__track_id__patch","parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hackathon/tracks/{track_id}/leaderboard":{"get":{"tags":["hackathon"],"summary":"Get Leaderboard","description":"Get paginated leaderboard — aggregates HyperBlogs by wallet.","operationId":"get_leaderboard_hackathon_tracks__track_id__leaderboard_get","parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort: weighted_score, community_votes, recent","default":"weighted_score","title":"Sort By"},"description":"Sort: weighted_score, community_votes, recent"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hackathon/tracks/{track_id}/vote":{"post":{"tags":["hackathon"],"summary":"Vote Submission","description":"Vote on a HyperBlog submission.","operationId":"vote_submission_hackathon_tracks__track_id__vote_post","parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hackathon/tracks/{track_id}/judge":{"post":{"tags":["hackathon","admin"],"summary":"Run Judging","description":"Run the judging agent on a track's submissions (admin only).\n\nReturns a JudgingProposal with rankings and proposed prize distribution.","operationId":"run_judging_hackathon_tracks__track_id__judge_post","parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/htn-templates":{"get":{"tags":["htn-templates"],"summary":"List Templates","description":"List active HTN templates.\n\nArgs:\n    template_type: Optional filter by template type\n\nReturns:\n    HTNTemplateListResponse with templates list and count","operationId":"list_templates_htn_templates_get","parameters":[{"name":"template_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["blog","card","curriculum"],"type":"string"},{"type":"null"}],"description":"Filter by template type (blog, card, curriculum)","title":"Template Type"},"description":"Filter by template type (blog, card, curriculum)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTNTemplateListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["htn-templates"],"summary":"Create Template","description":"Create a new HTN template.\n\nArgs:\n    request: CreateHTNTemplateRequest with template configuration\n\nReturns:\n    HTNTemplateInfo with created template details","operationId":"create_template_htn_templates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHTNTemplateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTNTemplateInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/htn-templates/{template_id}":{"get":{"tags":["htn-templates"],"summary":"Get Template","description":"Get a single HTN template by ID.\n\nArgs:\n    template_id: Template ObjectId as string\n\nReturns:\n    HTNTemplateInfo with template details","operationId":"get_template_htn_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTNTemplateInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/provision":{"post":{"tags":["provision"],"summary":"Provision","description":"Verify an on-chain provision tx and create all off-chain resources.\n\nRequires admin API key. Idempotent: re-submitting the same tx_hash\nreturns the existing provisioned bonfire record.","operationId":"provision_provision_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["provision"],"summary":"List Provisioned Bonfires","description":"List provisioned bonfires for a wallet address.\n\nNever returns raw API keys — use the reveal flow to retrieve them.","operationId":"list_provisioned_bonfires_provision_get","parameters":[{"name":"wallet_address","in":"query","required":true,"schema":{"type":"string","description":"Ethereum wallet address to list bonfires for","title":"Wallet Address"},"description":"Ethereum wallet address to list bonfires for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/provision/reveal_nonce":{"get":{"tags":["provision"],"summary":"Get Reveal Nonce","description":"Issue a short-lived nonce for the API key reveal challenge.\n\nThe returned message must be signed with the provisioning wallet via\nEIP-191 signMessage and submitted to POST /provision/reveal_api_key.","operationId":"get_reveal_nonce_provision_reveal_nonce_get","parameters":[{"name":"tx_hash","in":"query","required":true,"schema":{"type":"string","description":"Transaction hash of the provisioned bonfire","title":"Tx Hash"},"description":"Transaction hash of the provisioned bonfire"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealNonceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/provision/reveal_api_key":{"post":{"tags":["provision"],"summary":"Reveal Api Key","description":"Return the raw API key after verifying wallet ownership via EIP-191 signature.\n\nThe caller must have previously obtained a nonce from GET /provision/reveal_nonce,\nsigned the canonical message with the original provisioning wallet, and submit\nthe signature here.","operationId":"reveal_api_key_provision_reveal_api_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealApiKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/trimtabs/{agent_id}":{"get":{"tags":["trimtab"],"summary":"Get Trimtab","operationId":"get_trimtab_trimtabs__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO timestamp — return only notes newer than this","title":"Since"},"description":"ISO timestamp — return only notes newer than this"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}":{"post":{"tags":["trimtab-grammars"],"summary":"Create Grammar","description":"Create or replace a grammar with initial rules.","operationId":"create_grammar_trimtabs_grammars__bonfire_id__post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Grammar Trimtabs Grammars  Bonfire Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["trimtab-grammars"],"summary":"List Grammars","description":"List all grammars for a bonfire.","operationId":"list_grammars_trimtabs_grammars__bonfire_id__get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Grammars Trimtabs Grammars  Bonfire Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/summary":{"get":{"tags":["trimtab-grammars"],"summary":"Get Summary","description":"Compact summary of quests/notes/friends/tasks for a bonfire.","operationId":"get_summary_trimtabs_grammars__bonfire_id__summary_get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Summary Trimtabs Grammars  Bonfire Id  Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/{grammar}":{"get":{"tags":["trimtab-grammars"],"summary":"Show Grammar","description":"Show full rules and expansions for a grammar.","operationId":"show_grammar_trimtabs_grammars__bonfire_id___grammar__get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"grammar","in":"path","required":true,"schema":{"type":"string","title":"Grammar"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Show Grammar Trimtabs Grammars  Bonfire Id   Grammar  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["trimtab-grammars"],"summary":"Delete Grammar","description":"Delete a grammar.","operationId":"delete_grammar_trimtabs_grammars__bonfire_id___grammar__delete","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"grammar","in":"path","required":true,"schema":{"type":"string","title":"Grammar"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Grammar Trimtabs Grammars  Bonfire Id   Grammar  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/expansions":{"post":{"tags":["trimtab-grammars"],"summary":"Add Expansion","description":"Add an expansion to a grammar rule.","operationId":"add_expansion_trimtabs_grammars__bonfire_id__expansions_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Expansion Trimtabs Grammars  Bonfire Id  Expansions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/search":{"post":{"tags":["trimtab-grammars"],"summary":"Search Grammar","description":"Semantic grammar search — cascaded (rule omitted) or scoped.","operationId":"search_grammar_trimtabs_grammars__bonfire_id__search_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TrimtabCascadedResult"},{"$ref":"#/components/schemas/TrimtabScopedResult"}],"title":"Response Search Grammar Trimtabs Grammars  Bonfire Id  Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/seed":{"post":{"tags":["trimtab-grammars"],"summary":"Seed Grammar","description":"Seed a grammar rule with entities from the KG.","operationId":"seed_grammar_trimtabs_grammars__bonfire_id__seed_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}},{"name":"grammar","in":"query","required":true,"schema":{"type":"string","description":"Grammar name","title":"Grammar"},"description":"Grammar name"},{"name":"rule","in":"query","required":true,"schema":{"type":"string","description":"Rule name","title":"Rule"},"description":"Rule name"},{"name":"kg_query","in":"query","required":true,"schema":{"type":"string","description":"KG search query","title":"Kg Query"},"description":"KG search query"},{"name":"num_entities","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Num Entities"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Seed Grammar Trimtabs Grammars  Bonfire Id  Seed Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/build":{"post":{"tags":["trimtab-grammars"],"summary":"Build Grammar Workflow","description":"Run the grammar builder LangGraph for this bonfire.","operationId":"build_grammar_workflow_trimtabs_grammars__bonfire_id__build_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarBuildRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Build Grammar Workflow Trimtabs Grammars  Bonfire Id  Build Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/update":{"post":{"tags":["trimtab-grammars"],"summary":"Update Expansion","description":"Update an existing expansion's text and/or metadata.","operationId":"update_expansion_trimtabs_grammars__bonfire_id__update_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Expansion Trimtabs Grammars  Bonfire Id  Update Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/remove":{"post":{"tags":["trimtab-grammars"],"summary":"Remove Expansion","description":"Remove an expansion from a grammar rule.","operationId":"remove_expansion_trimtabs_grammars__bonfire_id__remove_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarRemoveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Expansion Trimtabs Grammars  Bonfire Id  Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/list":{"post":{"tags":["trimtab-grammars"],"summary":"List Expansions","description":"List expansions with optional metadata filtering and sorting.","operationId":"list_expansions_trimtabs_grammars__bonfire_id__list_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarListExpansionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Expansions Trimtabs Grammars  Bonfire Id  List Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/search-and-expand":{"post":{"tags":["trimtab-grammars"],"summary":"Search And Expand","description":"Cascaded search on one grammar + KG fan-out via REFERENCES edges.\n\nWraps ``TrimtabDelveService.search_and_expand``. Returns\n``{text, center_ids, kg_contexts}``.","operationId":"search_and_expand_trimtabs_grammars__bonfire_id__search_and_expand_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarSearchAndExpandRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search And Expand Trimtabs Grammars  Bonfire Id  Search And Expand Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trimtabs/grammars/{bonfire_id}/lens-search":{"post":{"tags":["trimtab-grammars"],"summary":"Lens Search","description":"Parallel cascaded search across multiple grammars (multi-lens).\n\nDefault grammars: quests, notes, friends, tasks. Returns\n``{grammar_name: search_result | {\"error\": str}, ...}``.","operationId":"lens_search_trimtabs_grammars__bonfire_id__lens_search_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrammarLensSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lens Search Trimtabs Grammars  Bonfire Id  Lens Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ontology/{bonfire_id}":{"get":{"tags":["ontology"],"summary":"Get Ontology","description":"Get the ontology for a bonfire.","operationId":"get_ontology_ontology__bonfire_id__get","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["ontology"],"summary":"Set Ontology","description":"Set the ontology for a bonfire (create or update).\n\nValidates that all field types are allowed (str, int, float, bool, list[str]).\nNames are arbitrary — callers define their own ontology.","operationId":"set_ontology_ontology__bonfire_id__put","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ontology"],"summary":"Delete Ontology","description":"Remove the ontology for a bonfire (resets to defaults).","operationId":"delete_ontology_ontology__bonfire_id__delete","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Ontology Ontology  Bonfire Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ontology/{bonfire_id}/build":{"post":{"tags":["ontology"],"summary":"Build Ontology","description":"Build end-to-end: persist labels + create :OntologyLabel\nnodes + wire :BELONGS_TO edges.\n\nUse after taxonomies and communities already exist for the\nbonfire. Idempotent — safe to re-run to refresh embeddings\nand edges after label changes.","operationId":"build_ontology_ontology__bonfire_id__build_post","parameters":[{"name":"bonfire_id","in":"path","required":true,"schema":{"type":"string","title":"Bonfire Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyBuildRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyBuildResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{org_id}/bonfire-mapping":{"get":{"tags":["orgs"],"summary":"Get Bonfire Mapping","description":"Look up which bonfire a Clerk org is mapped to.","operationId":"get_bonfire_mapping_orgs__org_id__bonfire_mapping_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/wallet-org-link":{"post":{"tags":["auth"],"summary":"Wallet Org Link","description":"Auto-join the authenticated user to Clerk orgs linked to their wallet.","operationId":"wallet_org_link_auth_wallet_org_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOrgLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOrgLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActiveJobsResponse":{"properties":{"active_jobs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Active Jobs","description":"List of active jobs"},"total":{"type":"integer","title":"Total","description":"Total number of active jobs"}},"type":"object","required":["total"],"title":"ActiveJobsResponse","description":"Response containing active jobs."},"AddLabeledChunkRequest":{"properties":{"content":{"type":"string","title":"Content"},"label":{"type":"string","title":"Label"},"bonfire_id":{"type":"string","title":"Bonfire Id","default":"default"},"doc_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Id"},"chunk_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chunk Id"},"label_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","default":"manual"},"confidence":{"type":"number","title":"Confidence","default":1.0}},"type":"object","required":["content","label"],"title":"AddLabeledChunkRequest","description":"Request to add one or more labeled chunks to the vector store."},"AddPersonalityTraitsRequest":{"properties":{"traits":{"items":{"$ref":"#/components/schemas/PersonalityTraitInput"},"type":"array","title":"Traits","description":"Traits to add"}},"type":"object","required":["traits"],"title":"AddPersonalityTraitsRequest","description":"Request to add new personality traits."},"AddToBatchRequest":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","minItems":1,"title":"Rows","description":"Structured rows to add"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"column_map":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Column Map","description":"Custom column mapping. None = LLM-inferred, {} = passthrough mode."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional metadata"}},"type":"object","required":["rows"],"title":"AddToBatchRequest","description":"Add applications to an existing batch."},"AddTriplesRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Group scope used as Graphiti group_id"},"triples":{"items":{"$ref":"#/components/schemas/TripleInput"},"type":"array","title":"Triples","description":"Array of triples to add"},"entities":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Entities","description":"Optional entities to pre-create (currently ignored; Graphiti will create as needed)"},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Id","description":"Optional episode UUID to link created edges to"}},"type":"object","required":["bonfire_id","triples"],"title":"AddTriplesRequest","description":"Request to batch add triples to the knowledge graph.\n\n**DEPRECATED**: This endpoint is deprecated in favor of Graphiti's automatic entity\nextraction from structured episode content. Use `KGEpisodeUpdateRequest` instead.\n\nThis endpoint was used by supervisors to push extracted triples. With Graphiti's\nimproved deduplication system (commit 7c469e8e2b), triples are no longer needed—\nGraphiti extracts entities and edges automatically from episode content.\n\n**Migration Path:**\n\n- Update agents to use `POST /knowledge_graph/episode_update` with structured content\n- Remove triple extraction logic from agent code\n- Pass resolved users/labels in the episode payload\n- Graphiti will handle entity extraction and deduplication\n\n**Backward Compatibility:**\n\nThis endpoint remains available for legacy agents during the migration period but\nwill be removed in a future version."},"AddTripletRequest":{"properties":{"group_id":{"type":"string","title":"Group Id","description":"Bonfire identifier for graph partition scoping (ObjectId format). Accepts 'group_id' (legacy) or 'bonfire_id' (preferred)."},"source_node":{"additionalProperties":true,"type":"object","title":"Source Node","description":"Source node data following Graphiti pattern"},"edge":{"additionalProperties":true,"type":"object","title":"Edge","description":"Edge data with relationship information"},"target_node":{"additionalProperties":true,"type":"object","title":"Target Node","description":"Target node data following Graphiti pattern"},"generate_embeddings":{"type":"boolean","title":"Generate Embeddings","description":"Whether to generate embeddings","default":true},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Id","description":"Optional episode UUID to link this triplet to a specific episode"}},"type":"object","required":["group_id","source_node","edge","target_node"],"title":"AddTripletRequest","description":"Request to add a direct triplet to the knowledge graph.\n\n**Deprecated:** This endpoint is deprecated in favor of structured episode\ncontent via `KGEpisodeUpdateRequest`."},"AgentAccessResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Health status"},"auth_context":{"$ref":"#/components/schemas/AuthContextResponse","description":"Authentication context"}},"type":"object","required":["status","auth_context"],"title":"AgentAccessResponse","description":"Response from agent access check endpoint."},"AgentBonfireResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent identifier"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Bonfire ID if registered"},"bonfire_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Name","description":"Bonfire name if registered"}},"type":"object","required":["agent_id"],"title":"AgentBonfireResponse","description":"Response containing agent's bonfire information."},"AgentDeleteResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"deactivated":{"type":"boolean","title":"Deactivated","description":"Whether the agent was deactivated"},"unregistered":{"type":"boolean","title":"Unregistered","description":"Whether the agent was unregistered from its bonfire","default":false}},"type":"object","required":["agent_id","deactivated"],"title":"AgentDeleteResponse","description":"Response after soft-deleting an agent."},"AgentEpisodesSearchRequest":{"properties":{"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Maximum number of results to return","default":10},"before_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Before Time","description":"The time before which to search for episodes"},"after_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"After Time","description":"The time after which to search for episodes"}},"type":"object","title":"AgentEpisodesSearchRequest","description":"Request to search for episodes for an agent."},"AgentFeaturesDTO":{"properties":{"isImageInputEnabled":{"type":"boolean","title":"Isimageinputenabled","default":false},"isAudioInputEnabled":{"type":"boolean","title":"Isaudioinputenabled","default":false},"isDocumentInputEnabled":{"type":"boolean","title":"Isdocumentinputenabled","default":false},"isImageGenerationEnabled":{"type":"boolean","title":"Isimagegenerationenabled","default":false},"defaultImageGenerationModel":{"type":"string","title":"Defaultimagegenerationmodel","default":"flux-1-dev-fp8"},"allowScheduling":{"type":"boolean","title":"Allowscheduling","default":false},"maxToolIterations":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Maxtooliterations","description":"Override max tool iterations per agent (default: 5)"},"maxParallelToolCalls":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Maxparalleltoolcalls","description":"Override max parallel tool calls per agent (default: 5)"}},"additionalProperties":true,"type":"object","title":"AgentFeaturesDTO","description":"Agent feature toggles for creation/update requests."},"AgentFeaturesResponse":{"properties":{"isImageInputEnabled":{"type":"boolean","title":"Isimageinputenabled","description":"Image input processing enabled","default":false},"isAudioInputEnabled":{"type":"boolean","title":"Isaudioinputenabled","description":"Audio input processing enabled","default":false},"isDocumentInputEnabled":{"type":"boolean","title":"Isdocumentinputenabled","description":"Document input processing enabled","default":false},"isImageGenerationEnabled":{"type":"boolean","title":"Isimagegenerationenabled","description":"Image generation enabled","default":false},"defaultImageGenerationModel":{"type":"string","title":"Defaultimagegenerationmodel","description":"Default image gen model","default":"flux-1-dev-fp8"},"allowScheduling":{"type":"boolean","title":"Allowscheduling","description":"Task scheduling enabled","default":false},"maxToolIterations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxtooliterations","description":"Max tool iterations per message"},"maxParallelToolCalls":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxparalleltoolcalls","description":"Max parallel tool calls per iteration"}},"additionalProperties":true,"type":"object","title":"AgentFeaturesResponse","description":"Agent feature flags response."},"AgentGraphInfo":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Unique identifier for the graph"},"created_at":{"type":"string","title":"Created At","description":"ISO datetime string when the graph was created"},"graph_type":{"type":"string","enum":["Memory","Document","Custom","HTN"],"title":"Graph Type","description":"Type of the graph: Memory/Document/Custom/HTN"},"node_count":{"type":"integer","title":"Node Count","description":"Number of nodes in the graph"},"edge_count":{"type":"integer","title":"Edge Count","description":"Number of edges in the graph"}},"type":"object","required":["graph_id","created_at","graph_type","node_count","edge_count"],"title":"AgentGraphInfo","description":"Individual graph information for agent graphs response."},"AgentGraphsResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"The agent ID that owns these graphs"},"graphs":{"items":{"$ref":"#/components/schemas/AgentGraphInfo"},"type":"array","title":"Graphs","description":"List of graphs ordered by creation time (newest first)"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of graphs for the agent"}},"type":"object","required":["agent_id","total_count"],"title":"AgentGraphsResponse","description":"Response containing list of agent graphs with metadata."},"AgentLatestEpisodesResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the query was successful"},"query":{"type":"string","title":"Query","description":"The query that was executed"},"episodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Episodes","description":"List of episodes returned by the query"},"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes","description":"[DEPRECATED] Unified nodes list; will be empty when entities is present"},"entities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities","description":"List of entity nodes returned by the query"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges","description":"List of edges returned by the query"},"num_results":{"type":"integer","title":"Num Results","description":"Number of results returned"},"bonfire_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bonfire Ids","description":"Bonfire IDs used for graph scoping (bonfire-level partitioning)"},"agent_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Context","description":"Agent context information"},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Graph state hash identifier for loading this graph state later"}},"type":"object","required":["success","query","num_results"],"title":"AgentLatestEpisodesResponse","description":"Response containing latest episodes for an agent with entities and edges.\n\nNote: \"nodes\" is retained for backward compatibility but will be empty when\n\"entities\" is provided. Frontend should prefer \"episodes\" + \"entities\".\n\nThe `bonfire_ids` field contains bonfire identifiers (not agent identifiers),\nreflecting the bonfire-scoped knowledge graph architecture."},"AgentListResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Agents","description":"List of agents"},"total":{"type":"integer","title":"Total","description":"Total number of agents"}},"type":"object","required":["total"],"title":"AgentListResponse","description":"Response containing list of agents."},"AgentRegistrationResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"agent_id":{"type":"string","title":"Agent Id","description":"Agent identifier"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","agent_id","bonfire_id","message"],"title":"AgentRegistrationResponse","description":"Response from agent registration operations."},"AgentResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Agent identifier"},"username":{"type":"string","title":"Username","description":"Agent username"},"name":{"type":"string","title":"Name","description":"Agent name"},"context":{"type":"string","title":"Context","description":"Agent context"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Agent metadata"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether agent is active"},"bonfire_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Ref","description":"Registered bonfire ID"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"API key"},"chatConfig":{"anyOf":[{"$ref":"#/components/schemas/ChatConfigResponse"},{"type":"null"}],"description":"Chat configuration"},"deploymentConfiguration":{"anyOf":[{"$ref":"#/components/schemas/DeploymentConfigurationResponse"},{"type":"null"}],"description":"Deployment configuration"},"agentFeatures":{"anyOf":[{"$ref":"#/components/schemas/AgentFeaturesResponse"},{"type":"null"}],"description":"Agent feature flags"},"llmConfig":{"anyOf":[{"$ref":"#/components/schemas/LlmConfigResponse"},{"type":"null"}],"description":"Per-agent LLM model configuration"},"enabledMcpTools":{"items":{"type":"string"},"type":"array","title":"Enabledmcptools","description":"Enabled MCP tool IDs"},"enabledSkills":{"items":{"type":"string"},"type":"array","title":"Enabledskills","description":"Skill IDs loaded into LLM prompt"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"Agent timezone"},"agentEnvVars":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Agentenvvars","description":"Agent environment variables"},"episode_uuids":{"items":{"type":"string"},"type":"array","title":"Episode Uuids","description":"Episode UUIDs in chronological order"}},"type":"object","required":["id","username","name","context","is_active"],"title":"AgentResponse","description":"Response containing agent information."},"AggregatedHyperBlogsResponse":{"properties":{"hyperblogs":{"items":{"$ref":"#/components/schemas/HyperBlogInfo"},"type":"array","title":"Hyperblogs","description":"List of public hyperblogs aggregated from all datarooms"},"count":{"type":"integer","title":"Count","description":"Number of hyperblogs returned"},"limit":{"type":"integer","title":"Limit","description":"Maximum results per page"},"offset":{"type":"integer","title":"Offset","description":"Offset for pagination"}},"type":"object","required":["hyperblogs","count","limit","offset"],"title":"AggregatedHyperBlogsResponse","description":"Response containing aggregated public hyperblogs across all datarooms."},"ApiEdge":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"fact":{"type":"string","title":"Fact"},"source_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Node Uuid"},"target_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Node Uuid"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"valid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid At"},"invalid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invalid At"},"expired_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expired At"},"episodes":{"items":{"type":"string"},"type":"array","title":"Episodes"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"type":"object","required":["uuid","name","source_node_uuid","target_node_uuid"],"title":"ApiEdge","description":"Flat API shape for a KG edge as emitted by the HTTP layer.\n\nProduced by ``SearchService.extract_graph_data`` and the hydration\npath. Compared to ``GraphEdge``:\n\n* ``bonfire_id`` replaces ``group_id`` (when surfaced)\n* datetimes are ISO strings\n* ``fact_embedding`` is stripped\n* ``expired_at`` / ``reference_time`` / ``attributes`` are not\n  always surfaced (only ``_serialize_neo4j_value`` emits them)\n\n``uuid``, ``name``, ``source_node_uuid`` and ``target_node_uuid``\nare ``Required`` — every producer sets them (possibly as ``None``\nfor the nullable pair, but always present on the dict)."},"ApiEntity":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"node_type":{"type":"string","title":"Node Type"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["uuid","name"],"title":"ApiEntity","description":"Flat API shape for a KG entity as emitted by the HTTP layer.\n\nProduced by ``SearchService.extract_graph_data`` (search flow) and\n``KGCrudService.hydrate_search_results`` / ``_serialize_neo4j_value``\n(expand + direct fetch flows). ``total=False`` at the class level\nlets the several producers emit slightly different field subsets,\nbut ``uuid`` and ``name`` are promoted to ``Required`` because every\nproducer sets them unconditionally — consumers can rely on their\npresence without ``.get()``."},"ApiEpisode":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"node_type":{"type":"string","title":"Node Type"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"source":{"title":"Source"},"source_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Description"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"content":{"title":"Content"},"window_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window Start"},"window_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window End"},"valid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"type":"object","required":["uuid","name"],"title":"ApiEpisode","description":"Flat API shape for a KG episode as emitted by the HTTP layer.\n\nProduced by ``SearchService.extract_graph_data`` and the hydration\npath. Compared to ``GraphEpisode``:\n\n* ``bonfire_id`` replaces ``group_id``\n* datetimes are ISO strings\n* ``content`` is typed ``Any`` because ``parse_json_content``\n  eagerly JSON-decodes structured episode payloads — a dict or\n  list is a valid on-the-wire value\n* ``entity_edges`` is not surfaced\n* windowed fields (``window_start`` / ``window_end``) may be present\n\n``uuid`` and ``name`` are ``Required`` — every producer sets them."},"ApplicantCategoryScoreInfo":{"properties":{"name":{"type":"string","title":"Name"},"weight":{"type":"number","title":"Weight"},"score":{"type":"integer","title":"Score"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["name","weight","score","reasoning"],"title":"ApplicantCategoryScoreInfo","description":"Rubric category score payload."},"ApplicantIdentityInfo":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"ethereum_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ethereum Address"},"github_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Handle"},"github_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Url"},"twitter_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Handle"},"twitter_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Url"},"telegram_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Handle"},"telegram_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Url"},"organizations":{"items":{"type":"string"},"type":"array","title":"Organizations"},"role_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Title"}},"type":"object","required":["id","full_name"],"title":"ApplicantIdentityInfo","description":"Normalized applicant identity payload."},"ApplicantReviewActionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"},"review":{"anyOf":[{"$ref":"#/components/schemas/ApplicantReviewInfo"},{"type":"null"}]},"application":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Application"}},"type":"object","required":["success"],"title":"ApplicantReviewActionResponse","description":"Generic response for shortlist/retry/evaluate actions."},"ApplicantReviewBatchInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"rubric_version":{"type":"string","title":"Rubric Version"},"imported_count":{"type":"integer","title":"Imported Count"},"research_completed_count":{"type":"integer","title":"Research Completed Count"},"evaluation_completed_count":{"type":"integer","title":"Evaluation Completed Count"},"shortlisted_count":{"type":"integer","title":"Shortlisted Count"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"created_at":{"type":"string","title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"review_bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Bonfire Id"}},"type":"object","required":["id","name","status","rubric_version","imported_count","research_completed_count","evaluation_completed_count","shortlisted_count","created_at"],"title":"ApplicantReviewBatchInfo","description":"Summary information for an applicant review batch."},"ApplicantReviewBatchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the request succeeded"},"batch_id":{"type":"string","title":"Batch Id","description":"Application batch identifier"},"imported_count":{"type":"integer","title":"Imported Count","description":"Number of imported application rows"},"queued_task_ids":{"items":{"type":"string"},"type":"array","title":"Queued Task Ids","description":"Queued research task IDs"}},"type":"object","required":["success","batch_id","imported_count"],"title":"ApplicantReviewBatchResponse","description":"Response for applicant review batch import and lookup."},"ApplicantReviewDetailResponse":{"properties":{"application":{"additionalProperties":true,"type":"object","title":"Application"},"batch":{"anyOf":[{"$ref":"#/components/schemas/ApplicantReviewBatchInfo"},{"type":"null"}]},"identity":{"anyOf":[{"$ref":"#/components/schemas/ApplicantIdentityInfo"},{"type":"null"}]},"review":{"anyOf":[{"$ref":"#/components/schemas/ApplicantReviewInfo"},{"type":"null"}]}},"type":"object","required":["application"],"title":"ApplicantReviewDetailResponse","description":"Detailed application response for the review detail page."},"ApplicantReviewInfo":{"properties":{"id":{"type":"string","title":"Id"},"weighted_score":{"type":"number","title":"Weighted Score"},"confidence_score":{"type":"number","title":"Confidence Score"},"recommendation":{"type":"string","title":"Recommendation"},"category_scores":{"items":{"$ref":"#/components/schemas/ApplicantCategoryScoreInfo"},"type":"array","title":"Category Scores"},"strengths":{"items":{"type":"string"},"type":"array","title":"Strengths"},"concerns":{"items":{"type":"string"},"type":"array","title":"Concerns"},"rationale":{"type":"string","title":"Rationale"},"bio":{"type":"string","title":"Bio","default":""},"comparative_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comparative Reasoning"},"is_shortlisted":{"type":"boolean","title":"Is Shortlisted"},"override_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Note"},"rubric_version":{"type":"string","title":"Rubric Version"}},"type":"object","required":["id","weighted_score","confidence_score","recommendation","rationale","is_shortlisted","rubric_version"],"title":"ApplicantReviewInfo","description":"Full structured review payload for an application."},"ApplicantReviewListItem":{"properties":{"id":{"type":"string","title":"Id"},"batch_id":{"type":"string","title":"Batch Id"},"row_index":{"type":"integer","title":"Row Index"},"full_name":{"type":"string","title":"Full Name"},"ethereum_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ethereum Address"},"twitter_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Handle"},"github_profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Profile Url"},"role_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Title"},"organizations":{"items":{"type":"string"},"type":"array","title":"Organizations"},"research_status":{"type":"string","title":"Research Status"},"evaluation_status":{"type":"string","title":"Evaluation Status"},"shortlist_status":{"type":"string","title":"Shortlist Status"},"overall_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Score"},"recommendation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"validation_errors":{"items":{"type":"string"},"type":"array","title":"Validation Errors"},"public_evidence_links":{"items":{"type":"string"},"type":"array","title":"Public Evidence Links"},"evidence_count":{"type":"integer","title":"Evidence Count","default":0},"review_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Summary"},"updated_at":{"type":"string","title":"Updated At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","batch_id","row_index","full_name","research_status","evaluation_status","shortlist_status","updated_at","created_at"],"title":"ApplicantReviewListItem","description":"Summary list item for the applicant review leaderboard."},"ApplicantReviewListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApplicantReviewListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["total","limit","offset"],"title":"ApplicantReviewListResponse","description":"Paginated response for applicant leaderboard queries."},"AttestationResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"attestations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attestations","description":"List of attestations"},"count":{"type":"integer","title":"Count","description":"Number of attestations returned"}},"type":"object","required":["success","count"],"title":"AttestationResponse","description":"Response containing attestation information."},"AuthContextResponse":{"properties":{"is_authenticated":{"type":"boolean","title":"Is Authenticated","description":"Whether the request is authenticated"},"is_admin":{"type":"boolean","title":"Is Admin","description":"Whether the user has admin access"},"is_clerk":{"type":"boolean","title":"Is Clerk","description":"Whether authenticated via Clerk"},"allowed_bonfires":{"items":{"type":"string"},"type":"array","title":"Allowed Bonfires","description":"List of bonfire IDs the user can access"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"Clerk permissions (empty for API key auth)"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Clerk user ID if authenticated via Clerk"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Clerk org ID if authenticated via Clerk"}},"type":"object","required":["is_authenticated","is_admin","is_clerk","allowed_bonfires","permissions"],"title":"AuthContextResponse","description":"Authentication context details."},"BatchEntitiesResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"entities":{"items":{"$ref":"#/components/schemas/GraphEntity"},"type":"array","title":"Entities","description":"List of entities"},"stats":{"additionalProperties":true,"type":"object","title":"Stats","description":"Request/validation statistics"}},"type":"object","required":["success"],"title":"BatchEntitiesResponse","description":"Response from batch entity fetch operations.\n\nUses the graphiti dump shape — batched entity fetches go through\n``get_nodes_by_uuids_flat``, which emits the same dump shape as\nsingle-entity fetches."},"BatchEvalRunItemResponse":{"properties":{"application_id":{"type":"string","title":"Application Id"},"status":{"type":"string","title":"Status"},"review_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["application_id","status"],"title":"BatchEvalRunItemResponse","description":"Per-application status within a batch eval run."},"BatchEvalRunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"status":{"type":"string","title":"Status"},"total_count":{"type":"integer","title":"Total Count"},"completed_count":{"type":"integer","title":"Completed Count","default":0},"skipped_count":{"type":"integer","title":"Skipped Count","default":0},"failed_count":{"type":"integer","title":"Failed Count","default":0},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/BatchEvalRunItemResponse"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","required":["run_id","status","total_count"],"title":"BatchEvalRunResponse","description":"Response from creating or fetching a batch eval run."},"BatchGetEntitiesRequest":{"properties":{"entity_uuids":{"items":{"type":"string"},"type":"array","title":"Entity Uuids","description":"List of entity UUIDs to fetch"},"include_edges":{"type":"boolean","title":"Include Edges","description":"Whether to include edges for each entity","default":false}},"type":"object","required":["entity_uuids"],"title":"BatchGetEntitiesRequest","description":"Request to batch fetch multiple entities by UUID."},"Body_ingest_pdf_ingest_pdf_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"PDF file to ingest"}},"type":"object","required":["file"],"title":"Body_ingest_pdf_ingest_pdf_post"},"BonfireAgentsResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"agents":{"items":{"$ref":"#/components/schemas/SimpleAgentInfo"},"type":"array","title":"Agents","description":"List of agents for the bonfire"},"total_agents":{"type":"integer","title":"Total Agents","description":"Total number of agents registered to the bonfire"},"active_agents":{"type":"integer","title":"Active Agents","description":"Number of active agents for the bonfire"}},"type":"object","required":["bonfire_id","total_agents","active_agents"],"title":"BonfireAgentsResponse","description":"Response shape compatible with frontend expectations for bonfire agents."},"BonfireClusterListResponse":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/BonfireClusterResponse"},"type":"array","title":"Clusters"},"total":{"type":"integer","title":"Total","description":"Total number of clusters","default":0}},"type":"object","title":"BonfireClusterListResponse","description":"Response for listing bonfire clusters."},"BonfireClusterResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Cluster ID"},"name":{"type":"string","title":"Name","description":"Cluster name"},"bonfire_ids":{"items":{"type":"string"},"type":"array","title":"Bonfire Ids","description":"Member bonfire IDs"},"indexing_agent_id":{"type":"string","title":"Indexing Agent Id","description":"Indexing agent ID"},"owner_bonfire_id":{"type":"string","title":"Owner Bonfire Id","description":"Owner bonfire ID"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","name","indexing_agent_id","owner_bonfire_id"],"title":"BonfireClusterResponse","description":"Response for a single bonfire cluster."},"BonfireEntityCount":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"bonfire_name":{"type":"string","title":"Bonfire Name"},"entity_count":{"type":"integer","title":"Entity Count"}},"type":"object","required":["bonfire_id","bonfire_name","entity_count"],"title":"BonfireEntityCount","description":"One row of the top-bonfires list in global graph stats."},"BonfireGraphStatsResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"bonfire_name":{"type":"string","title":"Bonfire Name"},"top_communities":{"items":{"$ref":"#/components/schemas/RankedItem"},"type":"array","title":"Top Communities"},"top_taxonomies":{"items":{"$ref":"#/components/schemas/RankedItem"},"type":"array","title":"Top Taxonomies"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["bonfire_id","bonfire_name","top_communities","top_taxonomies","generated_at"],"title":"BonfireGraphStatsResponse","description":"Response for GET /insights/graph-stats/bonfire/{id}."},"BonfireInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Purpose / description of the bonfire"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Subdomain slug for URL routing (e.g. 'eth-boulder')"},"is_public":{"type":"boolean","title":"Is Public","description":"Whether the bonfire is publicly accessible","default":false},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO 8601 creation timestamp"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO 8601 last-updated timestamp"},"agent_count":{"type":"integer","title":"Agent Count","description":"Number of agents registered to this bonfire","default":0},"total_episodes":{"type":"integer","title":"Total Episodes","description":"Sum of all agent episodes in this bonfire","default":0},"taxonomy_labels":{"items":{"type":"string"},"type":"array","title":"Taxonomy Labels"},"groups":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Groups"},"latest_run_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Run Ref"},"latest_taxonomies":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Latest Taxonomies"},"latest_episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Episode Id"},"latest_episode":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latest Episode"}},"type":"object","required":["id","name"],"title":"BonfireInfo","description":"Bonfire info for agent selection in the frontend."},"BonfireListResponse":{"properties":{"bonfires":{"items":{"$ref":"#/components/schemas/BonfireInfo"},"type":"array","title":"Bonfires"}},"type":"object","required":["bonfires"],"title":"BonfireListResponse","description":"Response wrapper for listing available bonfires."},"BonfirePricingResponse":{"properties":{"price_per_episode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Per Episode","description":"USD price per episode"},"max_episodes_per_agent":{"type":"integer","title":"Max Episodes Per Agent","description":"Max episodes a buyer can purchase","default":50},"max_agents":{"type":"integer","title":"Max Agents","description":"Hard limit on agents","default":10}},"type":"object","title":"BonfirePricingResponse","description":"Response for bonfire pricing configuration."},"ChatConfig":{"properties":{"groupPolicy":{"type":"string","enum":["open","restricted"],"title":"Grouppolicy","description":"Global policy for group messages","default":"open"},"dmPolicy":{"type":"string","enum":["open","restricted","disabled"],"title":"Dmpolicy","description":"Policy for direct messages","default":"open"},"silentMode":{"type":"boolean","title":"Silentmode","description":"If true, agent is in silent mode globally","default":false},"allowedUsers":{"items":{"type":"string"},"type":"array","title":"Allowedusers","description":"Allowed usernames or user IDs"},"groupConfigs":{"items":{"$ref":"#/components/schemas/GroupConfigDTO"},"type":"array","title":"Groupconfigs","description":"Group-specific configurations"},"disableStoringGroups":{"type":"boolean","title":"Disablestoringgroups","description":"Whether to disable message storing in groups","default":false},"disableStoringDMs":{"type":"boolean","title":"Disablestoringdms","description":"Whether to disable message storing in DMs","default":false},"allowedUsersDMsStore":{"items":{"type":"string"},"type":"array","title":"Allowedusersdmsstore","description":"Users allowed to store data when DM policy is restricted"},"schedulingAllowedUsers":{"items":{"type":"string"},"type":"array","title":"Schedulingallowedusers","description":"User IDs allowed to schedule (empty = all when scheduling enabled)"}},"additionalProperties":true,"type":"object","title":"ChatConfig","description":"Chat filtering configuration for agents.\n\nMatches the bonfires-ai ChatConfig schema with full support for\ngroup/DM policies, per-group/topic configs, storage policies, and scheduling."},"ChatConfigResponse":{"properties":{"groupPolicy":{"type":"string","title":"Grouppolicy","description":"Global policy for group messages","default":"open"},"dmPolicy":{"type":"string","title":"Dmpolicy","description":"Policy for direct messages","default":"open"},"silentMode":{"type":"boolean","title":"Silentmode","description":"Agent-wide silent mode","default":false},"allowedUsers":{"items":{"type":"string"},"type":"array","title":"Allowedusers","description":"Allowed usernames or user IDs"},"groupConfigs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Groupconfigs","description":"Group-specific configurations"},"disableStoringGroups":{"type":"boolean","title":"Disablestoringgroups","description":"Disable message storing in groups","default":false},"disableStoringDMs":{"type":"boolean","title":"Disablestoringdms","description":"Disable message storing in DMs","default":false},"allowedUsersDMsStore":{"items":{"type":"string"},"type":"array","title":"Allowedusersdmsstore","description":"Users allowed to store in restricted DMs"},"schedulingAllowedUsers":{"items":{"type":"string"},"type":"array","title":"Schedulingallowedusers","description":"User IDs allowed to schedule"}},"additionalProperties":true,"type":"object","title":"ChatConfigResponse","description":"Chat filtering configuration response."},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role","description":"Message role (user/assistant/system)"},"content":{"type":"string","title":"Content","description":"Message content"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"Message timestamp"}},"type":"object","required":["role","content"],"title":"ChatMessage","description":"Individual chat message in conversation history."},"ChatResponse":{"properties":{"reply":{"type":"string","title":"Reply","description":"Agent's reply message"},"graph_action":{"type":"string","title":"Graph Action","description":"Graph action type","default":"static"},"search_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Prompt","description":"Search prompt if graph search was performed"},"graph_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph Data","description":"Graph data if graph operation occurred"},"graph_operation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph Operation","description":"Graph operation details"},"new_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Graph Id","description":"New graph state ID if created"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"List of errors if any"},"htn_status":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Htn Status","description":"HTN curriculum status for dataroom subscriptions"}},"type":"object","required":["reply"],"title":"ChatResponse","description":"Response from agent chat operations."},"ChunkIdsRequest":{"properties":{"chunk_ids":{"items":{"type":"string"},"type":"array","title":"Chunk Ids","description":"List of chunk IDs (Mongo _id or chunk_id)"},"include_metadata":{"type":"boolean","title":"Include Metadata","description":"Include document metadata","default":true}},"type":"object","required":["chunk_ids"],"title":"ChunkIdsRequest","description":"Request to hydrate documents/chunks by chunk IDs (used after vector search)."},"ClearChunksRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"}},"type":"object","required":["bonfire_id"],"title":"ClearChunksRequest","description":"Request to clear all chunks for a given bonfire from the vector store."},"ClusterMembershipRequest":{"properties":{"bonfire_ids":{"items":{"type":"string"},"type":"array","title":"Bonfire Ids","description":"Bonfire IDs to add/remove"}},"type":"object","required":["bonfire_ids"],"title":"ClusterMembershipRequest","description":"Request to add or remove member bonfires from a cluster."},"ContributorInfo":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User ID from episode structured_content"},"total_entities":{"type":"integer","title":"Total Entities","description":"Total unique entities contributed across all cards"},"total_episodes":{"type":"integer","title":"Total Episodes","description":"Total unique episodes contributed across all cards"},"cards_contributed_to":{"type":"integer","title":"Cards Contributed To","description":"Number of HyperCards this user contributed to"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username","description":"Username if resolved from messages"},"wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet","description":"Wallet address if available"}},"type":"object","required":["user_id","total_entities","total_episodes","cards_contributed_to"],"title":"ContributorInfo","description":"Information about a single contributor to dataroom content."},"CostBucket":{"properties":{"bucket":{"type":"string","enum":["episode_ingestion","agent_message","taxonomy_labeling","hyperblog_generation","applicant_review"],"title":"Bucket"},"total_usd":{"type":"number","title":"Total Usd"},"unit_count":{"type":"integer","title":"Unit Count"},"avg_usd":{"type":"number","title":"Avg Usd"},"delta_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delta Pct","description":"Percent change vs. prior window of same length. None when prior is 0."}},"type":"object","required":["bucket","total_usd","unit_count","avg_usd"],"title":"CostBucket","description":"Per-bucket cost rollup for a time window."},"CostSummaryResponse":{"properties":{"range":{"type":"string","enum":["24h","7d","30d","90d"],"title":"Range"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"buckets":{"items":{"$ref":"#/components/schemas/CostBucket"},"type":"array","title":"Buckets"},"unattributed_usd":{"type":"number","title":"Unattributed Usd"},"total_usd":{"type":"number","title":"Total Usd"}},"type":"object","required":["range","generated_at","buckets","unattributed_usd","total_usd"],"title":"CostSummaryResponse","description":"Response for GET /insights/costs."},"CreateAgentRequest":{"properties":{"username":{"type":"string","title":"Username","description":"Unique agent username"},"name":{"type":"string","title":"Name","description":"Agent display name"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Agent context/description","default":""},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"apiKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apikey","description":"API key for agent authentication","default":"bonfires-ai"},"chatConfig":{"anyOf":[{"$ref":"#/components/schemas/ChatConfig"},{"type":"null"}],"description":"Chat filtering configuration"},"deploymentConfiguration":{"anyOf":[{"$ref":"#/components/schemas/DeploymentConfigurationDTO"},{"type":"null"}],"description":"Deployment platform, bot tokens, bonfire linkage"},"agentFeatures":{"anyOf":[{"$ref":"#/components/schemas/AgentFeaturesDTO"},{"type":"null"}],"description":"Agent feature toggles (image/audio/doc input, scheduling, etc.)"},"enabledMcpTools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enabledmcptools","description":"List of enabled MCP tool IDs"},"enabledSkills":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enabledskills","description":"Skill IDs loaded into the LLM prompt"},"agentEnvVars":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Agentenvvars","description":"Environment variables for the agent (encrypted at rest)"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA timezone string"},"isActive":{"type":"boolean","title":"Isactive","description":"Whether the agent should be active immediately","default":false},"bonfireId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfireid","description":"Bonfire to register the agent to (shorthand for deploymentConfiguration.bonfireId)"}},"type":"object","required":["username","name"],"title":"CreateAgentRequest","description":"Request to create a new agent.\n\nSupports the full agent-config schema: identity, deployment configuration,\nagent features, chat policies, MCP tools, and environment variables."},"CreateBatchEvalRunRequest":{"properties":{"application_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Application Ids","description":"Application IDs to evaluate (resolved from batch_id if omitted)"},"rubric_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Id","description":"StructuredRubric ID to evaluate with"},"force":{"type":"boolean","title":"Force","description":"Force re-evaluation even if a review already exists","default":false},"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id","description":"ApplicationBatch ID — required, used to resolve application IDs if not provided"},"rescore_only":{"type":"boolean","title":"Rescore Only","description":"Skip research/KG/trimtab, jump to scoring using existing review_bonfire_id","default":false},"review_bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Bonfire Id","description":"Existing review bonfire to rescore against (required when rescore_only=True)"}},"type":"object","title":"CreateBatchEvalRunRequest","description":"Request to create a resilient batch evaluation run."},"CreateBatchEvalRunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["run_id","total_count"],"title":"CreateBatchEvalRunResponse","description":"Response from POST /batch-eval-runs — just run_id and total."},"CreateBonfireClusterRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable cluster name"},"bonfire_ids":{"items":{"type":"string"},"type":"array","title":"Bonfire Ids","description":"Initial member bonfire IDs"},"indexing_agent_id":{"type":"string","title":"Indexing Agent Id","description":"Agent receiving forwarded episodes"},"owner_bonfire_id":{"type":"string","title":"Owner Bonfire Id","description":"Bonfire that owns this cluster"}},"type":"object","required":["name","indexing_agent_id","owner_bonfire_id"],"title":"CreateBonfireClusterRequest","description":"Request to create a bonfire cluster."},"CreateDataRoomRequest":{"properties":{"creator_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Wallet","description":"Wallet address of the user creating the data room"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier for knowledge graph access"},"description":{"type":"string","maxLength":1000,"minLength":10,"title":"Description","description":"Description of the data room offering"},"system_prompt":{"type":"string","maxLength":2000,"title":"System Prompt","description":"System prompt for chat interactions"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Optional center node UUID for focused queries"},"price_usd":{"type":"number","exclusiveMinimum":0.0,"title":"Price Usd","description":"Price in USD (must be positive)"},"query_limit":{"type":"integer","maximum":1000.0,"exclusiveMinimum":0.0,"title":"Query Limit","description":"Maximum queries per subscription (1-1000)","default":20},"expiration_days":{"type":"integer","maximum":365.0,"exclusiveMinimum":0.0,"title":"Expiration Days","description":"Subscription duration in days (1-365)","default":30},"dynamic_pricing_enabled":{"type":"boolean","title":"Dynamic Pricing Enabled","description":"Enable dynamic pricing for hyperblog purchases","default":false},"price_step_usd":{"type":"number","minimum":0.0,"title":"Price Step Usd","description":"Price increase in USD per hyperblog purchase (must be non-negative)","default":0.0},"price_decay_rate":{"type":"number","minimum":0.0,"title":"Price Decay Rate","description":"Linear decay rate in USD per hour (must be non-negative)","default":0.0},"image_model":{"type":"string","title":"Image Model","description":"FLUX model for banner generation (schnell/dev/pro/realism)","default":"dev"},"htn_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htn Template Id","description":"Optional HTN template ObjectId for blog/card generation"}},"type":"object","required":["bonfire_id","description","system_prompt","price_usd"],"title":"CreateDataRoomRequest","description":"Request model for creating new data room marketplace listings."},"CreateEdgeRequest":{"properties":{"source_uuid":{"type":"string","title":"Source Uuid","description":"UUID of the source entity"},"target_uuid":{"type":"string","title":"Target Uuid","description":"UUID of the target entity"},"edge_name":{"type":"string","title":"Edge Name","description":"Relationship name (e.g. USES, PRODUCES)"},"fact":{"type":"string","title":"Fact","description":"Human-readable description of the relationship","default":""},"group_id":{"type":"string","title":"Group Id","description":"Bonfire identifier for graph partition scoping"}},"type":"object","required":["source_uuid","target_uuid","edge_name","group_id"],"title":"CreateEdgeRequest","description":"Request to create an edge between two existing entities by UUID."},"CreateEntityRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Entity name"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent identifier for entity attribution (optional)"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Bonfire identifier for graph partition scoping (recommended)"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Optional additional labels (Entity is implied)"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Optional entity summary"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes","description":"Optional attributes for the entity"}},"type":"object","required":["name"],"title":"CreateEntityRequest","description":"Request to create a new Entity node in the knowledge graph.\n\n**Note:** bonfire_id should be used for shared knowledge graphs across agents\nin the same bonfire, while agent_id is for attribution only."},"CreateEpisodeDirectRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier; used as group_id unless group_id is provided"},"name":{"type":"string","title":"Name","description":"Episode name"},"episode_body":{"type":"string","title":"Episode Body","description":"Episode text content"},"source":{"type":"string","title":"Source","description":"Episode source type: 'text', 'json', or 'message'","default":"text"},"source_description":{"type":"string","title":"Source Description","description":"Human-readable source description","default":"direct_episode"},"reference_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reference Time","description":"ISO datetime; defaults to now if omitted"},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"Graphiti group_id override; defaults to bonfire_id"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid","description":"Pre-assigned episode UUID"},"entity_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Types","description":"Entity type names for extraction"},"edge_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Edge Types","description":"Edge type names for extraction"},"excluded_entity_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Excluded Entity Types","description":"Entity types to exclude"},"update_communities":{"type":"boolean","title":"Update Communities","description":"Whether to update community nodes","default":false}},"type":"object","required":["bonfire_id","name","episode_body"],"title":"CreateEpisodeDirectRequest","description":"Request to create an episode directly via Graphiti, bypassing the full episode stack.\n\nMaps closely to graphiti_core.Graphiti.add_episode parameters."},"CreateEpisodeDirectResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the task was enqueued successfully"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Background task ID for tracking"},"status":{"type":"string","title":"Status","description":"Processing status","default":"queued"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message"}},"type":"object","required":["success"],"title":"CreateEpisodeDirectResponse","description":"Response from async episode creation — returns task ID for tracking."},"CreateGraphRunRequest":{"properties":{"parent_bonfire_id":{"type":"string","title":"Parent Bonfire Id","description":"The parent bonfire that owns the batch and the rubric"},"batch_id":{"type":"string","title":"Batch Id","description":"ApplicationBatch ID — coordinator loads applicants from here"},"rubric_id":{"type":"string","title":"Rubric Id","description":"StructuredRubric ID to score against"},"research_batch_size":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Research Batch Size","description":"Concurrent research calls (firecrawl supports 50)","default":25},"scorers_per_applicant":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Scorers Per Applicant","description":"K (Phase 3 only)","default":3},"scoring_model":{"type":"string","title":"Scoring Model","description":"LLM for scoring (Phase 3 only)","default":"claude-haiku-4-5"},"dry_run":{"type":"boolean","title":"Dry Run","description":"If true, fork bonfire but skip persistent writes","default":false},"rescore_only":{"type":"boolean","title":"Rescore Only","description":"Skip research/KG/trimtab, jump to scoring using existing review_bonfire_id","default":false},"review_bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Bonfire Id","description":"Existing review bonfire to rescore against (required when rescore_only=True)"},"extend_only":{"type":"boolean","title":"Extend Only","description":"Reuse existing review_bonfire_id; run research + KG ingest on new_application_ids only, then rebuild communities + grammar and score the full cohort (old + new) in one go. Skips fork + ontology generation.","default":false},"new_application_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"New Application Ids","description":"Applicant ids to research when extend_only=True. Required in that mode."}},"type":"object","required":["parent_bonfire_id","batch_id","rubric_id"],"title":"CreateGraphRunRequest","description":"Request to create a master applicant-review graph run.\n\nThis is the Phase 1 entry point for the new ApplicantReviewGraphCoordinator.\nThe graph forks a per-review bonfire from `parent_bonfire_id`, runs research\n+ KG ingest end-to-end, and (in later phases) builds heuristics + scores\nevery applicant in the batch through K=3 independent scorers.\n\nPhase 1: research + KG ingest only — scoring nodes are no-ops."},"CreateGraphRunResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status","description":"Initial state of the run","default":"enqueued"}},"type":"object","required":["task_id"],"title":"CreateGraphRunResponse","description":"Response from POST /applicant-reviews/graph-runs.\n\nReturns the BackgroundTask id immediately. The caller polls the\nBackgroundTask document (or its eventual SSE observer) for progress."},"CreateHTNTemplateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Human-readable template name"},"template_type":{"type":"string","maxLength":50,"minLength":1,"title":"Template Type","description":"Template type (e.g., 'blog', 'card', 'curriculum')"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Description of the template purpose"},"system_prompt":{"type":"string","minLength":10,"title":"System Prompt","description":"System prompt for LLM HTN generation"},"user_prompt_template":{"type":"string","minLength":10,"title":"User Prompt Template","description":"User prompt template with placeholders"},"node_count_config":{"additionalProperties":{"$ref":"#/components/schemas/LengthConfig"},"type":"object","title":"Node Count Config","description":"Node count config by length (e.g., {'short': {'max_nodes': 4, 'max_words': 300, 'description': 'Concise'}})"},"default_length":{"type":"string","title":"Default Length","description":"Default length setting ('short', 'medium', 'long')","default":"medium"},"created_by":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Created By","description":"Creator identifier"}},"type":"object","required":["name","template_type","system_prompt","user_prompt_template","node_count_config"],"title":"CreateHTNTemplateRequest","description":"Request model for creating a custom HTN template."},"CreateMicrosubRequest":{"properties":{"payment_header":{"type":"string","title":"Payment Header","description":"Base64-encoded X402 payment header for payment verification"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent identifier (ObjectId, username, or UUID) for the subscription. Optional when dataroom_id is provided (auto-resolved from DataRoom's bonfire). If both agent_id and dataroom_id are provided, explicit agent_id takes precedence."},"expected_amount":{"type":"string","title":"Expected Amount","description":"Expected payment amount in USD decimal format (e.g., '0.01', '1.00')","default":"1.00"},"query_limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Query Limit","description":"Number of queries allowed in microsub (1-100)","default":25},"expiration_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Expiration Days","description":"Days until microsub expiration (1-365)","default":30},"dataroom_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataroom Id","description":"DataRoom ID to subscribe to (inherits all settings from DataRoom)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Data room configuration: description (used if dataroom_id not provided)"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Data room configuration: center node UUID (used if dataroom_id not provided)"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Data room configuration: system prompt (used if dataroom_id not provided)"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Data room configuration: bonfire identifier (used if dataroom_id not provided)"}},"type":"object","required":["payment_header"],"title":"CreateMicrosubRequest","description":"Request to create a new microsub subscription without executing queries.\n\nThis endpoint enables the \"subscribe button\" flow where users commit to a subscription\nbefore their first query. Unlike PaidAgentChatRequest/PaidDelveRequest, this does NOT\nexecute any queries - it only verifies payment, settles payment, and creates the microsub.\n\n**Use Case:**\n- Marketplace subscriptions: User clicks \"Subscribe\" on a DataRoom listing\n- Pre-commitment flow: User pays upfront, then uses tx_hash for subsequent queries\n- Cleaner UX: Separates subscription creation from query execution\n\n**Payment Flow:**\n1. Frontend builds and signs payment_header\n2. Backend verifies payment via OnchainFi\n3. Backend settles payment on-chain\n4. Backend creates microsub record with inherited DataRoom settings (if dataroom_id provided)\n5. Backend returns MicrosubInfo with tx_hash for future queries\n\n**Required Fields:**\n- payment_header: Base64-encoded X402 payment header (required, no tx_hash option for new subscriptions)\n\n**Optional Configuration:**\n- agent_id: Agent identifier (optional when dataroom_id is provided; will be auto-resolved from DataRoom's bonfire)\n- query_limit: Maximum queries allowed (default: 25, range: 1-100)\n- expiration_days: Days until expiration (default: 30, range: 1-365)\n- expected_amount: Payment amount in token units (default: \"1000000\")\n\n**Optional DataRoom Fields (for marketplace subscriptions):**\n- dataroom_id: DataRoom ID to subscribe to (inherits ALL settings from DataRoom)\n- description: Fallback description (used if dataroom_id not provided)\n- center_node_uuid: Fallback center node (used if dataroom_id not provided)\n- system_prompt: Fallback system prompt (used if dataroom_id not provided)\n- bonfire_id: Fallback bonfire identifier (used if dataroom_id not provided)\n\n**Design Notes:**\n- When dataroom_id is provided, it takes precedence over individual data room fields\n- When agent_id is not provided but dataroom_id is, agent_id is auto-resolved from the DataRoom's bonfire\n- If both agent_id and dataroom_id are provided, the explicit agent_id takes precedence\n- The endpoint does NOT check for existing microsubs (this is for NEW subscriptions only)\n- The endpoint does NOT accept tx_hash (only payment_header for new payments)\n- Returns MicrosubInfo directly (not wrapped in query response like paid chat/delve endpoints)"},"CreateMicrosubResponse":{"properties":{"microsub":{"$ref":"#/components/schemas/MicrosubInfo","description":"Created microsub information"},"payment":{"additionalProperties":true,"type":"object","title":"Payment","description":"Payment verification and settlement details"}},"type":"object","required":["microsub","payment"],"title":"CreateMicrosubResponse","description":"Response containing microsub information with payment metadata."},"DataRoomContributionsResponse":{"properties":{"dataroom_id":{"type":"string","title":"Dataroom Id","description":"DataRoom ObjectId"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Associated Bonfire ID"},"total_cards_analyzed":{"type":"integer","title":"Total Cards Analyzed","description":"Number of HyperCards with entity_usage_stats"},"contributors":{"items":{"$ref":"#/components/schemas/ContributorInfo"},"type":"array","title":"Contributors","description":"List of contributors sorted by contribution"},"generated_at":{"type":"string","title":"Generated At","description":"Timestamp when stats were generated"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if stats generation failed partially"}},"type":"object","required":["dataroom_id","total_cards_analyzed","generated_at"],"title":"DataRoomContributionsResponse","description":"Response for dataroom contribution statistics."},"DataRoomHyperBlogsResponse":{"properties":{"hyperblogs":{"items":{"$ref":"#/components/schemas/HyperBlogInfo"},"type":"array","title":"Hyperblogs","description":"List of hyperblogs for this data room"},"count":{"type":"integer","title":"Count","description":"Number of hyperblogs returned"},"dataroom_id":{"type":"string","title":"Dataroom Id","description":"DataRoom ObjectId"},"limit":{"type":"integer","title":"Limit","description":"Maximum results per page"},"offset":{"type":"integer","title":"Offset","description":"Offset for pagination"}},"type":"object","required":["hyperblogs","count","dataroom_id","limit","offset"],"title":"DataRoomHyperBlogsResponse","description":"Response containing hyperblogs for a data room."},"DataRoomInfo":{"properties":{"id":{"type":"string","title":"Id","description":"DataRoom ObjectId as string"},"creator_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Wallet","description":"Wallet address of the creator"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"description":{"type":"string","title":"Description","description":"Data room description"},"system_prompt":{"type":"string","title":"System Prompt","description":"System prompt for chat"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Optional center node UUID"},"price_usd":{"type":"number","title":"Price Usd","description":"Price in USD"},"query_limit":{"type":"integer","title":"Query Limit","description":"Maximum queries per subscription"},"expiration_days":{"type":"integer","title":"Expiration Days","description":"Subscription duration in days"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether data room is active"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"},"creator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Name","description":"Creator agent display name"},"creator_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Username","description":"Creator agent username"},"bonfire_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Name","description":"Bonfire display name"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Bonfire registered agent ID for subscriptions"},"current_hyperblog_price_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Hyperblog Price Usd","description":"Current dynamic price for hyperblog purchase in USD (formatted as decimal string). Uses base price_usd for first purchase."},"dynamic_pricing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dynamic Pricing Enabled","description":"Whether dynamic pricing is active for this dataroom"},"price_step_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Step Usd","description":"Price increase in USD per hyperblog purchase"},"price_decay_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Decay Rate","description":"Linear decay rate in USD per hour"},"total_purchases":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Purchases","description":"Total count of hyperblog purchases for this dataroom"},"last_purchase_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Purchase At","description":"Timestamp of the most recent hyperblog purchase"},"htn_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htn Template Id","description":"HTN template ObjectId used for blog/card generation"},"htn_template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htn Template Type","description":"Template type (blog, card, evaluation) — resolved from htn_template_id"},"image_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Model","description":"FLUX model configured for banner generation (schnell/dev/pro/realism)"},"source_bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Bonfire Id","description":"Bonfire ID this dataroom belongs to (set when viewing via cluster aggregation)"},"source_bonfire_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Bonfire Name","description":"Bonfire name this dataroom belongs to (set when viewing via cluster aggregation)"}},"type":"object","required":["id","bonfire_id","description","system_prompt","price_usd","query_limit","expiration_days","is_active","created_at","updated_at"],"title":"DataRoomInfo","description":"Response model for data room information."},"DataRoomListResponse":{"properties":{"datarooms":{"items":{"$ref":"#/components/schemas/DataRoomInfo"},"type":"array","title":"Datarooms","description":"List of data rooms"},"count":{"type":"integer","title":"Count","description":"Number of data rooms returned"},"limit":{"type":"integer","title":"Limit","description":"Maximum results per page"},"offset":{"type":"integer","title":"Offset","description":"Offset for pagination"}},"type":"object","required":["datarooms","count","limit","offset"],"title":"DataRoomListResponse","description":"Response wrapper for listing data rooms with pagination."},"DataRoomMicrosubsResponse":{"properties":{"microsubs":{"items":{"$ref":"#/components/schemas/MicrosubInfo"},"type":"array","title":"Microsubs","description":"List of microsubs for this data room"},"count":{"type":"integer","title":"Count","description":"Number of microsubs returned"},"dataroom_id":{"type":"string","title":"Dataroom Id","description":"DataRoom ObjectId"}},"type":"object","required":["microsubs","count","dataroom_id"],"title":"DataRoomMicrosubsResponse","description":"Response containing microsubs for a data room."},"DataRoomPreviewResponse":{"properties":{"entities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities","description":"Preview entities from the bonfire"},"episodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Episodes","description":"Preview episodes from the bonfire"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges","description":"Edges connecting preview nodes"},"dataroom_id":{"type":"string","title":"Dataroom Id","description":"DataRoom ObjectId"},"description":{"type":"string","title":"Description","description":"Description used as search query"},"num_results":{"type":"integer","title":"Num Results","description":"Number of entities returned"}},"type":"object","required":["entities","episodes","edges","dataroom_id","description","num_results"],"title":"DataRoomPreviewResponse","description":"Response containing preview entities from a data room's bonfire."},"DeleteDocumentResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"document_id":{"type":"string","title":"Document Id","description":"Deleted document ID"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"chunks_deleted":{"type":"integer","title":"Chunks Deleted","description":"Number of chunks deleted"},"summaries_deleted":{"type":"integer","title":"Summaries Deleted","description":"Number of summaries deleted"}},"type":"object","required":["success","document_id","bonfire_id","chunks_deleted","summaries_deleted"],"title":"DeleteDocumentResponse","description":"Response from document deletion operations."},"DeletePersonalityTraitsRequest":{"properties":{"trait_ids":{"items":{"type":"string"},"type":"array","title":"Trait Ids","description":"IDs of traits to delete"}},"type":"object","required":["trait_ids"],"title":"DeletePersonalityTraitsRequest","description":"Request to delete personality traits by IDs."},"DelveRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query string for the knowledge graph"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Optional center node UUID for focused search"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier (ObjectId) for knowledge graph scoping - required for isolation"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Optional agent identifier (ObjectId) for graph state ownership. If provided, graph state will be saved for this agent."},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Optional existing graph state ID for loading/hydrating graph state"},"num_results":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Num Results","description":"Number of search results to return","default":10},"search_recipe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Recipe","description":"Search recipe to use (e.g., 'hybrid', 'focal', etc.)"},"min_fact_rating":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Min Fact Rating","description":"Minimum fact rating threshold for filtering results"},"mmr_lambda":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Mmr Lambda","description":"Maximum Marginal Relevance lambda for result diversity"},"window_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window Start","description":"ISO datetime string for filtering facts/episodes by start time"},"window_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window End","description":"ISO datetime string for filtering facts/episodes by end time"},"relationship_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Relationship Types","description":"List of relationship types to filter by"},"use_bfs":{"type":"boolean","title":"Use Bfs","description":"Vestigial — retained for backward compatibility. Passing ``center_node_uuid`` now unconditionally enables BFS from that center plus node_distance reranking; this flag is a no-op.","default":false},"broaden_if_sparse":{"type":"boolean","title":"Broaden If Sparse","description":"Opt-in broader re-search fallback. When true AND the centered search returns fewer than num_results/2 nodes, re-runs the search without center/BFS and merges the result sets. Default False — callers get the narrow centered result as-is.","default":false},"smart":{"type":"boolean","title":"Smart","description":"Opt-in 'combined signals' mode. When True, the service runs the bonfire's primary grammar cascade and uses it two ways: (1) adopts the leaf UUID as the center only when the caller omitted center_node_uuid; (2) enriches the query text with the walk's rule labels + leaf name so the bm25/cosine/bfs pool sees the cascade's semantic signal. When the cascade adopts the center, the recipe is forced to COMBINED_HYBRID_SEARCH_CROSS_ENCODER so the enriched text drives ranking; when the caller passed a center, the existing auto-swap to node_distance still fires — enrichment still widens the pool upstream. No-op when cascade doesn't resolve (no primary_grammar, cascade fails, etc.) — graceful degrade to the plain query. Caller-supplied search_recipe always wins.","default":false}},"type":"object","required":["query","bonfire_id"],"title":"DelveRequest","description":"Request to perform unified search across the knowledge graph using Graphiti.\n\nThis request provides a unified interface for all search methods, consolidating\nmultiple search endpoints into a single primitive that leverages `graphitti.search_()`\nas the core search method with MongoDB-based graph state management.\n\nSupports loading existing graph state for incremental searches and focused\nsearches around center nodes. The bonfire_id is the primary scoping parameter\nfor shared knowledge graphs, ensuring strict isolation across bonfires.\n\n**Migration Notes for API Consumers:**\n\n- The `bonfire_id` field replaces the previous `group_id` parameter\n- `bonfire_id` must be a valid MongoDB ObjectId string\n- All agents in the same bonfire share the same knowledge graph partition\n- Queries are scoped to the bonfire level, not individual agents\n- To obtain bonfire_id, query `GET /agents/{agent_id}` and use the `bonfire_ref` field\n\nExample:\n```python\n# Step 1: Get bonfire_id from agent registration\nagent_response = requests.get(f\"/agents/{agent_id}\")\nbonfire_id = agent_response.json()[\"bonfire_ref\"]\n\n# Step 2: Use bonfire_id for delve queries\ndelve_response = requests.post(\"/delve\", json={\n    \"query\": \"What did the user discuss about Python?\",\n    \"bonfire_id\": bonfire_id,\n    \"num_results\": 10\n})\n```"},"DelveResponseWithPayment":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the search was successful"},"query":{"type":"string","title":"Query","description":"The search query that was executed"},"num_results":{"type":"integer","title":"Num Results","description":"Number of results returned"},"episodes":{"items":{"$ref":"#/components/schemas/ApiEpisode"},"type":"array","title":"Episodes","description":"List of episode nodes returned by the search"},"entities":{"items":{"$ref":"#/components/schemas/ApiEntity"},"type":"array","title":"Entities","description":"List of entity nodes returned by the search"},"edges":{"items":{"$ref":"#/components/schemas/ApiEdge"},"type":"array","title":"Edges","description":"List of edges returned by the search"},"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes","description":"[DEPRECATED] No longer populated; use episodes + entities"},"chunks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Chunks","description":"Hydrated chunks if requested"},"vector_refs":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Vector Refs","description":"Vector references if requested"},"vectors":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Vectors","description":"Hydrated vectors if requested"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Search execution metrics"},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Unique identifier for this graph state, used for expansion operations"},"parent_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Graph Id","description":"Parent graph state ID if this is an incremental search"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Center node UUID used for the search"},"agent_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Context","description":"Agent context information"},"new_nodes_count":{"type":"integer","title":"New Nodes Count","description":"Number of newly added nodes (if graph state was expanded)","default":0},"new_edges_count":{"type":"integer","title":"New Edges Count","description":"Number of newly added edges (if graph state was expanded)","default":0},"cached":{"type":"boolean","title":"Cached","description":"Whether the result was retrieved from cache","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error type if operation failed"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Detailed error message if operation failed"},"validation_stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation Stats","description":"Validation statistics from the operation"},"payment":{"$ref":"#/components/schemas/infrastructure__dto__requests__PaymentMetadata","description":"Payment verification and settlement metadata"}},"type":"object","required":["success","query","num_results","payment"],"title":"DelveResponseWithPayment","description":"Response from payment-gated delve search queries.\n\nExtends DelveResponse with payment metadata including verification status,\nsettlement status, transaction hash, and microsub information."},"DeploymentConfigurationDTO":{"properties":{"platform":{"type":"string","enum":["telegram","discord","web","matrix"],"title":"Platform","description":"Deployment platform: 'telegram', 'discord', 'web', or 'matrix'","default":"telegram"},"telegramBotToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegrambottoken","description":"Telegram bot token"},"discordBotToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discordbottoken","description":"Discord bot token"},"bonfireId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfireid","description":"Bonfire ID to link agent to"},"reportingConfig":{"anyOf":[{"$ref":"#/components/schemas/ReportingConfigDTO"},{"type":"null"}],"description":"Reporting configuration"}},"additionalProperties":true,"type":"object","title":"DeploymentConfigurationDTO","description":"Deployment-specific configuration for agent creation/update requests."},"DeploymentConfigurationResponse":{"properties":{"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform","description":"Deployment platform"},"telegramBotToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegrambottoken","description":"Telegram bot token (masked)"},"discordBotToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discordbottoken","description":"Discord bot token (masked)"},"reportingGroupId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reportinggroupid","description":"DEPRECATED: use reportingConfig"},"reportingConfig":{"anyOf":[{"$ref":"#/components/schemas/ReportingConfigResponse"},{"type":"null"}],"description":"Structured reporting configuration"},"bonfireId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfireid","description":"Bonfire ID"}},"additionalProperties":true,"type":"object","title":"DeploymentConfigurationResponse","description":"Deployment configuration response (bot tokens masked)."},"DocumentResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"Document ID if created"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message"}},"type":"object","required":["success","bonfire_id"],"title":"DocumentResponse","description":"Response from content ingestion operations."},"EdgeCreateResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"edge_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edge Uuid","description":"Created edge UUID"},"source_uuid":{"type":"string","title":"Source Uuid","description":"Source entity UUID"},"target_uuid":{"type":"string","title":"Target Uuid","description":"Target entity UUID"},"edge_name":{"type":"string","title":"Edge Name","description":"Relationship name"}},"type":"object","required":["success","source_uuid","target_uuid","edge_name"],"title":"EdgeCreateResponse","description":"Response from edge creation by UUID."},"EdgeUpdateRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire ID for scoping"},"expired_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expired At","description":"ISO datetime when edge stopped being true"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Updated edge name"},"fact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact","description":"Updated edge fact"}},"type":"object","required":["bonfire_id"],"title":"EdgeUpdateRequest","description":"Request to update fields on an existing RELATES_TO edge."},"EntityCreateResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid","description":"Entity UUID"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Entity name"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Group scope"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"type":"object","required":["success"],"title":"EntityCreateResponse","description":"Response from entity creation operations."},"EntityExpandRequest":{"properties":{"entity_uuid":{"type":"string","title":"Entity Uuid","description":"UUID of the entity node to expand from"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire ID for graph scoping and access control"},"limit":{"type":"integer","minimum":1.0,"title":"Limit","description":"Maximum number of edges to return","default":50}},"type":"object","required":["entity_uuid","bonfire_id"],"title":"EntityExpandRequest","description":"Request to expand an entity node with its connected edges and nodes.\n\nReturns edges and connected entities/episodes for the specified entity,\nscoped to the given bonfire."},"EntityResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"entity":{"$ref":"#/components/schemas/GraphEntity","description":"Entity data"},"edges":{"anyOf":[{"items":{"$ref":"#/components/schemas/GraphEdge"},"type":"array"},{"type":"null"}],"title":"Edges","description":"Related edges if requested"}},"type":"object","required":["success","entity"],"title":"EntityResponse","description":"Response containing entity information.\n\nUses the graphiti dump shape (``GraphEntity``/``GraphEdge``) because\nthis response flows from direct entity CRUD paths (``get_entity``,\n``_serialize_neo4j_value``), not through the search-layer\n``extract_graph_data`` flattener."},"EntityUpdateResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"uuid":{"type":"string","title":"Uuid","description":"Entity UUID"},"name":{"type":"string","title":"Name","description":"Updated entity name"},"summary":{"type":"string","title":"Summary","description":"Updated summary","default":""},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","description":"Updated labels"}},"type":"object","required":["success","uuid","name"],"title":"EntityUpdateResponse","description":"Response from entity update operations."},"EnvVarDeleteResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID"},"key":{"type":"string","title":"Key","description":"Deleted key"},"deleted":{"type":"boolean","title":"Deleted","description":"Whether the key was found and deleted"}},"type":"object","required":["agent_id","key","deleted"],"title":"EnvVarDeleteResponse","description":"Response after deleting an env var."},"EnvVarEntry":{"properties":{"key":{"type":"string","title":"Key","description":"Environment variable name"},"has_value":{"type":"boolean","title":"Has Value","description":"Whether the variable has a value set","default":true}},"type":"object","required":["key"],"title":"EnvVarEntry","description":"Single env var entry (value masked for security)."},"EnvVarsListResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID"},"vars":{"items":{"$ref":"#/components/schemas/EnvVarEntry"},"type":"array","title":"Vars","description":"Environment variable entries"},"count":{"type":"integer","title":"Count","description":"Total count","default":0}},"type":"object","required":["agent_id"],"title":"EnvVarsListResponse","description":"Response listing env var keys for an agent."},"EnvVarsUpsertResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID"},"updated_keys":{"items":{"type":"string"},"type":"array","title":"Updated Keys","description":"Keys that were updated"},"count":{"type":"integer","title":"Count","description":"Number of vars upserted","default":0}},"type":"object","required":["agent_id"],"title":"EnvVarsUpsertResponse","description":"Response after upserting env vars."},"EpisodeExpandRequest":{"properties":{"episode_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Uuid","description":"UUID of a single episode to expand (for single expansion mode)"},"episode_uuids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1},{"type":"null"}],"title":"Episode Uuids","description":"List of episode UUIDs to expand (for batch expansion mode)"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire ID for graph scoping and access control"},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","description":"Maximum number of connected entities/edges per episode","default":50}},"type":"object","required":["bonfire_id"],"title":"EpisodeExpandRequest","description":"Request to expand episode node(s) with connected edges and entities.\n\nSupports both single episode expansion (episode_uuid) and batch expansion (episode_uuids).\nAt least one of episode_uuid or episode_uuids must be provided.\n\nFor single expansion, use episode_uuid with bonfire_id.\nFor batch expansion (backward compatible), use episode_uuids."},"EpisodeInput":{"properties":{"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Concise episode summary"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"Full episode content/text"},"window_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window Start","description":"ISO datetime for episode window start"},"window_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window End","description":"ISO datetime for episode window end"},"valid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid At","description":"ISO datetime for instant episodes (fallback)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Episode source identifier (e.g., vector/doc/chat)"},"source_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Description","description":"Human-readable source description"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes","description":"Additional metadata/attributes"}},"type":"object","title":"EpisodeInput","description":"Episode metadata for knowledge graph ingestion.\n\nThis model represents the core episode information. The backend enriches this\nwith a structured `entities` section before passing to Graphiti for extraction.\n\n**Fields:**\n- window_start: ISO timestamp for episode start\n- window_end: ISO timestamp for episode end\n- summary: Brief episode summary (used in episode node content)\n- content: Detailed episode content (optional, used for richer context)\n- name: Episode name (auto-generated if not provided)\n\n**Backend Processing:**\n\nThe backend's `_build_structured_content()` method adds an `entities` section:\n```python\n{\n    \"entities\": {\n        \"users\": [{\"user_id\": \"...\", \"username\": \"...\"}],\n        \"labels\": [{\"label_id\": \"...\", \"label_name\": \"...\"}],\n        \"working_doc_updates\": [...]\n    }\n}\n```\n\nThis structured format enables Graphiti to extract entities and edges automatically.\n\n**Attestation Integration:**\n\nThe `attributes` field supports attestation metadata:\n- `attestation_uids`: List of EAS attestation UIDs linked to this episode\n- `attestation_metadata`: Additional attestation data (types, verification status)\n\nExample:\n```python\nattributes={\n    \"attestation_uids\": [\"0xabc...\", \"0xdef...\"],\n    \"attestation_metadata\": {\n        \"types\": [\"LOCATION_CHANGE\", \"QUEST_COMPLETION\"],\n        \"verification_status\": \"verified\"\n    }\n}\n```\n\nSupports windowed (window_start/window_end) and instant (valid_at) episodes.\nProvide at least one of summary or content."},"EpisodeResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"episode":{"$ref":"#/components/schemas/GraphEpisode","description":"Episode data"},"edges":{"anyOf":[{"items":{"$ref":"#/components/schemas/GraphEdge"},"type":"array"},{"type":"null"}],"title":"Edges","description":"Related edges if requested"}},"type":"object","required":["success","episode"],"title":"EpisodeResponse","description":"Response containing episode information.\n\nUses the graphiti dump shape — see EntityResponse for rationale."},"EpisodeUpdateResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"episode_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Uuid","description":"Episode UUID if created"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message"}},"type":"object","required":["success"],"title":"EpisodeUpdateResponse","description":"Response from episode update operations."},"GenerateSummariesRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"}},"type":"object","required":["bonfire_id"],"title":"GenerateSummariesRequest","description":"Request to generate summaries for a bonfire."},"GlobalGraphStatsResponse":{"properties":{"total_entities":{"type":"integer","title":"Total Entities"},"total_edges":{"type":"integer","title":"Total Edges"},"total_communities":{"type":"integer","title":"Total Communities"},"top_bonfires":{"items":{"$ref":"#/components/schemas/BonfireEntityCount"},"type":"array","title":"Top Bonfires"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["total_entities","total_edges","total_communities","top_bonfires","generated_at"],"title":"GlobalGraphStatsResponse","description":"Response for GET /insights/graph-stats/global."},"GrammarAddRequest":{"properties":{"grammar":{"type":"string","title":"Grammar"},"rule":{"type":"string","title":"Rule"},"text":{"type":"string","title":"Text"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["grammar","rule","text"],"title":"GrammarAddRequest"},"GrammarBuildRequest":{"properties":{"taxonomy_label_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Label Id"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","title":"GrammarBuildRequest"},"GrammarCreateRequest":{"properties":{"grammar":{"type":"string","title":"Grammar"},"rules":{"additionalProperties":{"items":{},"type":"array"},"type":"object","title":"Rules","description":"Rules dict — values can be strings or {\"text\": \"...\", \"id\": \"...\"} objects"}},"type":"object","required":["grammar","rules"],"title":"GrammarCreateRequest"},"GrammarLensSearchRequest":{"properties":{"query":{"type":"string","title":"Query"},"grammars":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Grammars"},"top_k":{"type":"integer","title":"Top K","default":3}},"type":"object","required":["query"],"title":"GrammarLensSearchRequest"},"GrammarListExpansionsRequest":{"properties":{"grammar":{"type":"string","title":"Grammar"},"rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule"},"filter_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter Metadata"},"sort_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"},"sort_desc":{"type":"boolean","title":"Sort Desc","default":false},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","required":["grammar"],"title":"GrammarListExpansionsRequest"},"GrammarRemoveRequest":{"properties":{"grammar":{"type":"string","title":"Grammar"},"id":{"type":"string","title":"Id"}},"type":"object","required":["grammar","id"],"title":"GrammarRemoveRequest"},"GrammarSearchAndExpandRequest":{"properties":{"grammar":{"type":"string","title":"Grammar"},"query":{"type":"string","title":"Query"},"top_k":{"type":"integer","title":"Top K","default":3}},"type":"object","required":["grammar","query"],"title":"GrammarSearchAndExpandRequest"},"GrammarSearchRequest":{"properties":{"query":{"type":"string","title":"Query"},"grammar":{"type":"string","title":"Grammar"},"rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule"},"top_k":{"type":"integer","title":"Top K","default":3},"expand":{"type":"boolean","title":"Expand","default":true},"num_results":{"type":"integer","title":"Num Results","default":10},"temperature":{"type":"number","title":"Temperature","default":0.3},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"}},"type":"object","required":["query","grammar"],"title":"GrammarSearchRequest"},"GrammarUpdateRequest":{"properties":{"grammar":{"type":"string","title":"Grammar"},"id":{"type":"string","title":"Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["grammar","id"],"title":"GrammarUpdateRequest"},"GraphEdge":{"properties":{"uuid":{"type":"string","title":"Uuid"},"source_node_uuid":{"type":"string","title":"Source Node Uuid"},"target_node_uuid":{"type":"string","title":"Target Node Uuid"},"name":{"type":"string","title":"Name"},"fact":{"type":"string","title":"Fact"},"group_id":{"type":"string","title":"Group Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"episodes":{"items":{"type":"string"},"type":"array","title":"Episodes"},"fact_embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Fact Embedding"},"valid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid At"},"invalid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Invalid At"},"expired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired At"},"reference_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reference Time"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"type":"object","required":["uuid","source_node_uuid","target_node_uuid","name","fact","group_id","created_at","episodes","fact_embedding","valid_at","invalid_at","expired_at","reference_time","attributes"],"title":"GraphEdge","description":"EntityEdge.model_dump() output — one KG relationship.\n\nAll five nullable-looking fields (``fact_embedding``, ``valid_at``,\n``invalid_at``, ``expired_at``, ``reference_time``) are always\npresent in the dump; absent becomes ``None``. Hence Required X | None\nrather than NotRequired."},"GraphEntity":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"group_id":{"type":"string","title":"Group Id"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"summary":{"type":"string","title":"Summary"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"name_embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Name Embedding"}},"type":"object","required":["uuid","name","group_id","labels","created_at","summary","attributes","name_embedding"],"title":"GraphEntity","description":"EntityNode.model_dump() output — one KG entity.\n\nFields match the Task 6.5 contract test exactly. ``attributes`` is\nthe open user-defined bag; everything else has a fixed type."},"GraphEpisode":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"group_id":{"type":"string","title":"Group Id"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"source":{"type":"string","title":"Source"},"source_description":{"type":"string","title":"Source Description"},"content":{"type":"string","title":"Content"},"valid_at":{"type":"string","format":"date-time","title":"Valid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"entity_edges":{"items":{"type":"string"},"type":"array","title":"Entity Edges"}},"type":"object","required":["uuid","name","group_id","labels","source","source_description","content","valid_at","created_at","entity_edges"],"title":"GraphEpisode","description":"EpisodicNode.model_dump() output — one KG episode.\n\nThe fork adds a ``labels`` field on episodes (not present upstream)."},"GraphExpandResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the expansion operation succeeded"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message or error details"},"episodes":{"items":{"$ref":"#/components/schemas/GraphEpisode"},"type":"array","title":"Episodes","description":"Episode nodes (populated for episode expansion, empty for entity expansion)"},"nodes":{"items":{"$ref":"#/components/schemas/GraphEntity"},"type":"array","title":"Nodes","description":"Connected entity nodes"},"edges":{"items":{"$ref":"#/components/schemas/GraphEdge"},"type":"array","title":"Edges","description":"Relationship edges connecting the expanded node to others"},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Graph state hash identifier for caching (optional)"},"num_results":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Results","description":"Total count of nodes and edges returned"}},"type":"object","required":["success"],"title":"GraphExpandResponse","description":"Response from expanding a graph node (entity or episode).\n\nUsed for both entity expansion and episode expansion endpoints.\nFor entity expansion, the episodes field will be empty.\nFor episode expansion, episodes contains the expanded episode nodes.\n\nUses the graphiti dump shape — the expand controller path emits\nraw graphiti node dumps (datetime, group_id, entity_edges, ...) via\n``KGCrudService.expand_entity`` / ``_serialize_neo4j_value``, NOT\nthe search-layer flattener ``extract_graph_data``. This is different\nfrom ``DelveResponse``, which uses the flat API shape."},"GroupConfigDTO":{"properties":{"groupId":{"type":"string","title":"Groupid","description":"Telegram group ID"},"status":{"type":"string","enum":["enabled","disabled"],"title":"Status","description":"Group processing status","default":"enabled"},"topicPolicy":{"type":"string","enum":["open","restricted"],"title":"Topicpolicy","description":"Topic-level policy within this group","default":"open"},"silentMode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Silentmode","description":"If true, group is in silent mode"},"topicConfigs":{"items":{"$ref":"#/components/schemas/TopicConfigDTO"},"type":"array","title":"Topicconfigs","description":"Topic-specific configurations"},"disableStoring":{"type":"boolean","title":"Disablestoring","description":"Disable message storing for this group","default":false}},"additionalProperties":true,"type":"object","required":["groupId"],"title":"GroupConfigDTO","description":"Group-specific configuration for chat filtering."},"HTNTemplateInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Template ObjectId as string"},"name":{"type":"string","title":"Name","description":"Template name"},"template_type":{"type":"string","title":"Template Type","description":"Template type identifier"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description"},"system_prompt":{"type":"string","title":"System Prompt","description":"System prompt for LLM"},"user_prompt_template":{"type":"string","title":"User Prompt Template","description":"User prompt template with placeholders"},"node_count_config":{"additionalProperties":{"$ref":"#/components/schemas/LengthConfig"},"type":"object","title":"Node Count Config","description":"Node count configuration by length"},"default_length":{"type":"string","title":"Default Length","description":"Default length setting"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether template is active"},"required_inputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Required Inputs","description":"Template inputs the caller must supply (e.g. source URLs for evaluation)"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Creator identifier"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","name","template_type","system_prompt","user_prompt_template","node_count_config","default_length","is_active"],"title":"HTNTemplateInfo","description":"Response model for HTN template information."},"HTNTemplateListResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/HTNTemplateInfo"},"type":"array","title":"Templates","description":"List of HTN templates"},"count":{"type":"integer","title":"Count","description":"Total number of templates returned"}},"type":"object","required":["templates","count"],"title":"HTNTemplateListResponse","description":"Response for listing HTN templates."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Health status"},"api":{"type":"string","title":"Api","description":"API name"},"version":{"type":"string","title":"Version","description":"API version"},"job_system":{"additionalProperties":true,"type":"object","title":"Job System","description":"Job system status"}},"type":"object","required":["status","api","version","job_system"],"title":"HealthResponse","description":"Response from health check endpoint."},"HybridLabelingRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"taxonomy_run_id":{"anyOf":[{"type":"string","maxLength":24,"minLength":24,"pattern":"^[0-9a-f]{24}$","example":"5eb7cf5a86d9755df3a6c593"},{"type":"string"},{"type":"null"}],"title":"Taxonomy Run Id"},"vector_threshold":{"type":"number","title":"Vector Threshold","default":0.55}},"type":"object","required":["bonfire_id"],"title":"HybridLabelingRequest","description":"Request to run hybrid labeling (vector + LLM) for a bonfire."},"HybridLabelingResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Job identifier for tracking"},"status":{"type":"string","title":"Status","description":"Operation status"}},"type":"object","required":["job_id","status"],"title":"HybridLabelingResponse","description":"Response from hybrid labeling operations."},"HyperBlogBannerResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether banner generation succeeded"},"banner_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banner Url","description":"Generated banner URL or base64 data (None if failed)"},"hyperblog_id":{"type":"string","title":"Hyperblog Id","description":"HyperBlog ObjectId as string"},"cached":{"type":"boolean","title":"Cached","description":"Whether the banner was already generated (True) or newly created (False)","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if generation failed"}},"type":"object","required":["success","hyperblog_id"],"title":"HyperBlogBannerResponse","description":"Response containing generated banner URL or error information."},"HyperBlogCommentInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Comment ObjectId as string"},"hyperblog_id":{"type":"string","title":"Hyperblog Id","description":"HyperBlog ObjectId"},"user_wallet":{"type":"string","title":"User Wallet","description":"Commenter wallet address"},"content":{"type":"string","title":"Content","description":"Comment text"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Comment creation timestamp"},"parent_comment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Comment Id","description":"Parent comment ID"}},"type":"object","required":["id","hyperblog_id","user_wallet","content","created_at"],"title":"HyperBlogCommentInfo","description":"Individual comment information."},"HyperBlogCommentRequest":{"properties":{"content":{"type":"string","maxLength":2000,"minLength":1,"title":"Content","description":"Comment text"},"user_wallet":{"type":"string","title":"User Wallet","description":"Wallet address of the commenter"},"parent_comment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Comment Id","description":"Parent comment ID for threaded replies"}},"type":"object","required":["content","user_wallet"],"title":"HyperBlogCommentRequest","description":"Request to add a comment to a hyperblog."},"HyperBlogCommentsResponse":{"properties":{"comments":{"items":{"$ref":"#/components/schemas/HyperBlogCommentInfo"},"type":"array","title":"Comments","description":"List of comments"},"count":{"type":"integer","title":"Count","description":"Number of comments returned"},"total":{"type":"integer","title":"Total","description":"Total comment count for this hyperblog"},"limit":{"type":"integer","title":"Limit","description":"Maximum results per page"},"offset":{"type":"integer","title":"Offset","description":"Offset for pagination"}},"type":"object","required":["comments","count","total","limit","offset"],"title":"HyperBlogCommentsResponse","description":"Response containing paginated comments for a hyperblog."},"HyperBlogInfo":{"properties":{"id":{"type":"string","title":"Id","description":"HyperBlog ObjectId as string"},"dataroom_id":{"type":"string","title":"Dataroom Id","description":"DataRoom ObjectId as string"},"user_query":{"type":"string","title":"User Query","description":"User query that prompted blog generation"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"AI-generated blog title (preferred over user_query for display)"},"author_wallet":{"type":"string","title":"Author Wallet","description":"Wallet address of blog author/purchaser"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name","description":"Author agent display name (if available)"},"author_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Username","description":"Author agent username (if available)"},"preview":{"type":"string","title":"Preview","description":"Preview text (first 200 characters)"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"AI-generated 50-word summary of blog content (preferred over preview for feed display)"},"image_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Prompt","description":"AI-generated prompt for banner image generation (used for card mode)"},"banner_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banner Url","description":"Generated banner image URL or base64 data (cached after generation)"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count","description":"Total word count of blog content"},"blog_length":{"type":"string","enum":["short","medium","long"],"title":"Blog Length","description":"Desired length of blog","default":"medium"},"generation_status":{"type":"string","title":"Generation Status","description":"Status: 'generating', 'completed', 'failed'"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"is_public":{"type":"boolean","title":"Is Public","description":"Whether blog is publicly visible"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash","description":"Payment transaction hash"},"upvotes":{"type":"integer","title":"Upvotes","description":"Total upvote count","default":0},"downvotes":{"type":"integer","title":"Downvotes","description":"Total downvote count","default":0},"comment_count":{"type":"integer","title":"Comment Count","description":"Total comment count","default":0},"view_count":{"type":"integer","title":"View Count","description":"Total view count","default":0},"taxonomy_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Taxonomy Keywords","description":"Taxonomy keywords from bonfire that match the blog content"},"dataroom_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataroom Description","description":"Description of the DataRoom this hyperblog belongs to (enriched from DataRoom.description)"},"source_bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Bonfire Id","description":"Bonfire ID this hyperblog's dataroom belongs to (set when viewing via cluster aggregation)"},"source_bonfire_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Bonfire Name","description":"Bonfire name this hyperblog's dataroom belongs to (set when viewing via cluster aggregation)"}},"type":"object","required":["id","dataroom_id","user_query","author_wallet","preview","generation_status","created_at","is_public"],"title":"HyperBlogInfo","description":"HyperBlog information for dataroom marketplace display."},"HyperBlogViewRequest":{"properties":{"user_wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Wallet","description":"Wallet address of the viewer (optional)"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session ID for anonymous tracking"}},"type":"object","title":"HyperBlogViewRequest","description":"Request to record a view on a hyperblog."},"HyperBlogViewResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the view was recorded"},"view_count":{"type":"integer","title":"View Count","description":"Updated view count"}},"type":"object","required":["success","view_count"],"title":"HyperBlogViewResponse","description":"Response for hyperblog view operation."},"HyperBlogVoteRequest":{"properties":{"vote_type":{"type":"string","enum":["upvote","downvote"],"title":"Vote Type","description":"Type of vote"},"user_wallet":{"type":"string","title":"User Wallet","description":"Wallet address of the voter"}},"type":"object","required":["vote_type","user_wallet"],"title":"HyperBlogVoteRequest","description":"Request to vote on a hyperblog."},"HyperBlogVoteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the vote was recorded"},"upvotes":{"type":"integer","title":"Upvotes","description":"Updated upvote count"},"downvotes":{"type":"integer","title":"Downvotes","description":"Updated downvote count"},"user_vote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Vote","description":"Current user's vote type (upvote/downvote/null)"}},"type":"object","required":["success","upvotes","downvotes"],"title":"HyperBlogVoteResponse","description":"Response for hyperblog vote operation."},"ImportApplicantBatchRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"batch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Name"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"table_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Text","description":"Raw pasted table text, typically TSV copied from a spreadsheet"},"rows":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Rows","description":"Structured rows when importing JSON directly"},"column_map":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Column Map","description":"Custom column mapping. None = LLM-inferred, {} = passthrough mode, {src: dst} = explicit map."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional batch metadata"},"rubric_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Id","description":"Structured rubric ID for batch evaluation"}},"type":"object","required":["bonfire_id"],"title":"ImportApplicantBatchRequest","description":"Import a batch of applicant rows from pasted table text or structured rows."},"IngestContentRequest":{"properties":{"content":{"type":"string","title":"Content"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","default":"default"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["content"],"title":"IngestContentRequest","description":"Request to ingest document content into the system."},"JobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"bonfire_ref":{"type":"string","title":"Bonfire Ref"},"workflow_type":{"$ref":"#/components/schemas/WorkflowType"},"source":{"$ref":"#/components/schemas/JobSource"},"state":{"$ref":"#/components/schemas/JobState"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["job_id","bonfire_ref","workflow_type","source","state","started_at"],"title":"JobResponse","description":"Response model for job status."},"JobSource":{"type":"string","enum":["endpoint","scheduler","api","task_queue"],"title":"JobSource","description":"Job source types."},"JobState":{"type":"string","enum":["pending","queued","running","completed","failed"],"title":"JobState","description":"Job execution states."},"JobStatusResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Job status (typically 'started')"},"job_id":{"type":"string","title":"Job Id","description":"Job identifier for tracking"}},"type":"object","required":["status","job_id"],"title":"JobStatusResponse","description":"Response indicating a job has been started."},"JobsListResponse":{"properties":{"jobs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Jobs","description":"List of jobs"},"total":{"type":"integer","title":"Total","description":"Total number of jobs"}},"type":"object","required":["total"],"title":"JobsListResponse","description":"Response containing list of jobs."},"KGEpisodeUpdateRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier (legacy compatibility). Used for resolving bonfire context."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent identifier for episode attribution; bonfire_id determines graph partition."},"episode":{"$ref":"#/components/schemas/EpisodeInput","description":"Episode metadata including window_start, window_end, summary, and content. Backend enriches this with structured entities before passing to Graphiti."},"labels":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Resolved taxonomy labels with label_id and label_name. Agent should resolve these by querying /entity/{uuid} before episode creation. Used for creating TaxonomyLabel entities and has_update edges."},"working_doc_updates":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Working Doc Updates","description":"Working document updates. DEPRECATED: triples field is no longer processed. Graphiti extracts entities/edges automatically from structured content. Agents should remove triple extraction logic."},"user_updates":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"User Updates","description":"Resolved user updates with user_id, username, and per_label activity. Agent should resolve users by querying /entity/{uuid} before episode creation. Used for creating User entities and has_update edges (TaxonomyLabel -> User)."},"vector_refs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Vector Refs","description":"Vector search results for creating chunk entities and episode->chunk references. Should include 'results' array with chunk_id, doc_id, and confidence fields."}},"type":"object","required":["bonfire_id","episode"],"title":"KGEpisodeUpdateRequest","description":"Request to ingest a single agent episode update into the Knowledge Graph.\n\nThis endpoint uses Graphiti's improved deduplication system (commit 7c469e8e2b) to\nautomatically extract entities and edges from structured episode content.\n\n**Architecture (Phases 1-5 Complete):**\n\n1. **Agent Resolves Entities**: The agent (bonfires-ai) resolves users and labels from\n   messages by querying the backend's `/entity/{uuid}` endpoint.\n\n2. **Structured Content**: The backend enriches the episode with an `entities` section\n   containing users, labels, and working_doc_updates in a format Graphiti can extract.\n\n3. **Graphiti Extraction**: Graphiti automatically:\n   - Extracts entities using custom types (User, TaxonomyLabel, WorkingDocUpdate)\n   - Deduplicates entities using MinHash LSH + exact matching + LLM fallback\n   - Discovers `has_update` edges from structured content\n   - Creates entity nodes and edges in Neo4j\n\n**Payload Contract:**\n\n- `bonfire_id`: Bonfire identifier for graph partition scoping\n- `agent_id`: Agent identifier for episode attribution\n- `episode`: Episode metadata with window_start, window_end, summary, content\n- `labels`: Resolved taxonomy labels with label_id and label_name\n- `user_updates`: Resolved users with user_id, username, and per_label activity\n- `working_doc_updates`: DEPRECATED—triples field no longer processed\n- `vector_refs`: Vector search results for creating chunk entities and references\n\n**Deprecated Fields:**\n\n- `working_doc_updates[].triples`: No longer processed. Graphiti extracts entities/edges\n  from structured content automatically. Agents should remove triple extraction logic.\n\n**Response:**\n\nReturns episode UUID, entity/edge counts, and extraction mode (\"graphiti_dedup\").\n\n**Migration Notes:**\n\n- Old agents sending triples will see deprecation warnings but won't cause errors\n- Backend is backward compatible during migration period\n- New agents should use single-node graph (extract_summary only) without triple extraction\n\n**Attestation Support:**\n\nEpisode attributes can include attestation metadata:\n- `attestation_uids`: Array of EAS attestation UIDs\n- `attestation_metadata`: Additional attestation data\n\nAttestation UIDs are preserved in Neo4j and queryable via episode attributes.\n\n**Example:**\n\n```python\nrequest = KGEpisodeUpdateRequest(\n    bonfire_id=\"bonfire123\",\n    agent_id=\"agent456\",\n    episode=EpisodeInput(\n        window_start=\"2025-01-15T10:00:00Z\",\n        window_end=\"2025-01-15T10:20:00Z\",\n        summary=\"Episode summary\",\n        content=\"Detailed content\"\n    ),\n    labels=[\n        {\"label_id\": \"label789\", \"label_name\": \"Python\"}\n    ],\n    user_updates=[\n        {\n            \"user_id\": \"user123\",\n            \"username\": \"john_doe\",\n            \"per_label\": [\n                {\n                    \"label_id\": \"label789\",\n                    \"label_name\": \"Python\",\n                    \"update_description\": \"User activity in Python\"\n                }\n            ]\n        }\n    ],\n    vector_refs={\n        \"results\": [\n            {\"chunk_id\": \"chunk123\", \"doc_id\": \"doc456\", \"confidence\": 0.84}\n        ]\n    }\n)\n```\n\nSee `KGIMPLEMENTATION.md` for detailed architecture documentation."},"LabelChunksRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"}},"type":"object","required":["bonfire_id"],"title":"LabelChunksRequest","description":"Request to label chunks for a given bonfire using taxonomy categories."},"LabeledChunksResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"view":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View","description":"View type: 'chunks' (default) or 'documents'"},"chunks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Chunks","description":"List of labeled chunks (chunks view)"},"documents":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Documents","description":"List of documents (documents view)"},"chunks_by_taxonomy":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/TaxonomyGroup"},"type":"object"},{"type":"null"}],"title":"Chunks By Taxonomy","description":"Chunks organized by taxonomy label with metadata (chunks view)"},"total_documents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Documents","description":"Total number of documents (documents view)"},"total_chunks":{"type":"integer","title":"Total Chunks","description":"Total number of chunks"},"labeled_chunks":{"type":"integer","title":"Labeled Chunks","description":"Number of labeled chunks"},"unlabeled_chunks":{"type":"integer","title":"Unlabeled Chunks","description":"Number of unlabeled chunks"},"taxonomy_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Taxonomy Count","description":"Number of taxonomies (chunks view)"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Informational message"},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Current page number (documents view)"},"page_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Size","description":"Number of items per page (documents view)"},"total_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Pages","description":"Total number of pages (documents view)"},"has_next":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Next","description":"Whether there is a next page (documents view)"},"has_previous":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Previous","description":"Whether there is a previous page (documents view)"}},"type":"object","required":["bonfire_id","total_chunks","labeled_chunks","unlabeled_chunks"],"title":"LabeledChunksResponse","description":"Response containing labeled chunks organized by taxonomy."},"LangGraphChatRequest":{"properties":{"message":{"type":"string","title":"Message","description":"Current user message"},"chat_history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Chat History","description":"Previous conversation history"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Center node UUID for graph context"},"graph_mode":{"type":"string","title":"Graph Mode","description":"Graph action mode (adaptive/static/regenerate/append)","default":"adaptive"},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Graph state ID for loading persisted graph data"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Additional context for graph operations"}},"type":"object","required":["message"],"title":"LangGraphChatRequest","description":"Request for LangGraph-based chat interactions with agents."},"LangGraphChatResponseWithPayment":{"properties":{"reply":{"type":"string","title":"Reply","description":"Agent's response message"},"graph_action":{"type":"string","title":"Graph Action","description":"Graph action taken (regenerate/append/static)"},"search_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Prompt","description":"Search prompt used for graph regeneration"},"graph_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph Data","description":"Graph data when action involves graph changes"},"graph_operation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph Operation","description":"Agent-requested graph operations"},"new_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Graph Id","description":"New graph state ID when operations create new states"},"htn_status":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Htn Status","description":"HTN curriculum status for dataroom subscriptions (phase, progress, completion)"},"payment":{"$ref":"#/components/schemas/infrastructure__dto__requests__PaymentMetadata","description":"Payment verification and settlement metadata"}},"type":"object","required":["reply","graph_action","payment"],"title":"LangGraphChatResponseWithPayment","description":"Response from payment-gated LangGraph chat interactions.\n\nExtends LangGraphChatResponse with payment metadata including verification status,\nsettlement status, transaction hash, and microsub information."},"LatestEpisodeResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent identifier"},"latest_episode":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latest Episode","description":"Latest episode data"},"latest_episode_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Episode Uuid","description":"Latest episode UUID"}},"type":"object","required":["agent_id"],"title":"LatestEpisodeResponse","description":"Response containing latest episode information for an agent."},"LengthConfig":{"properties":{"max_nodes":{"type":"integer","title":"Max Nodes","description":"Maximum content nodes for this length"},"max_words":{"type":"integer","title":"Max Words","description":"Maximum words per section for this length"},"description":{"type":"string","title":"Description","description":"Human-readable description","default":""}},"type":"object","required":["max_nodes","max_words"],"title":"LengthConfig","description":"Typed length configuration for a single blog length tier."},"LlmConfigDTO":{"properties":{"internalModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internalmodel","description":"Preset name for internal flow nodes (decideAction, assignLabels, etc.)"},"responseModels":{"items":{"type":"string"},"type":"array","title":"Responsemodels","description":"Allowed model preset names for response generation"},"defaultResponseModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultresponsemodel","description":"Default response model when set_response_settings is not called"}},"additionalProperties":true,"type":"object","title":"LlmConfigDTO","description":"Per-agent LLM model configuration."},"LlmConfigResponse":{"properties":{"internalModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internalmodel","description":"Preset name for internal flow nodes"},"responseModels":{"items":{"type":"string"},"type":"array","title":"Responsemodels","description":"Allowed model preset names"},"defaultResponseModel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultresponsemodel","description":"Default response model"}},"additionalProperties":true,"type":"object","title":"LlmConfigResponse","description":"Per-agent LLM model configuration response."},"LoadGraphRequest":{"properties":{"graph_id":{"type":"string","title":"Graph Id","description":"Graph state ID (hash) to load. Must be a non-empty string."},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"Optional ObjectId of the corresponding bonfires-ai AgentConfig for authorization. When provided, verifies the requesting agent owns the graph. When omitted, skips authorization check."},"include_edges":{"type":"boolean","title":"Include Edges","description":"Whether to hydrate with full edge data. Set to False for faster loading and smaller payloads.","default":false},"include_metadata":{"type":"boolean","title":"Include Metadata","description":"Whether to include graph metadata (created_at, parent_id, agent_ref, graph_type). Set to False to reduce payload size when metadata is not needed.","default":true}},"type":"object","required":["graph_id"],"title":"LoadGraphRequest","description":"Request to load a hydrated graph state.\n\nThis endpoint loads an existing persisted graph state by its hash ID.\nUse this for retrieving previously saved graph states from the database.\n\nFor creating new graph states from search queries, use the /delve endpoint instead.\n\nExamples:\n    # Load basic graph without edges for faster performance\n    LoadGraphRequest(\n        graph_id=\"abc123...\",\n        group_id=\"550e8400-e29b-41d4-a716-446655440000\",\n        include_edges=False,\n        include_metadata=True\n    )\n\n    # Load full graph with edges and metadata\n    LoadGraphRequest(\n        graph_id=\"def456...\",\n        group_id=\"550e8400-e29b-41d4-a716-446655440000\",\n        include_edges=True,\n        include_metadata=True\n    )\n\n    # Load minimal graph for display (no metadata for reduced payload)\n    LoadGraphRequest(\n        graph_id=\"ghi789...\",\n        group_id=\"550e8400-e29b-41d4-a716-446655440000\",\n        include_edges=False,\n        include_metadata=False\n    )\n\n    # Load graph without agent authorization (public access)\n    LoadGraphRequest(\n        graph_id=\"jkl012...\",\n        include_edges=True,\n        include_metadata=True\n    )"},"MicrosubInfo":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash identifier"},"agent_id":{"type":"string","title":"Agent Id","description":"Agent ObjectId as string"},"query_limit":{"type":"integer","title":"Query Limit","description":"Maximum queries allowed"},"queries_used":{"type":"integer","title":"Queries Used","description":"Number of queries consumed"},"queries_remaining":{"type":"integer","title":"Queries Remaining","description":"Calculated remaining queries"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Expiration timestamp"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"created_by_address":{"type":"string","title":"Created By Address","description":"Wallet address that created the microsub"},"is_expired":{"type":"boolean","title":"Is Expired","description":"Computed expiration status"},"is_exhausted":{"type":"boolean","title":"Is Exhausted","description":"Computed exhaustion status"},"is_valid":{"type":"boolean","title":"Is Valid","description":"Overall validity status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Data room description"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Center node UUID for delve queries"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"System prompt for chat queries"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Associated bonfire identifier"},"dataroom_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataroom Id","description":"Reference to DataRoom ObjectId (for marketplace subscriptions)"},"htn_graph_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htn Graph Hash","description":"Hash of the HTN curriculum graph"},"htn_graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htn Graph Id","description":"MongoDB ObjectId of the HTN curriculum graph"}},"type":"object","required":["tx_hash","agent_id","query_limit","queries_used","queries_remaining","expires_at","created_at","created_by_address","is_expired","is_exhausted","is_valid"],"title":"MicrosubInfo","description":"Microsub information for frontend display."},"MicrosubListResponse":{"properties":{"microsubs":{"items":{"$ref":"#/components/schemas/MicrosubInfo"},"type":"array","title":"Microsubs","description":"List of microsub information objects"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of microsubs returned"},"active_count":{"type":"integer","title":"Active Count","description":"Count of valid (non-expired, non-exhausted) microsubs"}},"type":"object","required":["microsubs","total_count","active_count"],"title":"MicrosubListResponse","description":"Response wrapper for listing microsubs by wallet address."},"NodeEpisodesResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message or error details"},"node_uuid":{"type":"string","title":"Node Uuid","description":"UUID of the node queried"},"episodes":{"items":{"$ref":"#/components/schemas/ApiEpisode"},"type":"array","title":"Episodes","description":"List of episodes that mention this node"},"num_results":{"type":"integer","title":"Num Results","description":"Number of episodes returned","default":0}},"type":"object","required":["success","node_uuid"],"title":"NodeEpisodesResponse","description":"Response containing episodes that mention a specific node.\n\nSimilar to Zep's get-episodes-for-a-node API, this returns all episodes\nthat have a MENTIONS relationship to the specified entity node.\n\nUses the API shape (``ApiEpisode``) — produced by\n``KGCrudService.get_episodes_for_node``, which emits flat HTTP-wire\ndicts (``bonfire_id``/``node_type``, ISO datetimes) rather than the\ndump shape (``group_id``, datetime objects, ``entity_edges``)."},"OntologyBuildRequest":{"properties":{"entity_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/OntologyLabelRequest"},"type":"array"},{"type":"null"}],"title":"Entity Labels","description":"Optional labels — if omitted, uses existing Mongo Ontology doc."},"link_to_graph":{"type":"boolean","title":"Link To Graph","description":"Whether to create :OntologyLabel nodes and :BELONGS_TO edges in Neo4j.","default":true},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Threshold","description":"Cosine similarity floor for :BELONGS_TO edges. Default tuned for nomic-embed-text.","default":0.55},"top_n_cap":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Top N Cap","description":"Max edges per ontology label (per edge type). Keeps rare labels focused.","default":10},"extend_grammar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extend Grammar","description":"Optional grammar name. When set, after the graph layer is built a TrimTab grammar is (re)created with the cascade structure origin → taxonomy → ontology → community → entity. Requires a grammar controller to be wired; returns 503 otherwise."},"grammar_min_mentions":{"type":"integer","minimum":0.0,"title":"Grammar Min Mentions","description":"Entity signal floor — min :MENTIONS to be a grammar leaf.","default":3},"grammar_min_relations":{"type":"integer","minimum":0.0,"title":"Grammar Min Relations","description":"Entity signal floor — min :RELATES_TO to be a grammar leaf.","default":5}},"type":"object","title":"OntologyBuildRequest","description":"Request body for ``POST /ontology/{bonfire_id}/build``.\n\nAll fields optional. When ``entity_labels`` is omitted, the service\nuses the existing Mongo ``Ontology`` document for this bonfire\n(callers can stage labels via PUT first, then build later). When\n``link_to_graph`` is false the build stops after the Mongo upsert."},"OntologyBuildResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"labels_count":{"type":"integer","title":"Labels Count"},"ontology_nodes_upserted":{"type":"integer","title":"Ontology Nodes Upserted"},"ontology_nodes_pruned":{"type":"integer","title":"Ontology Nodes Pruned","default":0},"ontology_to_taxonomy_edges":{"type":"integer","title":"Ontology To Taxonomy Edges"},"community_to_ontology_edges":{"type":"integer","title":"Community To Ontology Edges"},"grammar_extended":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grammar Extended"},"grammar_rules_count":{"type":"integer","title":"Grammar Rules Count","default":0},"grammar_entity_leaves":{"type":"integer","title":"Grammar Entity Leaves","default":0}},"type":"object","required":["bonfire_id","labels_count","ontology_nodes_upserted","ontology_to_taxonomy_edges","community_to_ontology_edges"],"title":"OntologyBuildResponse"},"OntologyField":{"properties":{"type":{"type":"string","title":"Type","description":"Field type: str, int, float, bool, list[str]"},"description":{"type":"string","title":"Description","description":"Field description for Graphiti extraction guidance","default":""},"required":{"type":"boolean","title":"Required","description":"Whether the field is required","default":false}},"type":"object","required":["type"],"title":"OntologyField","description":"Single field in an OntologyLabel."},"OntologyGapPublishRequest":{"properties":{"kengram_id":{"type":"string","title":"Kengram Id"},"bonfire_id":{"type":"string","title":"Bonfire Id"},"gaps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Gaps"}},"type":"object","required":["kengram_id","bonfire_id","gaps"],"title":"OntologyGapPublishRequest","description":"Request to store ontology gaps for a kEngram, sent from the CLI pipeline."},"OntologyGenerateProfileRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"ontology_id":{"type":"string","title":"Ontology Id"},"threshold":{"type":"number","title":"Threshold","default":0.7}},"type":"object","required":["bonfire_id","ontology_id"],"title":"OntologyGenerateProfileRequest","description":"Request to generate an OntologyProfile from label-to-class vector matches."},"OntologyIngestRequest":{"properties":{"ontology_path":{"type":"string","title":"Ontology Path"},"ontology_id":{"type":"string","title":"Ontology Id"},"bonfire_id":{"type":"string","title":"Bonfire Id"}},"type":"object","required":["ontology_path","ontology_id","bonfire_id"],"title":"OntologyIngestRequest","description":"Request to ingest an OWL ontology into the Owl_classes Weaviate collection."},"OntologyLabelRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Type name (e.g. 'NewEntitySeed')"},"description":{"type":"string","title":"Description","description":"What this type represents","default":""},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","description":"Graphiti labels (defaults to [name])"},"fields":{"additionalProperties":{"$ref":"#/components/schemas/OntologyField"},"type":"object","title":"Fields","description":"Field definitions"}},"type":"object","required":["name"],"title":"OntologyLabelRequest","description":"A single label definition in the request body."},"OntologyLabelResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"fields":{"additionalProperties":{"$ref":"#/components/schemas/OntologyField"},"type":"object","title":"Fields"}},"type":"object","required":["name","description","labels","fields"],"title":"OntologyLabelResponse"},"OntologyMatchRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"ontology_id":{"type":"string","title":"Ontology Id"},"threshold":{"type":"number","title":"Threshold","default":0.7}},"type":"object","required":["bonfire_id","ontology_id"],"title":"OntologyMatchRequest","description":"Request to match Bonfire taxonomy labels against an ingested ontology."},"OntologyRequest":{"properties":{"entity_labels":{"items":{"$ref":"#/components/schemas/OntologyLabelRequest"},"type":"array","title":"Entity Labels","description":"Custom entity type definitions"},"edge_labels":{"items":{"$ref":"#/components/schemas/OntologyLabelRequest"},"type":"array","title":"Edge Labels","description":"Custom edge type definitions (future)"}},"type":"object","required":["entity_labels"],"title":"OntologyRequest","description":"Request body for setting a bonfire's ontology."},"OntologyResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"},"entity_labels":{"items":{"$ref":"#/components/schemas/OntologyLabelResponse"},"type":"array","title":"Entity Labels"},"edge_labels":{"items":{"$ref":"#/components/schemas/OntologyLabelResponse"},"type":"array","title":"Edge Labels"}},"type":"object","required":["bonfire_id","entity_labels","edge_labels"],"title":"OntologyResponse"},"OrgBonfireMappingResponse":{"properties":{"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Bonfire ID mapped to this org, or null for admin orgs"},"is_admin":{"type":"boolean","title":"Is Admin","description":"Whether this is an admin org","default":false},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Subdomain slug for the bonfire, or null if none registered"}},"type":"object","title":"OrgBonfireMappingResponse","description":"Response from Clerk org ID → bonfire mapping lookup."},"PaidAgentChatRequest":{"properties":{"message":{"type":"string","title":"Message","description":"Current user message"},"chat_history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Chat History","description":"Previous conversation history"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Data room configuration: center node UUID"},"graph_mode":{"type":"string","title":"Graph Mode","description":"Graph action mode (adaptive/static/regenerate/append)","default":"adaptive"},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Graph state ID for loading persisted graph data"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Additional context for graph operations"},"payment_header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Header","description":"Base64-encoded X402 payment header for new payments"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash","description":"Transaction hash for existing microsub usage"},"expected_amount":{"type":"string","title":"Expected Amount","description":"Expected payment amount in USD decimal format (e.g., '0.01', '1.00')","default":"1.00"},"query_limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Query Limit","description":"Number of queries allowed in microsub","default":25},"expiration_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Expiration Days","description":"Days until microsub expiration","default":30},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Data room configuration: description"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Data room configuration: system prompt"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Data room configuration: bonfire identifier"},"dataroom_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataroom Id","description":"DataRoom ID to subscribe to (inherits all settings from DataRoom)"}},"type":"object","required":["message"],"title":"PaidAgentChatRequest","description":"Request for payment-gated agent chat with microsub support.\n\nEither payment_header (new payment) or tx_hash (existing microsub) should be provided."},"PaidDelveRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query string for the knowledge graph"},"center_node_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node Uuid","description":"Data room configuration: center node UUID"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id","description":"Data room configuration: bonfire identifier"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Optional agent identifier (ObjectId) for graph state ownership. If provided, graph state will be saved for this agent."},"graph_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graph Id","description":"Optional existing graph state ID for loading/hydrating graph state"},"num_results":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Num Results","description":"Number of search results to return","default":10},"search_recipe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Recipe","description":"Search recipe to use (e.g., 'hybrid', 'focal', etc.)"},"min_fact_rating":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Min Fact Rating","description":"Minimum fact rating threshold for filtering results"},"mmr_lambda":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Mmr Lambda","description":"Maximum Marginal Relevance lambda for result diversity"},"window_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window Start","description":"ISO datetime string for filtering facts/episodes by start time"},"window_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window End","description":"ISO datetime string for filtering facts/episodes by end time"},"relationship_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Relationship Types","description":"List of relationship types to filter by"},"use_bfs":{"type":"boolean","title":"Use Bfs","description":"Vestigial — retained for backward compatibility. Passing ``center_node_uuid`` now unconditionally enables BFS from that center plus node_distance reranking; this flag is a no-op.","default":false},"broaden_if_sparse":{"type":"boolean","title":"Broaden If Sparse","description":"Opt-in broader re-search fallback. When true AND the centered search returns fewer than num_results/2 nodes, re-runs the search without center/BFS and merges the result sets. Default False — callers get the narrow centered result as-is.","default":false},"smart":{"type":"boolean","title":"Smart","description":"Opt-in 'combined signals' mode. When True, the service runs the bonfire's primary grammar cascade and uses it two ways: (1) adopts the leaf UUID as the center only when the caller omitted center_node_uuid; (2) enriches the query text with the walk's rule labels + leaf name so the bm25/cosine/bfs pool sees the cascade's semantic signal. When the cascade adopts the center, the recipe is forced to COMBINED_HYBRID_SEARCH_CROSS_ENCODER so the enriched text drives ranking; when the caller passed a center, the existing auto-swap to node_distance still fires — enrichment still widens the pool upstream. No-op when cascade doesn't resolve (no primary_grammar, cascade fails, etc.) — graceful degrade to the plain query. Caller-supplied search_recipe always wins.","default":false},"payment_header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Header","description":"Base64-encoded X402 payment header for new payments"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash","description":"Transaction hash for existing microsub usage"},"expected_amount":{"type":"string","title":"Expected Amount","description":"Expected payment amount in USD decimal format (e.g., '0.01', '1.00')","default":"1.00"},"query_limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Query Limit","description":"Number of queries allowed in microsub","default":25},"expiration_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Expiration Days","description":"Days until microsub expiration","default":30},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Data room configuration: description"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Data room configuration: system prompt"},"dataroom_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataroom Id","description":"DataRoom ID to subscribe to (inherits all settings from DataRoom)"}},"type":"object","required":["query"],"title":"PaidDelveRequest","description":"Request for payment-gated delve search with microsub support.\n\nEither payment_header (new payment) or tx_hash (existing microsub) should be provided."},"PersonalityResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID"},"traits":{"items":{"$ref":"#/components/schemas/PersonalityTraitResponse"},"type":"array","title":"Traits"},"sections":{"additionalProperties":{"items":{"$ref":"#/components/schemas/PersonalityTraitResponse"},"type":"array"},"type":"object","title":"Sections","description":"Traits grouped by section"},"total_traits":{"type":"integer","title":"Total Traits","default":0}},"type":"object","required":["agent_id"],"title":"PersonalityResponse","description":"Full personality for an agent."},"PersonalityTraitInput":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Trait ID (auto-generated if omitted)"},"section":{"type":"string","title":"Section","description":"Section name (e.g., 'tone', 'rules', 'knowledge')"},"content":{"type":"string","title":"Content","description":"Trait content text"}},"type":"object","required":["section","content"],"title":"PersonalityTraitInput","description":"Input for a single personality trait."},"PersonalityTraitResponse":{"properties":{"id":{"type":"string","title":"Id"},"section":{"type":"string","title":"Section"},"content":{"type":"string","title":"Content"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","section","content"],"title":"PersonalityTraitResponse","description":"A single personality trait in responses."},"PersonalityTraitsModifyResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"modified_count":{"type":"integer","title":"Modified Count","description":"Number of traits affected","default":0},"traits":{"items":{"$ref":"#/components/schemas/PersonalityTraitResponse"},"type":"array","title":"Traits"}},"type":"object","required":["agent_id"],"title":"PersonalityTraitsModifyResponse","description":"Response after modifying personality traits."},"ProvisionListResponse":{"properties":{"records":{"items":{"$ref":"#/components/schemas/ProvisionedBonfireRecord"},"type":"array","title":"Records"}},"type":"object","required":["records"],"title":"ProvisionListResponse","description":"Response for GET /provision?wallet_address=..."},"ProvisionRequest":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Ethereum transaction hash of the provision tx"},"wallet_address":{"type":"string","title":"Wallet Address","description":"Checksummed Ethereum wallet address"},"agent_name":{"type":"string","maxLength":60,"minLength":1,"title":"Agent Name","description":"Bonfire/agent display name"},"description":{"type":"string","title":"Description","description":"Bonfire description","default":""},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","description":"Agent capability tags"},"image":{"type":"string","title":"Image","description":"Image URL for the bonfire (IPFS, HTTPS, or data URI)","default":""},"slug":{"anyOf":[{"type":"string","maxLength":63},{"type":"null"}],"title":"Slug","description":"Optional subdomain slug override (auto-generated if omitted)"}},"type":"object","required":["tx_hash","wallet_address","agent_name"],"title":"ProvisionRequest","description":"Request body for POST /provision."},"ProvisionResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"MongoDB ObjectId of the created Bonfire"},"agent_id":{"type":"string","title":"Agent Id","description":"MongoDB ObjectId of the created Agent"},"api_key_id":{"type":"string","title":"Api Key Id","description":"MongoDB ObjectId of the created ApiKey"},"erc8004_bonfire_id":{"type":"integer","title":"Erc8004 Bonfire Id","description":"On-chain ERC-8004 Bonfire identity ID"},"ipfs_uri":{"type":"string","title":"Ipfs Uri","description":"IPFS URI of the ERC-8004 metadata"},"api_key_last4":{"type":"string","title":"Api Key Last4","description":"Last 4 chars of the API key (dashboard preview)"},"agent_name":{"type":"string","title":"Agent Name","description":"Display name of the provisioned bonfire/agent"},"clerk_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clerk Org Id","description":"Clerk organization ID created for this bonfire"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Subdomain slug for the bonfire"}},"type":"object","required":["bonfire_id","agent_id","api_key_id","erc8004_bonfire_id","ipfs_uri","api_key_last4","agent_name"],"title":"ProvisionResponse","description":"Response from a successful POST /provision call."},"ProvisionedBonfireRecord":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash"},"wallet_address":{"type":"string","title":"Wallet Address"},"status":{"type":"string","title":"Status"},"erc8004_bonfire_id":{"type":"integer","title":"Erc8004 Bonfire Id"},"bonfire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonfire Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"},"api_key_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Last4"},"ipfs_uri":{"type":"string","title":"Ipfs Uri"},"agent_name":{"type":"string","title":"Agent Name"},"description":{"type":"string","title":"Description"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"image":{"type":"string","title":"Image"},"clerk_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clerk Org Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["tx_hash","wallet_address","status","erc8004_bonfire_id","bonfire_id","agent_id","api_key_id","api_key_last4","ipfs_uri","agent_name","description","capabilities","image","clerk_org_id","slug","created_at","updated_at"],"title":"ProvisionedBonfireRecord","description":"Public record returned by GET /provision (no raw API key)."},"PurchaseAgentRequest":{"properties":{"payment_header":{"type":"string","title":"Payment Header","description":"x402 ERC-3009 payment header"},"platform":{"type":"string","title":"Platform","description":"Deployment platform: 'web', 'telegram', or 'discord'"},"episodes_requested":{"type":"integer","minimum":1.0,"title":"Episodes Requested","description":"Number of episodes to purchase"},"agent_name":{"type":"string","title":"Agent Name","description":"Agent display name"},"agent_context":{"type":"string","title":"Agent Context","description":"Agent system prompt / context"},"telegram_bot_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Bot Token","description":"Required when platform=telegram"},"discord_bot_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Bot Token","description":"Required when platform=discord"}},"type":"object","required":["payment_header","platform","episodes_requested","agent_name","agent_context"],"title":"PurchaseAgentRequest","description":"Request to purchase an agent on a public bonfire via x402."},"PurchaseAgentResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Created agent ObjectId"},"username":{"type":"string","title":"Username","description":"Agent username"},"platform":{"type":"string","title":"Platform","description":"Deployment platform"},"episodes_purchased":{"type":"integer","title":"Episodes Purchased","description":"Number of episodes purchased"},"api_key_last4":{"type":"string","title":"Api Key Last4","description":"Last 4 chars of the API key"},"purchase_id":{"type":"string","title":"Purchase Id","description":"PurchasedAgent record ID"}},"type":"object","required":["agent_id","username","platform","episodes_purchased","api_key_last4","purchase_id"],"title":"PurchaseAgentResponse","description":"Response after a successful agent purchase."},"PurchaseHyperBlogRequest":{"properties":{"payment_header":{"type":"string","title":"Payment Header","description":"Base64-encoded X402 payment header for payment verification"},"dataroom_id":{"type":"string","title":"Dataroom Id","description":"DataRoom ObjectId to generate hyperblog from"},"user_query":{"type":"string","maxLength":500,"minLength":3,"title":"User Query","description":"User query that prompts blog generation"},"is_public":{"type":"boolean","title":"Is Public","description":"Whether the generated blog should be publicly visible","default":true},"blog_length":{"type":"string","enum":["short","medium","long"],"title":"Blog Length","description":"Desired length of blog: 'short', 'medium', or 'long'","default":"medium"},"generation_mode":{"type":"string","enum":["blog","card"],"title":"Generation Mode","description":"HTN generation mode: 'blog' for multi-section articles, 'card' for single-node content","default":"blog"},"template_inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Inputs","description":"Template-specific inputs (e.g. {'source_urls': ['https://...']}) validated against template.required_inputs"},"expected_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Amount","description":"Expected payment amount in USD decimal format (e.g., '0.01', '5.00'). Optional, defaults to dataroom price."}},"type":"object","required":["payment_header","dataroom_id","user_query"],"title":"PurchaseHyperBlogRequest","description":"Request to purchase and generate a HyperBlog from a dataroom."},"PurchaseHyperBlogResponse":{"properties":{"hyperblog":{"$ref":"#/components/schemas/HyperBlogInfo","description":"Generated HyperBlog information"},"payment":{"additionalProperties":true,"type":"object","title":"Payment","description":"Payment verification and settlement details (verified, settled, tx_hash, from_address, facilitator, amount)"}},"type":"object","required":["hyperblog","payment"],"title":"PurchaseHyperBlogResponse","description":"Response containing hyperblog and payment information."},"RankedItem":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"RankedItem","description":"Generic {name, count} ranked row used by per-bonfire stats."},"RegisterAgentRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID or username"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire ID or name"}},"type":"object","required":["agent_id","bonfire_id"],"title":"RegisterAgentRequest","description":"Request to register an agent to a bonfire."},"ReplacePersonalityRequest":{"properties":{"traits":{"items":{"$ref":"#/components/schemas/PersonalityTraitInput"},"type":"array","title":"Traits","description":"Complete new set of traits"}},"type":"object","required":["traits"],"title":"ReplacePersonalityRequest","description":"Request to replace entire personality."},"ReportingConfigDTO":{"properties":{"chatId":{"type":"string","title":"Chatid","description":"Chat ID for reporting messages"},"topicId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topicid","description":"Topic ID within the reporting chat"},"shouldNotIgnore":{"type":"boolean","title":"Shouldnotignore","description":"If true, messages from the reporting group are processed instead of ignored","default":false}},"additionalProperties":true,"type":"object","required":["chatId"],"title":"ReportingConfigDTO","description":"Reporting configuration for agent deployment."},"ReportingConfigResponse":{"properties":{"chatId":{"type":"string","title":"Chatid","description":"Telegram chat ID or Discord guild/DM channel ID"},"topicId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topicid","description":"Telegram topic ID or Discord channel ID"},"shouldNotIgnore":{"type":"boolean","title":"Shouldnotignore","description":"If true, reporting messages are processed","default":false}},"type":"object","required":["chatId"],"title":"ReportingConfigResponse","description":"Reporting configuration response."},"ResolveOrgResponse":{"properties":{"org_id":{"type":"string","title":"Org Id","description":"Clerk organization ID to switch to"},"is_admin":{"type":"boolean","title":"Is Admin","description":"Whether this is an admin org (not bonfire-specific)"}},"type":"object","required":["org_id","is_admin"],"title":"ResolveOrgResponse","description":"Response from org resolution for a bonfire."},"ResolveTaxonomyUuidsRequest":{"properties":{"taxonomy_ids":{"items":{"type":"string"},"type":"array","title":"Taxonomy Ids","description":"List of MongoDB taxonomy _id strings"}},"type":"object","required":["taxonomy_ids"],"title":"ResolveTaxonomyUuidsRequest","description":"Request to resolve Graphiti UUIDs for taxonomy MongoDB IDs."},"RevealApiKeyRequest":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash of the provisioned bonfire"},"nonce":{"type":"string","title":"Nonce","description":"Nonce previously issued by GET /provision/reveal_nonce"},"signature":{"type":"string","title":"Signature","description":"EIP-191 wallet signature over the canonical message"}},"type":"object","required":["tx_hash","nonce","signature"],"title":"RevealApiKeyRequest","description":"Request body for POST /provision/reveal_api_key."},"RevealApiKeyResponse":{"properties":{"api_key":{"type":"string","title":"Api Key","description":"Raw API key"}},"type":"object","required":["api_key"],"title":"RevealApiKeyResponse","description":"Response for POST /provision/reveal_api_key"},"RevealNonceResponse":{"properties":{"nonce":{"type":"string","title":"Nonce","description":"Short-lived nonce for the API key reveal challenge"},"message":{"type":"string","title":"Message","description":"Canonical EIP-191 message to sign"}},"type":"object","required":["nonce","message"],"title":"RevealNonceResponse","description":"Response for GET /provision/reveal_nonce"},"SearchLabelsRequest":{"properties":{"chunk_text":{"type":"string","title":"Chunk Text"},"certainty_threshold":{"type":"number","title":"Certainty Threshold","default":0.6}},"type":"object","required":["chunk_text"],"title":"SearchLabelsRequest","description":"Request to search for best-matching labels given chunk text."},"ShortlistApplicantRequest":{"properties":{"shortlisted":{"type":"boolean","title":"Shortlisted"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["shortlisted"],"title":"ShortlistApplicantRequest","description":"Request to toggle shortlist state for an application."},"SimpleAgentInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Agent identifier"},"username":{"type":"string","title":"Username","description":"Agent username"},"name":{"type":"string","title":"Name","description":"Agent name"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether agent is active"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"episode_uuids":{"items":{"type":"string"},"type":"array","title":"Episode Uuids","description":"Episode UUIDs associated with this agent in chronological order"}},"type":"object","required":["id","username","name","is_active","bonfire_id"],"title":"SimpleAgentInfo","description":"Minimal agent info used for bonfire agents listing."},"SingleHyperBlogResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Hyperblog ObjectId as string"},"dataroom_id":{"type":"string","title":"Dataroom Id","description":"DataRoom ObjectId as string"},"user_query":{"type":"string","title":"User Query","description":"Original user query that prompted blog generation"},"blog_length":{"type":"string","enum":["short","medium","long"],"title":"Blog Length","description":"Blog length: short (2 min read), medium (5 min read), or long (10 min read)"},"blog_content":{"additionalProperties":true,"type":"object","title":"Blog Content","description":"Complete blog content with all sections including full markdown"},"author_wallet":{"type":"string","title":"Author Wallet","description":"Wallet address of the blog author"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name","description":"Author name (enriched from agent mapping, may be None)"},"author_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Username","description":"Author username (enriched from agent mapping, may be None)"},"preview":{"type":"string","title":"Preview","description":"Preview text (first 200 characters)","default":""},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"AI-generated 50-word summary of blog content (preferred over preview for feed display)"},"image_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Prompt","description":"AI-generated prompt for banner image generation (used for card mode)"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count","description":"Total word count of blog content"},"generation_status":{"type":"string","title":"Generation Status","description":"Status: 'generating', 'completed', or 'failed'"},"is_public":{"type":"boolean","title":"Is Public","description":"Whether blog is publicly visible"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash","description":"Payment transaction hash"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Blog creation timestamp"},"htn_graph_hash":{"type":"string","title":"Htn Graph Hash","description":"Hash reference to HTN Graph used for structure"},"banner_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banner Url","description":"URL or base64 data of the generated banner image (None if not yet generated)"},"upvotes":{"type":"integer","title":"Upvotes","description":"Total upvote count","default":0},"downvotes":{"type":"integer","title":"Downvotes","description":"Total downvote count","default":0},"comment_count":{"type":"integer","title":"Comment Count","description":"Total comment count","default":0},"view_count":{"type":"integer","title":"View Count","description":"Total view count","default":0},"taxonomy_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Taxonomy Keywords","description":"Taxonomy keywords from bonfire that match the blog content"},"dataroom_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataroom Description","description":"Description of the DataRoom this hyperblog belongs to (enriched from DataRoom.description)"}},"type":"object","required":["id","dataroom_id","user_query","blog_length","blog_content","author_wallet","generation_status","is_public","created_at","htn_graph_hash"],"title":"SingleHyperBlogResponse","description":"Response model for fetching a single hyperblog with complete content."},"SkillInfo":{"properties":{"skillId":{"type":"string","title":"Skillid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["skillId","name"],"title":"SkillInfo","description":"Information about an available agent skill."},"SkillsListResponse":{"properties":{"skills":{"items":{"$ref":"#/components/schemas/SkillInfo"},"type":"array","title":"Skills"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"SkillsListResponse","description":"Response listing available agent skills."},"StackAddRequest":{"properties":{"message":{"anyOf":[{"$ref":"#/components/schemas/StackMessage"},{"type":"null"}],"description":"Single message payload to add to stack"},"messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/StackMessage"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Batch of messages to add to stack (1-2 messages for user+agent pairs)"},"is_paired":{"type":"boolean","title":"Is Paired","description":"Whether messages should be linked as a pair","default":false}},"type":"object","title":"StackAddRequest","description":"Request to add a message or batch of messages to an agent's episodic stack.\n\nSupports both single message submission and batch submission\nfor user+agent message pairs. When is_paired=True, messages are linked with a pair_id\nto indicate they represent a single conversational interaction.\n\nOnly conversational roles (user, assistant, agent) are accepted.\nTool results and system messages must be filtered before submission.\n\nExamples:\n    Single message: {\"message\": {..., \"role\": \"user\"}}\n    Paired messages: {\"messages\": [{..., \"role\": \"user\"}, {..., \"role\": \"assistant\"}], \"is_paired\": true}"},"StackAddResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"message_ids":{"items":{"type":"string"},"type":"array","title":"Message Ids","description":"List of message IDs added"},"message_count":{"type":"integer","title":"Message Count","description":"Number of messages added"},"is_paired":{"type":"boolean","title":"Is Paired","description":"Whether messages were paired","default":false},"stack_count":{"type":"integer","title":"Stack Count","description":"Total messages in stack after operation"}},"type":"object","required":["success","message_count","stack_count"],"title":"StackAddResponse","description":"Response from stack add operations."},"StackMessage":{"properties":{"text":{"type":"string","minLength":1,"title":"Text","description":"Message text (non-empty string)"},"userId":{"type":"string","minLength":1,"title":"Userid","description":"Identifier of the sender"},"chatId":{"type":"string","minLength":1,"title":"Chatid","description":"Chat or session identifier"},"timestamp":{"type":"string","title":"Timestamp","description":"ISO 8601 UTC timestamp"},"role":{"type":"string","title":"Role","description":"Sender role. Allowed: agent, assistant, user","default":"user"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username","description":"Display name of the sender"},"labelIds":{"items":{"type":"string"},"type":"array","title":"Labelids","description":"Taxonomy label IDs"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Platform message ID (e.g. Telegram) for dedup lookup"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional structured message metadata"}},"type":"object","required":["text","userId","chatId","timestamp"],"title":"StackMessage","description":"Typed message for stack ingestion.\n\nOnly conversational messages (user / assistant / agent) are accepted.\nTool outputs, system prompts, and other internal artefacts must be\nfiltered by the caller before submission."},"StackProcessResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether processing was initiated"},"message_count":{"type":"integer","title":"Message Count","description":"Number of messages to process"},"initiated_at":{"type":"string","title":"Initiated At","description":"ISO timestamp when processing was initiated"},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Id","description":"Episode ID if created"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Background task ID for queued processing"},"processing_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Mode","description":"How stack processing is being handled"},"already_processing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Already Processing","description":"Whether an existing processing task already owns the stack"},"warning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Warning","description":"Whether processing occurred early"},"warning_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning Message","description":"Warning message if processing was early"},"time_remaining_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Remaining Seconds","description":"Seconds remaining until recommended interval"}},"type":"object","required":["success","message_count","initiated_at"],"title":"StackProcessResponse","description":"Response from stack processing operations."},"StackSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query for semantic search"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Maximum number of results to return","default":10}},"type":"object","required":["query"],"title":"StackSearchRequest","description":"Request to perform semantic search within an agent's stack."},"StackSearchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether search was successful"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results","description":"Search results"},"count":{"type":"integer","title":"Count","description":"Number of results"},"query":{"type":"string","title":"Query","description":"Search query used"}},"type":"object","required":["success","count","query"],"title":"StackSearchResponse","description":"Response from stack search operations."},"StackStatusResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent identifier"},"message_count":{"type":"integer","title":"Message Count","description":"Number of messages in stack","default":0},"user_count":{"type":"integer","title":"User Count","description":"Number of unique users","default":0},"label_count":{"type":"integer","title":"Label Count","description":"Number of labels","default":0},"last_message_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message At","description":"Timestamp of last message"},"next_process_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Process At","description":"Timestamp when stack is ready for processing"},"time_until_next_process":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Until Next Process","description":"Seconds until next processing"}},"type":"object","required":["agent_id"],"title":"StackStatusResponse","description":"Response containing stack status information."},"SubdomainResolutionResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"MongoDB bonfire ObjectId string"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"First agent ID for the bonfire, or null if none"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Resolved slug when looked up by slug"},"is_public":{"type":"boolean","title":"Is Public","description":"Whether the bonfire allows anonymous access"}},"type":"object","required":["bonfire_id","is_public"],"title":"SubdomainResolutionResponse","description":"Response from subdomain resolution (slug or ObjectId)."},"TaxonomyGroup":{"properties":{"taxonomy_name":{"type":"string","title":"Taxonomy Name","description":"Name of the taxonomy category"},"taxonomy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Id","description":"Taxonomy identifier"},"chunks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Chunks","description":"List of chunks in this taxonomy"},"chunk_count":{"type":"integer","title":"Chunk Count","description":"Number of chunks in this taxonomy","default":0}},"type":"object","required":["taxonomy_name"],"title":"TaxonomyGroup","description":"Taxonomy group containing chunks and metadata."},"TaxonomyResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Operation status"},"job_id":{"type":"string","title":"Job Id","description":"Job identifier for tracking"}},"type":"object","required":["status","job_id"],"title":"TaxonomyResponse","description":"Response from taxonomy operations."},"TaxonomyStat":{"properties":{"taxonomy_name":{"type":"string","title":"Taxonomy Name","description":"Name of the taxonomy category"},"taxonomy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxonomy Id","description":"Taxonomy identifier (ObjectId)"},"chunk_count":{"type":"integer","title":"Chunk Count","description":"Number of chunks labeled with this taxonomy"}},"type":"object","required":["taxonomy_name","chunk_count"],"title":"TaxonomyStat","description":"Statistics for a single taxonomy category."},"TaxonomyStatsResponse":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire identifier"},"total_chunks":{"type":"integer","title":"Total Chunks","description":"Total number of chunks"},"labeled_chunks":{"type":"integer","title":"Labeled Chunks","description":"Number of labeled chunks"},"unlabeled_chunks":{"type":"integer","title":"Unlabeled Chunks","description":"Number of unlabeled chunks"},"taxonomy_stats":{"items":{"$ref":"#/components/schemas/TaxonomyStat"},"type":"array","title":"Taxonomy Stats","description":"Per-taxonomy chunk counts"},"taxonomy_count":{"type":"integer","title":"Taxonomy Count","description":"Number of taxonomies"}},"type":"object","required":["bonfire_id","total_chunks","labeled_chunks","unlabeled_chunks","taxonomy_count"],"title":"TaxonomyStatsResponse","description":"Response containing per-taxonomy chunk statistics for the dashboard."},"TaxonomyTriggerRequest":{"properties":{"bonfire_id":{"type":"string","title":"Bonfire Id"}},"type":"object","required":["bonfire_id"],"title":"TaxonomyTriggerRequest","description":"Request to manually trigger taxonomy generation for a bonfire."},"ToolInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"}},"type":"object","required":["id","name"],"title":"ToolInfo","description":"Information about an MCP tool."},"ToolsListResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ToolInfo"},"type":"array","title":"Tools"},"count":{"type":"integer","title":"Count","default":0}},"type":"object","title":"ToolsListResponse","description":"Response listing available MCP tools."},"TopicConfigDTO":{"properties":{"topicId":{"type":"string","title":"Topicid","description":"Telegram topic ID (use '1' for the General topic)"},"status":{"type":"string","enum":["enabled","disabled"],"title":"Status","description":"Topic processing status","default":"enabled"},"silentMode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Silentmode","description":"If true, topic is in silent mode"},"disableStoring":{"type":"boolean","title":"Disablestoring","description":"Disable message storing for this topic","default":false}},"additionalProperties":true,"type":"object","required":["topicId"],"title":"TopicConfigDTO","description":"Topic-specific configuration within a group."},"TrimtabCascadedResult":{"properties":{"mode":{"type":"string","const":"cascaded","title":"Mode"},"grammar":{"type":"string","title":"Grammar"},"text":{"type":"string","title":"Text"},"ids":{"items":{"type":"string"},"type":"array","title":"Ids"},"coordinates":{"items":{"$ref":"#/components/schemas/TrimtabCoordinate"},"type":"array","title":"Coordinates"},"walk_ids":{"items":{"type":"string"},"type":"array","title":"Walk Ids"},"rules_used":{"items":{"type":"string"},"type":"array","title":"Rules Used"}},"type":"object","required":["mode","grammar","text","ids","coordinates","walk_ids"],"title":"TrimtabCascadedResult","description":"Cascaded-mode search result.\n\nProduced when `search_grammar(rule=None)` walks the whole grammar\ntree from the origin rule. ``ids`` is the filtered list of\nconsumer-supplied expansion ids (auto-generated internal ids are\nstripped); ``walk_ids`` is the full raw walk for debugging.\n``rules_used`` is populated in v0.5+; absent in legacy v0.4 results."},"TrimtabCoordinate":{"properties":{"taxonomy":{"type":"string","title":"Taxonomy"},"ontology":{"type":"string","title":"Ontology"},"community":{"type":"string","title":"Community"},"community_name":{"type":"string","title":"Community Name"},"entity_uuid":{"type":"string","title":"Entity Uuid"},"entity_name":{"type":"string","title":"Entity Name"}},"type":"object","required":["taxonomy","ontology","community","community_name","entity_uuid","entity_name"],"title":"TrimtabCoordinate","description":"A parsed path-tagged expansion id.\n\nProduced by `_parse_path_id` in trimtab_grammar_controller.py when a\nwalk visits an entity whose id encodes taxonomy/ontology/community/\nentity structure. The ``community_name`` and ``entity_name`` fields\nare only populated by the pipe-delimited (named) format; legacy\nslash-delimited ids set them to empty strings."},"TrimtabPresearch":{"properties":{"grammar":{"type":"string","title":"Grammar"},"rule":{"type":"string","title":"Rule"},"matches":{"items":{"$ref":"#/components/schemas/TrimtabPresearchMatch"},"type":"array","title":"Matches"},"center_node":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center Node"}},"type":"object","required":["grammar","rule","matches","center_node"],"title":"TrimtabPresearch","description":"Top-k scoped matches within a single grammar rule."},"TrimtabPresearchMatch":{"properties":{"text":{"type":"string","title":"Text"},"score":{"type":"number","title":"Score"},"id":{"type":"string","title":"Id"},"coordinate":{"anyOf":[{"$ref":"#/components/schemas/TrimtabCoordinate"},{"type":"null"}]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["text","score","id","coordinate"],"title":"TrimtabPresearchMatch","description":"One candidate row inside a scoped presearch result.\n\n``metadata`` is present in v0.5+ results with first-class metadata support."},"TrimtabScopedResult":{"properties":{"mode":{"type":"string","const":"scoped","title":"Mode"},"presearch":{"$ref":"#/components/schemas/TrimtabPresearch"},"kg_context":{"additionalProperties":true,"type":"object","title":"Kg Context"}},"type":"object","required":["mode","presearch"],"title":"TrimtabScopedResult","description":"Scoped-mode search result.\n\nProduced when `search_grammar(rule=\"<name>\")` returns flat top-k\nmatches in a single rule. ``kg_context`` is only present when\n``expand=True`` AND the top match's id is a non-auto-generated UUID;\nconsumers should treat it as optional."},"TripleInput":{"properties":{"subject":{"type":"string","title":"Subject","description":"Subject entity name"},"predicate":{"type":"string","title":"Predicate","description":"Relationship type/name"},"object":{"type":"string","title":"Object","description":"Object entity name"},"valid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid At","description":"Optional ISO datetime when the fact is valid"}},"type":"object","required":["subject","predicate","object"],"title":"TripleInput","description":"Single triple input structure.\n\n**DEPRECATED**: Triples are no longer needed with Graphiti's automatic entity extraction.\n\nMinimal structure used for batch addition. Values are treated as literal\nentity names and relationship names; Graphiti handles deduplication and\nembeddings.\n\n**Note**: This model is deprecated. Use structured episode content with custom\nentity types instead."},"TriplesResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"triples_added":{"type":"integer","title":"Triples Added","description":"Number of triples added"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message"}},"type":"object","required":["success","triples_added"],"title":"TriplesResponse","description":"Response from batch triple addition operations."},"TripletResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"triplet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triplet Id","description":"Triplet identifier if created"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Status message"}},"type":"object","required":["success"],"title":"TripletResponse","description":"Response from triplet addition operations."},"UnifiedVectorSearchRequest":{"properties":{"bonfire_ref":{"type":"string","title":"Bonfire Ref"},"search_string":{"type":"string","title":"Search String"},"taxonomy_refs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Taxonomy Refs"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"DEPRECATED - This field is ignored. Use stack search endpoints for agent-scoped queries."},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Optional maximum number of results to return (defaults to 10 if not provided)"}},"type":"object","required":["bonfire_ref","search_string"],"title":"UnifiedVectorSearchRequest","description":"Request for unified vector search across chunks.\n\n- bonfire_id: bonfire identifier (human name or ObjectId as string)\n- search_string: text query\n- taxonomy_refs: optional taxonomy ids filter\n- agent_id: DEPRECATED - no longer used for filtering (use stack search for agent-scoped queries)\n- limit: optional maximum number of results to return (defaults to 10)"},"UnregisterAgentRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID or username"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire ID or name"}},"type":"object","required":["agent_id","bonfire_id"],"title":"UnregisterAgentRequest","description":"Request to unregister an agent from a bonfire."},"UpdateAgentFeaturesRequest":{"properties":{"agentFeatures":{"$ref":"#/components/schemas/AgentFeaturesDTO","description":"Agent feature toggles to set"}},"type":"object","required":["agentFeatures"],"title":"UpdateAgentFeaturesRequest","description":"Request to update agent feature flags."},"UpdateAgentRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Agent display name"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Agent context/description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Whether agent is active"},"apiKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apikey","description":"API key for agent authentication"},"chatConfig":{"anyOf":[{"$ref":"#/components/schemas/ChatConfig"},{"type":"null"}],"description":"Chat filtering configuration"},"agentFeatures":{"anyOf":[{"$ref":"#/components/schemas/AgentFeaturesDTO"},{"type":"null"}],"description":"Agent feature toggles (image/audio/doc input, scheduling, etc.)"},"deploymentConfiguration":{"anyOf":[{"$ref":"#/components/schemas/DeploymentConfigurationDTO"},{"type":"null"}],"description":"Deployment configuration"},"enabledMcpTools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enabledmcptools","description":"Enabled MCP tool IDs"},"enabledSkills":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enabledskills","description":"Skill IDs loaded into the LLM prompt"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"Agent timezone"},"agentEnvVars":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Agentenvvars","description":"Agent environment variables"}},"type":"object","title":"UpdateAgentRequest","description":"Request to update agent properties (full config scope)."},"UpdateBonfireClusterRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New cluster name"},"indexing_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indexing Agent Id","description":"New indexing agent ID"}},"type":"object","title":"UpdateBonfireClusterRequest","description":"Request to update a bonfire cluster."},"UpdateBonfirePricingRequest":{"properties":{"price_per_episode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Per Episode","description":"USD price per episode as decimal string (e.g. '0.01'). None disables purchasing."},"max_episodes_per_agent":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Max Episodes Per Agent","description":"Maximum episodes a buyer can purchase per agent","default":50},"max_agents":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Max Agents","description":"Hard limit on agents registered to this bonfire","default":10}},"type":"object","title":"UpdateBonfirePricingRequest","description":"Request to update bonfire agent marketplace pricing."},"UpdateChatConfigRequest":{"properties":{"chatConfig":{"$ref":"#/components/schemas/ChatConfig","description":"Full chat configuration to set"}},"type":"object","required":["chatConfig"],"title":"UpdateChatConfigRequest","description":"Request to update chat configuration for an agent."},"UpdateEnabledSkillsRequest":{"properties":{"enabledSkills":{"items":{"type":"string"},"type":"array","title":"Enabledskills","description":"Skill IDs to enable"}},"type":"object","required":["enabledSkills"],"title":"UpdateEnabledSkillsRequest","description":"Request to update enabled skills for an agent."},"UpdateEntityRequest":{"properties":{"group_id":{"type":"string","title":"Group Id","description":"Bonfire identifier for graph partition scoping"},"name":{"type":"string","title":"Name","description":"Updated entity name"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Updated entity summary; omit to keep current value"},"labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Labels","description":"Updated entity labels; omit to keep current labels"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes","description":"Structured entity attributes; omit to keep current value"}},"type":"object","required":["group_id","name"],"title":"UpdateEntityRequest","description":"Request to update an existing Entity node.\n\n``summary`` and ``labels`` are optional.  When omitted (``None``) the\nexisting value is preserved, enabling partial updates without accidentally\nclearing data."},"UpdateLlmConfigRequest":{"properties":{"llmConfig":{"$ref":"#/components/schemas/LlmConfigDTO","description":"LLM model configuration to set"}},"type":"object","required":["llmConfig"],"title":"UpdateLlmConfigRequest","description":"Request to update per-agent LLM model configuration."},"UpdatePersonalityTraitsRequest":{"properties":{"traits":{"items":{"$ref":"#/components/schemas/PersonalityTraitInput"},"type":"array","title":"Traits","description":"Traits to update (must include id)"}},"type":"object","required":["traits"],"title":"UpdatePersonalityTraitsRequest","description":"Request to update existing personality traits by ID."},"UpsertEnvVarsRequest":{"properties":{"vars":{"additionalProperties":{"type":"string"},"type":"object","title":"Vars","description":"Key-value pairs to upsert"}},"type":"object","required":["vars"],"title":"UpsertEnvVarsRequest","description":"Request to create or update environment variables for an agent."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VectorLabelSearchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether search was successful"},"labels":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Labels","description":"Matching labels"},"count":{"type":"integer","title":"Count","description":"Number of matching labels"}},"type":"object","required":["success","count"],"title":"VectorLabelSearchResponse","description":"Response from vector label search operations."},"VectorSearchResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether search was successful"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results","description":"Search results"},"count":{"type":"integer","title":"Count","description":"Number of results"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"Search query used"}},"type":"object","required":["success","count"],"title":"VectorSearchResponse","description":"Response from vector search operations."},"VectorStoreOperationResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether operation was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"chunks_processed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunks Processed","description":"Number of chunks processed"}},"type":"object","required":["success","message"],"title":"VectorStoreOperationResponse","description":"Generic response from vector store operations."},"VectorStoreSetupResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether setup was successful"},"message":{"type":"string","title":"Message","description":"Status message"},"collections_created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Collections Created","description":"Number of collections created"}},"type":"object","required":["success","message"],"title":"VectorStoreSetupResponse","description":"Response from vector store setup operations."},"VoiceSessionRequest":{"properties":{"payment_header":{"type":"string","title":"Payment Header","description":"Base64-encoded X402 payment header"},"agent_id":{"type":"string","title":"Agent Id","description":"Agent identifier for the voice session"},"expected_amount":{"type":"string","title":"Expected Amount","description":"Expected payment amount in USD","default":"1.00"}},"type":"object","required":["payment_header","agent_id"],"title":"VoiceSessionRequest","description":"Request for a paid voice session token."},"VoiceSessionResponse":{"properties":{"session_token":{"type":"string","title":"Session Token","description":"Signed JWT for voice agent"},"expires_in":{"type":"integer","title":"Expires In","description":"Token validity in seconds"},"tx_hash":{"type":"string","title":"Tx Hash","description":"Settlement transaction hash"},"payment":{"$ref":"#/components/schemas/infrastructure__dto__responses__PaymentMetadata","description":"Payment verification metadata"}},"type":"object","required":["session_token","expires_in","tx_hash","payment"],"title":"VoiceSessionResponse","description":"Response containing a signed session JWT for voice agent access."},"WalletOrgLinkRequest":{"properties":{"wallet_address":{"type":"string","title":"Wallet Address","description":"Checksummed Ethereum wallet address to link"}},"type":"object","required":["wallet_address"],"title":"WalletOrgLinkRequest","description":"Request body for POST /auth/wallet-org-link."},"WalletOrgLinkResponse":{"properties":{"orgs_joined":{"items":{"$ref":"#/components/schemas/WalletOrgLinkResult"},"type":"array","title":"Orgs Joined","description":"Clerk orgs the user was added to"}},"type":"object","title":"WalletOrgLinkResponse","description":"Response from POST /auth/wallet-org-link."},"WalletOrgLinkResult":{"properties":{"clerk_org_id":{"type":"string","title":"Clerk Org Id","description":"Clerk organization ID"},"bonfire_id":{"type":"string","title":"Bonfire Id","description":"Bonfire ID linked to this org"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Subdomain slug for the bonfire"}},"type":"object","required":["clerk_org_id","bonfire_id"],"title":"WalletOrgLinkResult","description":"A single org that the user was added to."},"WorkflowType":{"type":"string","enum":["taxonomy","labeling","summaries","daily_workflow","hybrid_labeling","knowledge_graph_ingest","stack_processing","background_task"],"title":"WorkflowType","description":"Workflow types that can be tracked."},"infrastructure__dto__requests__PaymentMetadata":{"properties":{"verified":{"type":"boolean","title":"Verified","description":"Whether payment was verified successfully"},"settled":{"type":"boolean","title":"Settled","description":"Whether payment was settled on-chain"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","description":"Payment sender address"},"facilitator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facilitator","description":"Payment facilitator service"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash","description":"Settlement transaction hash"},"settlement_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Error","description":"Error during settlement (if any)"},"microsub_active":{"type":"boolean","title":"Microsub Active","description":"Whether a microsub is active","default":false},"queries_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queries Remaining","description":"Queries remaining in microsub"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Microsub expiration timestamp"}},"type":"object","required":["verified","settled"],"title":"PaymentMetadata","description":"Metadata about payment verification and settlement."},"infrastructure__dto__responses__PaymentMetadata":{"properties":{"verified":{"type":"boolean","title":"Verified","description":"Payment verified"},"settled":{"type":"boolean","title":"Settled","description":"Payment settled"},"microsub_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Microsub Active","description":"Microsub active"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","description":"Payer address"},"facilitator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facilitator","description":"Payment facilitator"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash","description":"Transaction hash"},"queries_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queries Remaining","description":"Queries remaining"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"Expiration timestamp"},"htn_generation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htn Generation Status","description":"HTN generation status"}},"type":"object","required":["verified","settled"],"title":"PaymentMetadata","description":"Payment metadata for paid endpoints."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Use the API key as a Bearer token in the Authorization header."}}},"security":[{"BearerAuth":[]}]}