AutoGraph

Top
CorpusGraphServiceV1

CorpusGraphServiceV1 provides endpoints for importing files and building corpus graphs.

HTTP Bindings

Endpoint Method RPC Method Body
/v1/health GET HealthCheck
/v1/import-multiple POST ImportMultipleFiles *
/v1/corpus/builds POST CreateCorpusBuild *
/v1/corpus/builds/{corpus_build_id} GET GetBuildStatus
/v1/embed-field-in-collection POST EmbedFieldInCollection *
/v1/rag-strategizer/analyze POST TriggerRAGStrategizer *
/v1/orchestrate POST TriggerAutographOrchestration *
/v1/rag-strategizer/strategy GET GetRagStrategizerStrategy
/v1/rag-strategizer/jobs/{strategize_job_id} GET GetRagStrategizerJobStatus
/v1/rag-strategizer/strategy/{cluster_id} PATCH UpdateRagStrategizerStrategy *
/v1/graph/insert POST InsertDocuments *
/v1/graph/update POST UpdateDocuments *
/v1/graph/delete POST DeleteDocuments *
/v1/graph/recluster POST TriggerRecluster *
/v1/projects/{project}/model-config/credentials PUT UpdateModelConfig *
/v1/orchestrate/{orchestration_id} GET GetOrchestrationStatus
/v1/orchestrate/{orchestration_id} DELETE CancelOrchestration
/v1/projects/{project}/overview GET GetProjectOverview
/v1/projects/{project}/categories/{category} DELETE DeleteCategory
/v1/projects/{project} DELETE DeleteProject

Methods

Method Name Request Type Response Type
HealthCheck HealthCheckRequest HealthCheckResponse

HealthCheck returns the health status of the service. Use this endpoint for monitoring and readiness checks.

ImportMultipleFiles ImportMultipleFilesRequest ImportMultipleFilesResponse

ImportMultipleFiles accepts multiple files and imports them into the corpus graph.

CreateCorpusBuild CreateCorpusBuildRequest CreateCorpusBuildResponse

CreateCorpusBuild triggers a corpus build using validated uploaded files. The build runs in the background and returns immediately with a corpus_build_id.

GetBuildStatus GetBuildStatusRequest GetBuildStatusResponse

GetBuildStatus retrieves the current status of a corpus build. DEVELOPER NOTE: This endpoint is primarily for monitoring and debugging purposes. Since CreateCorpusBuild runs in the background and returns immediately with a corpus_build_id, use this endpoint to: - Monitor the progress of long-running corpus builds (which can take hours) - Check if a build completed successfully or failed - Debug issues by viewing error messages and progress percentages - Track build lifecycle from "pending" → "running" → "completed"/"failed" The corpus build process includes: file reading, embedding generation, document insertion, vector indexing, similarity finding, clustering, and graph creation. Poll this endpoint periodically to track progress through these stages.

EmbedFieldInCollection EmbedFieldInCollectionRequest EmbedFieldInCollectionResponse

EmbedFieldInCollection generates embeddings for documents in a collection that do not yet have the embedding field, stores them in _embedding, and creates vector index and ArangoSearch view for that field. Single collection, single field per request; repeated calls are incremental.

TriggerRAGStrategizer TriggerRAGStrategizerRequest TriggerRAGStrategizerResponse

TriggerRAGStrategizer analyzes existing clusters and selects optimal RAG strategy. This endpoint should be called AFTER a corpus build is completed. It analyzes document clusters using simple lexical metrics (word density and average word length) to recommend either VectorRAG or FullGraphRAG for each domain.

TriggerAutographOrchestration TriggerOrchestrationRequest TriggerOrchestrationResponse

TriggerAutographOrchestration spawns graphrag_importer workers and executes builds for all strategy profiles in corpus_rags. Returns orchestration_id immediately; the pipeline runs in the background.

GetRagStrategizerStrategy GetRagStrategizerStrategyRequest GetRagStrategizerStrategyResponse

GetRagStrategizerStrategy retrieves all RAG strategies that have been created. Returns all strategies stored in the rags collection with their cluster assignments, strategy types, and extracted entities.

GetRagStrategizerJobStatus GetRagStrategizerJobStatusRequest GetRagStrategizerJobStatusResponse

GetRagStrategizerJobStatus retrieves live progress of a RAG strategizer analyze run by its job id. Use this endpoint to drive a UI progress bar while POST /v1/rag-strategizer/analyze runs in the background.

UpdateRagStrategizerStrategy UpdateRagStrategizerStrategyRequest UpdateRagStrategizerStrategyResponse

UpdateRagStrategizerStrategy edits and persists the strategy for a specific cluster. Returns 409 if orchestration is running.

InsertDocuments InsertDocumentsRequest InsertDocumentsResponse

InsertDocuments adds a batch of new documents into an existing corpus graph: embed, insert into sources, assign to the most similar cluster, and wire up similarity + domain edges. Returns a per-file status.

UpdateDocuments UpdateDocumentsRequest UpdateDocumentsResponse

UpdateDocuments replaces a batch of documents (delete leg then insert leg) under a single mutation slot. Returns immediately; the delete+insert runs in the background and progress is surfaced via the importerOrchestration status slot.

DeleteDocuments DeleteDocumentsRequest DeleteDocumentsResponse

DeleteDocuments removes a batch of documents from the corpus graph (Layer 1/2) and cleans up the importer knowledge graph (Layer 3).

TriggerRecluster TriggerReclusterRequest TriggerReclusterResponse

TriggerRecluster manually schedules Layer-3 reclustering for one or more partitions. Reclustering is manual-only: AutoGraph tracks per-partition divergence and flags needs_reclustering (surfaced on per-file responses and persisted on the rags node) once a partition crosses its threshold, but it never reclusters on its own -- the user decides whether the recluster is worth its cost and invokes this endpoint. Progress and the terminal outcome are surfaced via the project-metadata importerOrchestration slot. Effectively a MAINTENANCE-WINDOW operation: a recluster claims the single service-wide mutation slot and holds it for its whole run (up to ~1h), blocking all inserts/updates/deletes/builds meanwhile. Reclusters are serialized -- in a multi-partition request only one runs at a time and the rest defer (~10s) rather than queueing, staying flagged for a later re-trigger -- so reclustering N partitions blocks writes for roughly the sum of their run times. Run it during a quiet window and keep batches small (see the per-request cap on TriggerReclusterRequest.partition_ids).

UpdateModelConfig UpdateModelConfigRequest ModelConfigCredentialsResponse

UpdateModelConfig persists the AutoGraph model/provider configuration with inline validation, in-place pod updates, and diff-then-write metadata persistence. Validates provider/model/key inline and applies changes to the running pod without rebuild (no idle-only restriction). A rejected configuration keeps its body (valid=false + field/error_code/ message) and reaches HTTP clients as 400, not 200 (AIS-1821). Chat providers: "openai" | "triton" | "custom". Embedding: "openai" | "custom". `custom` is an OpenAI-compatible endpoint; only client construction maps it to openai. All fields required except multimodal_model (optional) and chat_api_url / embedding_api_url (optional unless the corresponding provider is "custom", in which case that URL is required).

GetOrchestrationStatus GetOrchestrationStatusRequest GetOrchestrationStatusResponse

GetOrchestrationStatus returns the current status of an orchestration run, including per-job details and importer failure messages. Poll this endpoint after POST /v1/orchestrate to track progress. Status lifecycle: "running" → "completed" | "failed" | "cancelled" AIS-1816 -- read "status" and "phase" together, not "status" alone: * status is terminal only when every import job is terminal, and "completed" additionally means the imported partitions were found in the knowledge graph (output_verified). So "completed" is safe to treat as "the knowledge graph holds this run's partitions". * phase says where a still-"running" run is. "starting_importers" means the fleet is coming up and nothing has been imported yet -- do not show that as near-done just because elapsed_seconds is large. Within-job progress (documents/chunks as they are written) is not available: the importer only reports counts on a terminal job, so entities_added grows per finished job, not continuously. Returns 404 if the orchestration_id is unknown, invalid, or has been evicted

CancelOrchestration CancelOrchestrationRequest CancelOrchestrationResponse

CancelOrchestration asks the running orchestration to stop and release the single-flight slot, so an operator can clear a wedged run without database surgery (AIS-1809). Cancellation is cooperative: the run terminalises at its next consumption-loop pass, tears down its own importer service, and frees the slot -- bounded by one importer HTTP timeout, so allow up to ~2 minutes. A run still holding the slot ORCHESTRATION_CANCEL_GRACE_SECONDS after the request is force-released by the admission reaper instead. Returns 404 when orchestration_id is not the run currently holding the slot (already terminal, unknown, or evicted).

GetProjectOverview GetProjectOverviewRequest GetProjectOverviewResponse

GetProjectOverview returns the aggregate Project Overview read (corpus graph, knowledge graph, strategies, and per-category document counts).

DeleteCategory DeleteCategoryRequest DeleteCategoryResponse

DeleteCategory removes a whole category (module alias) synchronously. The corpus/KG contribution of the category is cleaned first (delete_module_data), then, when delete_files is true and the category has files, they are deleted via the File Manager shared library by scope + name. Deletion respects each file's stored safe_to_delete flag: files with safe_to_delete=true are removed; files with safe_to_delete=false (locked) are reported in locked_skipped and left intact. A category that has no files ("unused") unregisters its empty scope instead of deleting; an unknown category is 404. Rejected with 409 while a corpus build or orchestration is in progress.

DeleteProject DeleteProjectRequest DeleteProjectResponse

DeleteProject synchronously removes all AutoGraph-owned artifacts for a project. The running AutoGraph service is torn down only after the success response has been sent to the caller. delete_files is intentionally a query parameter (?delete_files=true). Do NOT add `body: "*"` here: DELETE bodies are frequently stripped by clients and proxies, and a body binding would silently drop the deliberate file-wipe opt-in. See DeleteProjectRequest.delete_files.

BuildStrategy

BuildStrategy contains configurable parameters for corpus build.

Field Type Label Description
top_k int32 optional

Top K value (optional, exposed parameter)

cluster_threshold int32 optional

Clustering levels: 1 = single-level, 2 = two-level (default: 2)

custom_params BuildStrategy.CustomParamsEntry repeated

Additional custom parameters

BuildStrategy.CustomParamsEntry

Field Type Label Description
key string

value string

CancelOrchestrationRequest

CancelOrchestrationRequest identifies the orchestration run to stop.

Field Type Label Description
orchestration_id string

Must be the run currently holding the single-flight slot

CancelOrchestrationResponse

CancelOrchestrationResponse acknowledges a cancellation request.

Field Type Label Description
orchestration_id string

The orchestration ID that was asked to stop

cancellation_requested bool

True when the running orchestration accepted the request

status string

The run's status at acknowledgement time (still "running" until it terminalises)

message string

Human-readable summary, including how the slot is released

CategoryOverview

CategoryOverview describes one row in the categories list on the Overview page.

Field Type Label Description
name string

Category (user-facing term; internal alias: module)

document_count int32

Number of documents in this category (FM subtree count)

needs_corpus_update bool

True when this category's sources are ahead of / not covered by the corpus graph

needs_strategies bool

True when this category has no RAG strategy yet

CorpusBuildStatus

CorpusBuildStatus tracks corpus build progress

Field Type Label Description
status string

Current status: "idle", "pending", "running", "completed", "failed"

progress float

Progress percentage (0.0-100.0)

message string optional

Status message

CorpusGraphOverview

CorpusGraphOverview describes the corpus graph card on the Overview page.

Field Type Label Description
name string

Corpus graph name (e.g. "{project}_CorpusGraph")

status string

"building" | "ready" | "failed"

document_count int32

Number of source documents in the corpus (sources collection)

cluster_count int32

Number of Leiden clusters (domains collection) — NOT chunks

stale bool

True when sources or strategies are out of date w.r.t. inputs

graph_explorer_url string

Deep link to the Arango UI graph explorer

CreateCorpusBuildRequest

CreateCorpusBuildRequest contains parameters for triggering a corpus build.

Field Type Label Description
embedding_strategy string

Embedding strategy (e.g., "first_chunk")

strategy BuildStrategy optional

Build strategy with configurable parameters

file_ids string repeated

Deprecated. DEPRECATED: use categories. Explicit RAG input file IDs to fetch from File Manager.

modules string repeated

Deprecated. DEPRECATED alias for categories. Same FM category-label resolution when categories is empty. Provide only one of categories, modules, or file_ids.

incremental bool

If true, preserve existing collections and only add/update specified modules

categories string repeated

field 6 (scope) retired; replaced by categories below. Preferred. Category labels resolved via File Manager under GENAI_PROJECT_NAME. An already-encoded module label (today's persisted form) is also accepted as a legacy alias. Mutually exclusive with modules and file_ids (returns 400 if multiple provided). See user_facing_documentation.md §3 for full contract (precedence, default, examples).

Fields with deprecated option

Name Option
file_ids

true

modules

true

CreateCorpusBuildResponse

CreateCorpusBuildResponse contains the corpus build ID.

Field Type Label Description
corpus_build_id string

Generated corpus build ID (e.g., "cb_01H...")

graph_name string

Named graph the build will produce (resolved deterministically at request time)

DeleteCategoryRequest

DeleteCategoryRequest identifies the category (module alias) to delete. project and category are taken from the path; delete_files toggles physical file removal via the File Manager shared library.

Field Type Label Description
project string

Must match configured GENAI_PROJECT_NAME (path param)

category string

Bare category label to delete (path param); an already-encoded module is also accepted as a legacy alias

delete_files bool

If true, also delete the category's files from the File Manager

DeleteCategoryResponse

DeleteCategoryResponse reports the synchronous delete outcome.

Field Type Label Description
deleted bool

True when the delete flow completed

category string

Echo of the deleted category

graph_updated bool

True when corpus/KG data for the category was removed

files_deleted int32

Number of files removed from the File Manager

locked_skipped string repeated

Files skipped because they were locked (not deleted)

DeleteDocumentsRequest

Field Type Label Description
file_ids string repeated

Files to delete, identified by File Manager file_id (primary).

doc_names string repeated

Alternative targets identified by filename; resolved by category + filename when file_id is not used. Independent of file_ids ("and/or").

category string

Category (module alias) the targets belong to (shared across the batch). Optional when the project has exactly one category (auto-resolved); required and must name an existing category otherwise. doc_names are resolved by category + filename; each file_id target is asserted to belong to the resolved category (a mismatch is rejected).

DeleteDocumentsResponse

Field Type Label Description
results DeleteFileStatus repeated

Per-file deletion results

affected_rag_partitions string repeated

RAG partitions that were updated

removed_rag_partitions string repeated

RAG partitions that were removed entirely

layer3_results Layer3PartitionDeleteResult repeated

Per-partition L3 delete outcome

overall_status DeleteOverallStatus

Whole-batch commit / rollback / failure

affected_cluster_ids string repeated

Clusters that were updated, regardless of whether a RAG partition exists for them yet

removed_cluster_ids string repeated

Clusters that were removed entirely, regardless of whether a RAG partition exists for them yet

delete_id string

Id for this synchronous delete (also the concurrency-lock key)

DeleteFileStatus

Field Type Label Description
file_id string

ID of the file this result is for

status Layer2DeleteStatus

Outcome of the deletion for this file

error_message string optional

Error description, if any

rag_partition_id string

RAG partition associated with the file

cluster_key string

Cluster the file belonged to (the cluster document _key, e.g. "cluster_legal_0"; matches InsertFileStatus.cluster_key)

similarity_edges_removed int32

Number of similarity edges removed

divergence_score double optional

AIS-1444: partition's divergence after this delete (cumulative churn / baseline); set once the Layer-3 delete leg has run

needs_reclustering bool optional

AIS-1444: true when divergence_score now exceeds the partition's threshold

DeleteProjectRequest

DeleteProjectRequest identifies the project to tear down.

Field Type Label Description
project string

Path parameter; must match configured GENAI_PROJECT_NAME

delete_files bool

Query parameter (?delete_files=true), NOT a request body. The DELETE HTTP binding declares no `body`, so grpc-gateway populates this from the query string and ignores any JSON body. Defaults to false: a full File Manager wipe requires the caller to opt in deliberately via ?delete_files=true. Also delete safe File Manager files when true

DeleteProjectResponse

DeleteProjectResponse reports every resource removed by the synchronous cleanup. deleted=false and warnings describe a retryable partial failure.

Field Type Label Description
deleted bool

project string

collections_deleted string repeated

graphs_deleted string repeated

services_deleted string repeated

files_deleted int32

locked_skipped string repeated

warnings string repeated

views_deleted string repeated

DocumentDedupGroup

DocumentDedupGroup names the source files that collapsed onto one corpus document.

Field Type Label Description
document_key string

Arango _key of the surviving document

document_id string

Arango _id of the surviving document

module string

Module the document belongs to

filename string

Filename the document is keyed by

source_filenames string repeated

Every input file that mapped onto it, in input order; the LAST one's content survived

source_file_ids string repeated

File Manager ids for the same files, in the same order (empty entries omitted)

collapsed_onto_existing bool

True when these files also overwrote a document from an earlier build

EmbedFieldInCollectionRequest

EmbedFieldInCollectionRequest specifies the collection and field to embed.

Field Type Label Description
collection string

Name of the collection (e.g. "A")

field string

Document attribute to embed (e.g. "content"); stored in _embedding

EmbedFieldInCollectionResponse

EmbedFieldInCollectionResponse contains the result of the embed operation.

Field Type Label Description
status string

e.g. "completed"

message string

Human-readable message

collection string

Collection name

field string

Source field name

embedding_field string

Name of the field where embeddings are stored (e.g. content_embedding)

documents_updated int32

Number of documents that received embeddings

documents_skipped int32

Number of documents that already had embedding (skipped)

documents_examined int32

Collection size (coll.count); reconcile against updated+skipped+failed+ineligible

documents_failed int32

Number of documents that failed (empty value or error)

documents_ineligible int32

Rows with null/absent source field and no embedding (neither embedded nor failed)

FileInput

FileInput represents a single file to be imported with inline content.

Field Type Label Description
doc_name string

Document name (required)

content bytes

File content in bytes (required)

citable_url string

URL to be cited in inline citations (optional)

metadata string optional

Flexible metadata string (optional, user-defined format)

GetBuildStatusRequest

GetBuildStatusRequest contains the corpus build ID to query.

Field Type Label Description
corpus_build_id string

Corpus build ID to check status for

GetBuildStatusResponse

GetBuildStatusResponse contains the current status of a corpus build.

Field Type Label Description
corpus_build_id string

Corpus build ID

status string

Status: "pending", "running", "completed", "failed"

message string

Human-readable status message

progress int32

Progress percentage (0-100)

error string

Error message if status is "failed"

started_at double

Unix timestamp when build started

completed_at double

Unix timestamp when build completed (if finished)

error_code string optional

Machine-readable code (e.g. LLM_RATE_LIMITED) when failed

graph_name string

Named graph for the build; seeded from pending/running (same value as POST), retained on failure; counts below are set on completion

document_count int32

Number of source documents (populated when completed; 0 otherwise)

cluster_count int32

Number of domain clusters (populated when completed; 0 otherwise)

documents_added int32

FM files new to the corpus this build (incremental FM builds; 0 otherwise)

documents_removed int32

Corpus orphans removed vs current FM listing (incremental FM builds; 0 otherwise)

documents_unchanged int32

Corpus docs still present in FM (incremental FM builds; 0 otherwise)

files_written int32

Deduplication reporting (AIS-1819). Corpus documents are keyed by (module, filename), so two input files sharing both produce ONE document -- intended, but previously invisible: a 100-file build could leave 99 documents with nothing reported anywhere. Populated on completion. Dedup is by name only; identical extracted content under different filenames stays two documents. See user_facing_documentation.md §"Document identity and deduplication". Input files that were successfully written this build

documents_created int32

Distinct documents those files produced (files_written minus documents_deduplicated)

documents_deduplicated int32

Input files absorbed into a document another file already owned

dedup_groups DocumentDedupGroup repeated

One entry per collapsed document, naming every source file that mapped onto it

GetOrchestrationStatusRequest

GetOrchestrationStatusRequest identifies an orchestration run to query.

Field Type Label Description
orchestration_id string

Orchestration ID returned by POST /v1/orchestrate

GetOrchestrationStatusResponse

GetOrchestrationStatusResponse returns the live or final status of an orchestration run. AIS-1816 -- what the two status-shaped fields mean, because "completed" was previously read as "my knowledge graph is ready" when it only ever meant "every import job reported a terminal success": status is about the WHOLE RUN and is only terminal once nothing is left to do. "completed" now additionally requires that the partitions the importer claimed to have written are actually present in the knowledge graph (see output_verified). It is never "completed" while any job is still pending or running. phase is where inside a "running" run the work currently is. This is the field to render as progress: a run sitting in "starting_importers" has not imported anything yet, however long it has been running. Deliberately NOT split into separate setup/import status fields: a caller asking "is my graph ready?" must have exactly one field to trust, and adding a second status would re-create the same ambiguity in a new place. Setup is a phase of the run, not a status of its own.

Field Type Label Description
orchestration_id string

The orchestration ID queried

status string

"running" | "completed" | "failed" | "cancelled" -- terminal only when every job is terminal

total_jobs int32

Total number of import jobs (0 while phase is "initializing" -- the job set is not known yet)

completed_jobs int32

Jobs completed successfully (includes skipped_jobs)

failed_jobs int32

Jobs that failed (after all retries)

message string optional

Human-readable summary

jobs OrchestrationJobResult repeated

Per-job details (all jobs, including pending/running)

phase string

AIS-1816. "initializing" | "starting_importers" | "importing" | "verifying" | "finished" -- see the message comment above

running_jobs int32

Jobs currently assigned to an importer replica

pending_jobs int32

Jobs loaded but not yet dispatched

skipped_jobs int32

Jobs counted in completed_jobs that imported nothing (no requested file_ids in that partition)

entities_added int32

Entities the importer reported writing this run, summed over terminal jobs. 0 is NOT evidence that nothing was imported: a VectorRAG partition writes Documents, Chunks and Relations but no entities by design, so a successful VectorRAG-only run reports 0 here. Read jobs[].imported / skipped_jobs to tell a real no-op from an entity-free import.

elapsed_seconds int32

Wall-clock since the run was triggered

seconds_since_progress int32

Since an importer worker last answered; a large value on a "running" run means the fleet has gone quiet

output_verified bool optional

Whether the knowledge graph was checked to actually contain the partitions the importer reported as imported. Absent means not checked yet (the run is not terminal) or the check could not be performed (KG lookup itself failed -- reported in message, and never turned into a false import failure).

unverified_partitions string repeated

Partitions whose jobs reported success but which are absent from the knowledge graph; non-empty forces status "failed"

strategy_summary StrategyExecutionSummary optional

AIS-1847: the strategy-level tally, so a caller can report how many strategies succeeded and failed -- and why each failure failed -- without filtering `jobs` itself. Absent means no strategy set was ever loaded (the run died in setup, or corpus_rags held no profiles): that is NOT the same as a run where none succeeded, and a zeroed summary would read as a finished run that happened to do no work.

GetProjectOverviewRequest

GetProjectOverviewRequest carries the project name (path param) and the optional File Manager rag-input browse parameters that AutoGraph forwards verbatim when resolving category counts.

Field Type Label Description
project string

Project name (must match GENAI_PROJECT_NAME) — required

scope string repeated

File Manager scope subtree filter (0–5 labels)

search string

Case-insensitive substring match on file name (forwarded to FM)

name string

Exact-name filter (forwarded to FM)

limit int32

FM paging limit (0 = FM default); forwarded to FM

offset int32

FM paging offset; must be >= 0. Negative values are clamped to 0 server-side before forwarding to FM (which rejects negatives with 400).

GetProjectOverviewResponse

GetProjectOverviewResponse contains the Project Overview aggregate read.

Field Type Label Description
project string

corpus_graph CorpusGraphOverview

knowledge_graph KnowledgeGraphOverview

strategies StrategiesOverview

categories CategoryOverview repeated

Unfiltered top-level category listing; never narrowed by search/name/limit/offset

category_count int32

Number of categories in the (unfiltered) categories list above

total_documents int32

Unfiltered document total for the project: the sum of the category document_counts above.

filtered_total_documents int32

File Manager filtered page total for a browse/paging request (any of search/name/limit/offset set): the FM 'total' for that filtered/paged view. 0 (unset) when no browse/paging params are present.

GetRagStrategizerJobStatusRequest

GetRagStrategizerJobStatusRequest contains the strategize job ID to query.

Field Type Label Description
strategize_job_id string

Strategize job ID to check status for

GetRagStrategizerJobStatusResponse

GetRagStrategizerJobStatusResponse contains live progress of an analyze run.

Field Type Label Description
status string

Status: "idle", "pending", "running", "completed", "failed"

progress float

Overall phase progress percentage (0.0-100.0)

clusters_total int32

Total clusters to analyze in Phase 1

clusters_done int32

Clusters that have finished analysis (including empty/failed)

message string

Human-readable status or failure reason (e.g. Unknown categories)

GetRagStrategizerStrategyRequest

GetRagStrategizerStrategyRequest is an empty message to get all RAG strategies.

GetRagStrategizerStrategyResponse

GetRagStrategizerStrategyResponse contains all RAG strategies.

Field Type Label Description
strategies RagStrategy repeated

List of all RAG strategies

total_strategies int32

Total number of strategies

strategy_type_counts GetRagStrategizerStrategyResponse.StrategyTypeCountsEntry repeated

Count of strategies by type (e.g., "VectorRAG": 5, "FullGraphRAG": 3, and any future strategy types)

GetRagStrategizerStrategyResponse.StrategyTypeCountsEntry

Field Type Label Description
key string

value int32

HealthCheckRequest

HealthCheckRequest is an empty message for health check requests.

HealthCheckResponse

HealthCheckResponse contains the health status of the service.

Field Type Label Description
status string

status can be "SERVING" or "NOT_SERVING"

message string

message is always "Service is healthy" (OAS-12591). The endpoint is unauthenticated so Kubernetes probes can reach it, and it reports only whether this process is up -- no dependency, provider or tracing state. Earlier versions embedded a JSON per-provider LLM-tracing snapshot here (AIS-1530); that was removed. Consumers keying on `status` are unaffected.

ImportMultipleFilesRequest

ImportMultipleFilesRequest contains the files to be imported.

Field Type Label Description
files FileInput repeated

List of files to process

module string

Module label for this batch of files (e.g., "legal", "marketing")

ImportMultipleFilesResponse

ImportMultipleFilesResponse contains the result of the import operation.

Field Type Label Description
success bool

Whether the operation succeeded

message string optional

Success or error message

error_message string optional

Detailed error message if success is false

InsertDocumentsRequest

InsertDocumentsRequest contains a batch of File Manager files to insert into an existing corpus graph.

Field Type Label Description
files InsertFileInput repeated

Batch of files to insert, each referenced by file_id

category string

Category label (e.g. "legal") whose corpus partition scopes similarity + clustering, resolved server-side under GENAI_PROJECT_NAME as in POST /v1/corpus/builds. Empty resolves to the project's only category; required once a project has more than one.

InsertDocumentsResponse

InsertDocumentsResponse returns one status entry per input file.

Field Type Label Description
results InsertFileStatus repeated

InsertFileInput

InsertFileInput represents a single File Manager file to insert into an existing corpus graph.

Field Type Label Description
doc_name string

Document name; must match the name encoded in file_id (required)

file_id string

File Manager id supplying the content (required)

InsertFileStatus

InsertFileStatus is the per-file outcome of an insert.

Field Type Label Description
doc_name string

Echoes InsertFileInput.doc_name

success bool

Whether this file was inserted

error_message string optional

Populated when success is false

rag_partition_id string optional

e.g. "legal_0_a"

cluster_key string optional

Assigned cluster, e.g. "cluster_legal_0" (field 5 to match DeleteFileStatus.cluster_key)

file_id string optional

File Manager id, echoed for files referenced by file_id

KnowledgeGraphOverview

KnowledgeGraphOverview describes the knowledge graph card on the Overview page.

Field Type Label Description
name string

KG named graph (e.g. "{project}_kg")

status string

"not_built" | "building" | "built" | "stale"

entity_count int32

Distinct entities in the KG; 0 on a VectorRAG-only project -- Entities exist for FullGraphRAG partitions only, not a failed import

relationship_count int32

Distinct relationships in the KG

stale bool

True when KG partitions diverge from current strategies

new_categories string repeated

categories not yet imported into the KG

removed_categories string repeated

categories whose strategy no longer exists

Layer3PartitionDeleteResult

Per-partition result of the Layer-3 delete. Counts are Autograph's own AQL removal totals for that partition's batch.

Field Type Label Description
rag_partition_id string

status Layer3DeleteStatus

error_message string optional

documents_removed int32

chunks_removed int32

entities_removed int32

communities_removed int32

semantic_units_removed int32

edges_removed int32

ModelConfigCredentialsResponse

ModelConfigCredentialsResponse returns validation status and application results for UpdateModelConfig. Validation failures are signaled via valid=false + populated field/error_code/message; this body is the contract the rest of the API is modelled on and it is sent unchanged for a rejection. AIS-1821: the HTTP status now matches it. The handler marks a rejected response so the gateway answers 400 instead of 200 (see ForwardResponseRewriter in proto/corpus_graph_proxy.go), because reporting a refused credential as a 200 made response.ok meaningless. gRPC callers still receive OK and read the same fields.

Field Type Label Description
applied bool

Config persisted to metadata (overall success)

valid bool

Validation passed

applied_to_running_pod bool

In-place update succeeded (live immediately); false = restart required

rebuild_required bool

True when embedding config changed (model/provider/api_url; existing vectors invalidated)

key_status string

"valid" | "invalid" | "expired" | "rate_limited" | "insufficient_quota"

field string

On validation error (valid=false), these fields are populated: Field name that failed

error_code string

Error code enum

message string

Human-readable error

OrchestrationJobResult

OrchestrationJobResult contains the outcome of a single orchestration job.

Field Type Label Description
rag_partition_id string

Partition ID of the job

strategy_type string

FullGraphRAG or VectorRAG (from strategy profile in rags). A completed VectorRAG job creates Documents/Chunks/Relations only -- that partition cannot serve LOCAL/GLOBAL/UNIFIED queries (AIS-1748)

status string

pending | running | completed | failed

retry_count int32

Number of retries attempted

error_message string optional

Error details if failed (from importer current_status.message)

category string

Module label (corpus_rags.module); empty for legacy no-module projects

divergence_score double optional

AIS-1444: the partition's divergence, computed at the right time -- right after Layer 3 actually created/grew this partition's entities. This is the authoritative score (the insert/update responses no longer carry a premature one); it is also persisted on the rags node. Populated on the terminal poll once the job is completed. cumulative churn / baseline after this orchestration

needs_reclustering bool optional

true when divergence_score exceeds the partition's threshold

entities_added int32 optional

AIS-1816: what this job actually wrote, so "completed" is auditable per partition rather than being taken on trust. entities the importer reported writing (import_result.entities_added); absent until the job is terminal. 0 is a real value, not "nothing imported": a VectorRAG job writes documents/chunks and no entities -- check imported instead

imported bool optional

false on a completed job that performed no import (requested file_ids matched nothing in this partition) -- a no-op success, not written output

RagStrategizerStatus

RagStrategizerStatus tracks RAG strategizer analysis progress

Field Type Label Description
status string

Current status: "idle", "pending", "running", "completed", "failed"

progress float

Progress percentage (0.0-100.0)

message string optional

Status message

RagStrategy

RagStrategy represents a single RAG strategy for a cluster/domain.

Field Type Label Description
cluster_id string

Cluster ID (e.g., "cluster_0", extracted from INGESTED_AS relation edge or derived from rag_partition_id)

strategy_type string

Strategy type: "VectorRAG", "FullGraphRAG", or future types. Determines the partition's retrieval capability: FullGraphRAG partitions have Entities/Communities and serve LOCAL/GLOBAL/UNIFIED; VectorRAG partitions have neither and serve none of them (AIS-1748)

rag_partition_id string

Partition ID (e.g., "domain_0_a", "domain_1_b")

entity_types string repeated

Extracted entity types for this domain

document_count int32

Number of documents in this cluster

parameters RagStrategy.ParametersEntry repeated

Extensible strategy-specific parameters (e.g., rag_mode, batch_size, enable_chunk_embeddings, PDF parsing flags, etc.)

RagStrategy.ParametersEntry

Field Type Label Description
key string

value string

ReclusterPartitionStatus

ReclusterPartitionStatus is the per-partition scheduling outcome. The recluster itself runs in the background; this only reports whether it was accepted for scheduling. For progress, the project-metadata importerOrchestration status slot carries the running/completed/failed of a single job at a time -- with several partitions their writes overwrite one another, so it is NOT a per-partition ledger. The authoritative per-partition outcome is the rags node itself: needs_reclustering (cleared on success) and last_reclustered_at; poll those per partition when reclustering more than one.

Field Type Label Description
rag_partition_id string

Partition this result is for

accepted bool

True when a recluster was scheduled (or coalesced into an in-flight one)

error_message string optional

Populated when this partition could not be scheduled (e.g. blank id)

StrategiesOverview

StrategiesOverview describes the strategies block on the Overview page.

Field Type Label Description
stale bool

True when any corpus category lacks a strategy or a strategy is out of date

categories_without_strategies string repeated

Corpus categories missing a RAG strategy

StrategyExecutionSummary

StrategyExecutionSummary is the run's strategy-level tally (AIS-1847). One "strategy" is one import job: one corpus_rags partition profile. A build can fail for one strategy's data while the rest import cleanly. The flat counters above say how the *queue* ended; this says how the strategies did, and is the shape to render as an execution summary. Invariants, deliberately matching those flat counters: total == succeeded + failed + not_run skipped is a SUBSET of succeeded, not a fifth bucket -- a run of nothing but skips is "N succeeded" with an empty knowledge graph not_run is pending + active: loaded but not yet terminal -- queued or in flight while a run is live, and the outstanding remainder after an abort. 0 on a run that reached a terminal state with every strategy accounted for.

Field Type Label Description
total int32

Strategies loaded for this run

succeeded int32

Reached a terminal success (includes skipped)

failed int32

Failed after all retries

skipped int32

Counted in succeeded, but imported nothing

not_run int32

Loaded but not yet terminal: queued or in flight

failures StrategyFailure repeated

One per failed strategy; empty when failed == 0

StrategyFailure

StrategyFailure names one failed strategy and why it failed (AIS-1847).

Field Type Label Description
rag_partition_id string

The partition whose profile this strategy is

strategy_type string

"FullGraphRAG" | "VectorRAG"

category string

corpus_rags.module; empty for legacy no-module projects

error_message string optional

The importer's own words, after all retries; absent when the job was failed without one

retry_count int32

Attempts made before giving up

TriggerOrchestrationRequest

TriggerOrchestrationRequest contains parameters for the orchestration pipeline. Secrets are resolved via secret manager using the profile IDs below.

Field Type Label Description
project string

GenAI project name (required)

replicas int32

Number of worker replicas to spawn

max_retries int32

Max retry attempts per failed job (default: 3)

importer_env TriggerOrchestrationRequest.ImporterEnvEntry repeated

Env overrides for importer

chat_secret_profile_ids string repeated

Secret manager profile IDs for chat

embedding_secret_profile_id string

Secret manager profile ID for embedding

categories string repeated

Module labels to scope orchestration; empty = all

file_ids string repeated

When non-empty, orchestration is narrowed to the strategized clusters that actually contain these File Manager file_ids, and each such partition imports only those ids (AIS-1809); a partition whose intersection is empty is skipped as a completed no-op, not a failure; a request in which NO id matches any document in any strategized cluster is rejected up front with HTTP 409 NoMatchingFilesError naming the unmatched ids (it would spawn importer pods for zero work and hold the single-flight slot), so ids no longer need validating before calling; matching uses only the file_id stamped on corpus sources by corpus build (autograph v0.0.13+) -- there is no filename fallback for a targeted request; empty means the whole cluster (existing behavior)

TriggerOrchestrationRequest.ImporterEnvEntry

Field Type Label Description
key string

value string

TriggerOrchestrationResponse

TriggerOrchestrationResponse is returned immediately when orchestration starts.

Field Type Label Description
orchestration_id string

ID returned when orchestration starts

success bool

True when background orchestration was dispatched (immediate unary response only)

message string

e.g. "Orchestration started" on immediate return (totals/job_results start at zero)

total_jobs int32

completed_jobs int32

failed_jobs int32

job_results OrchestrationJobResult repeated

unmatched_file_ids string repeated

AIS-1815: requested file_ids with no match in any strategized cluster; set on partial match, empty otherwise

TriggerRAGStrategizerRequest

TriggerRAGStrategizerRequest contains parameters for RAG strategy analysis.

Field Type Label Description
project string

Must match configured GENAI_PROJECT_NAME

complexity RagStrategizerComplexity optional

Required; omitted/unknown values are rejected (400)

extract_images_default bool

Default false; only true with high or very_high

categories string repeated

Module aliases for scoped re-gen; empty = all

max_parallel_clusters int32

Max clusters to analyze in parallel (LLM calls). 0 = default (5).

TriggerRAGStrategizerResponse

TriggerRAGStrategizerResponse is returned when the strategizer job is accepted. Results are stored in rags collection and can be queried from the database.

Field Type Label Description
strategize_job_id string

Job ID for the async strategizer run

TriggerReclusterRequest

TriggerReclusterRequest names the RAG partitions to recluster. At least one partition id is required, and at most a small server-defined maximum per request (RECLUSTER_MAX_PARTITIONS_PER_REQUEST) -- reclusters are serialized and each blocks all writes for its full run, so oversized batches are rejected rather than silently deferring most of the work. Split large reclustering into smaller batches, ideally during a maintenance window.

Field Type Label Description
partition_ids string repeated

RAG partitions to recluster, e.g. "legal_0_a" (capped per request)

TriggerReclusterResponse

TriggerReclusterResponse returns one scheduling result per requested partition.

Field Type Label Description
results ReclusterPartitionStatus repeated

One entry per requested partition id

UpdateDocumentsRequest

UpdateDocumentsRequest contains a batch of files to replace in an existing corpus graph. Files are referenced by File Manager id, exactly as InsertDocumentsRequest does: the replacement content is always read back from the File Manager, never sent inline.

Field Type Label Description
files InsertFileInput repeated

Batch of files to update, each referenced by file_id

module string

Deprecated. DEPRECATED: use category. Same category-label resolution.

category string

Preferred. Category label (bare or already-encoded, see InsertDocumentsRequest.category) scoping similarity + clustering. Alias for module when module is empty.

Fields with deprecated option

Name Option
module

true

UpdateDocumentsResponse

UpdateDocumentsResponse is returned immediately when an update starts. The delete+insert runs in the background; poll the project-metadata importerOrchestration status slot for progress and the terminal outcome.

Field Type Label Description
update_id string

ID returned when the update starts

accepted bool

True when the background update was dispatched

message string

e.g. "Update started" on immediate return

results UpdateFileStatus repeated

Empty on dispatch (reserved; combined per-file outcome is surfaced via the status slot)

UpdateFileStatus

UpdateFileStatus is the per-file outcome of an update. When ``delete_done`` is true but ``insert_success`` is false, the file was removed from the graph and the caller should re-add it via POST /v1/graph/insert.

Field Type Label Description
doc_name string

Echoes InsertFileInput.doc_name

delete_done bool

Whether the delete leg fully committed

insert_success bool

Whether the insert leg succeeded

error_message string optional

Populated when the update did not fully succeed

cluster_key string optional

Cluster assigned by the insert leg, e.g. "cluster_legal_0"

rag_partition_id string optional

RAG partition after re-insert, e.g. "legal_0_a"

file_id string optional

Echoes InsertFileInput.file_id

previous_cluster_key string optional

Cluster the file belonged to before the delete leg (observability)

UpdateModelConfigRequest

UpdateModelConfigRequest carries the model/provider configuration to persist into project metadata (AiProject.model_settings, project-level field 7 in the shared project_metadata proto — survives AutoGraph service teardown/redeploy). Chat and embedding are configured independently. project/service/db are resolved server-side from the deployment environment. Project name is validated against the service's configured GENAI_PROJECT_NAME.

Field Type Label Description
project string

Project name (validated against env)

chat_api_provider string

Chat provider: "openai" | "triton" | "custom" — required

embedding_api_provider string

Embedding provider: "openai" | "custom" — required

chat_model string

Chat/completions model name — required

embedding_model string

Embedding model name — required

chat_secret_profile_id string

Chat secret manager profile id — required (never a raw key)

embedding_secret_profile_id string

Embedding secret manager profile id — required (never a raw key)

multimodal_model string optional

Multimodal model name — optional

chat_api_url string optional

Chat API base URL — required when chat_api_provider is "custom"; optional otherwise

embedding_api_url string optional

Embedding API base URL — required when embedding_api_provider is "custom"; optional otherwise

UpdateRagStrategizerStrategyRequest

UpdateRagStrategizerStrategyRequest contains the fields to override for a cluster strategy.

Field Type Label Description
cluster_id string

Cluster ID (path param)

strategy_type string

"VectorRAG" or "FullGraphRAG"

entity_types string repeated

Forced empty for VectorRAG

extract_images bool

Forced false for VectorRAG

UpdateRagStrategizerStrategyResponse

UpdateRagStrategizerStrategyResponse returns the updated strategy.

Field Type Label Description
strategy RagStrategy

The updated RAG strategy

DeleteOverallStatus

Whole-batch outcome of DeleteDocuments (all layers). Callers that only need "did my delete commit?" should read this field instead of combining per-file Layer 1/2 results with per-partition Layer 3 statuses.

Name Number Description
DELETE_OVERALL_STATUS_UNSPECIFIED 0

DELETE_OVERALL_STATUS_COMMITTED 1

all layers deleted; FM cleanup best-effort

DELETE_OVERALL_STATUS_ROLLED_BACK 2

a layer failed; prior state fully restored — safe to retry the same batch

DELETE_OVERALL_STATUS_FAILED 3

failed and state may be partial; inspect per-file / per-partition results

Layer2DeleteStatus

Outcome of the Layer 1/2 (File Manager + corpus graph) delete leg for one file.

Name Number Description
LAYER2_DELETE_STATUS_UNSPECIFIED 0

Default value; not a valid outcome

LAYER2_DELETE_STATUS_SUCCESS 1

File and its L1/L2 graph data were deleted

LAYER2_DELETE_STATUS_NOT_FOUND 2

File was not found

LAYER2_DELETE_STATUS_ERROR 3

Deletion failed

Layer3DeleteStatus

Per-partition outcome of Autograph-direct Layer-3 (KG) delete via AQL. Runs before Layer 1/2. Reports the end state of that partition's KG data: a partition whose delete succeeded but was later restored must report FAILED (not SUCCESS). Distinct from DeleteOverallStatus, which answers whether the whole delete batch committed.

Name Number Description
LAYER3_DELETE_STATUS_UNSPECIFIED 0

LAYER3_DELETE_STATUS_SUCCESS 1

KG artifacts for the partition's targets removed

LAYER3_DELETE_STATUS_FAILED 2

KG delete failed and/or was restored

LAYER3_DELETE_STATUS_NOT_ATTEMPTED 3

no KG collections / nothing to clean for this partition

RagStrategizerComplexity

RagStrategizerComplexity controls the FullGraphRAG / VectorRAG split by ranking.

Name Number Description
very_low 0

0% FullGraphRAG

low 1

25% FullGraphRAG

moderate 2

50% FullGraphRAG -- top round(0.5 * cluster_count) ranked clusters; a single-cluster project gets 0 FullGraphRAG (all VectorRAG)

high 3

75% FullGraphRAG

very_high 4

100% FullGraphRAG

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)