AutoGraph HTTP API reference
The HTTP API of the AutoGraph service: corpus build, RAG Strategizer, and orchestration
This page and the pages of this section describe the HTTP API of the AutoGraph service. Use it to automate the AutoGraph pipeline or integrate it into existing workflows. It produces the same result as the web interface. For what AutoGraph does and how it works, see the AutoGraph overview.
Prerequisites
- Arango Contextual Data Platform
- LLM and embedding API access (commonly OpenAI-compatible endpoints)
- Valid JWT for the API (
Authorization: Bearer ...) - Platform auth reachable from the service (for token validation and renewal), if your deployment uses it
Before importing data, you need to create a project. Projects keep datasets and configurations isolated from each other.
For detailed instructions on creating and managing projects, see the Projects section in the Arango Control Plane (ACP) documentation.
Install the service
To install and start the AutoGraph service, use the following endpoint of the Arango Control Plane (ACP):
The web interface installs the service for you when you start the first build of a project.
Send the install keys in the env map of the request body. Key names are
lowercase snake_case and have to be spelled exactly as shown below. Keys with a
different spelling are not passed on to the service and are silently ignored.
curl -X POST https://<EXTERNAL_ENDPOINT>:8529/_platform/acp/v1/autograph \
-H "Authorization: Bearer <your-bearer-token>" \
-H "Content-Type: application/json" \
-d '{
"env": {
"db_name": "mydb",
"genai_project_name": "myproject",
"fps_recovery_username": "autograph-recovery",
"chat_api_provider": "openai",
"chat_secret_profile_id": "<chat-profile-id>",
"chat_model": "gpt-5.4-nano",
"embedding_api_provider": "openai",
"embedding_secret_profile_id": "<embedding-profile-id>",
"embedding_model": "text-embedding-3-small",
"embedding_dim": "512"
}
}'
Required keys
| Key | Notes |
|---|---|
db_name | ArangoDB database holding the project. |
genai_project_name | Project name. Prefixes every collection and has to match the project field of API calls. |
fps_recovery_username | ArangoDB user with read/write access to the project database, used to resume File Parser work after a pod restart. Installing without it fails. |
chat_api_provider | openai or custom. |
embedding_api_provider | openai or custom. |
chat_secret_profile_id or chat_api_key | Required for openai and custom. Prefer the secret profile. |
embedding_secret_profile_id or embedding_api_key | Required for openai and custom. Prefer the secret profile. |
chat_api_url / embedding_api_url | Required for custom; optional for openai. |
Common optional keys
| Key | Default | Notes |
|---|---|---|
chat_model | gpt-5.4-nano | |
embedding_model | text-embedding-3-small | Fixed for the life of the project. |
embedding_dim | 512 | Embedding vector width. Has to match the output dimension of the embedding model. |
multimodal_model | unset | Forwarded to the Importer for image extraction. |
embedding_api_keys | falls back to the single key | Comma-separated pool, used round-robin. |
embedding_concurrency | 10 | Starting concurrency; adapts upward when unset. |
chunk_size | 1200 | Tokens per chunk. Changes the graph structure. |
For all chat and embedding parameters, including provider-specific defaults, see LLM Configuration.
The Importer workers that build the Knowledge Graph are installed, run, and torn down by the orchestration. You do not install the Importer yourself unless you use it outside AutoGraph, see The Importer.
Supported file formats
The corpus build does not parse documents itself. It hands every input that is not already plain text or Markdown to the File Parser service, which samples it and converts it to Markdown. AutoGraph then embeds and clusters that Markdown.
The File Parser is an internal data platform service installed once per environment, without a web interface of its own. The Importer uses the same service when it builds the knowledge graph, so the whole AutoGraph pipeline accepts one consistent set of inputs:
- PDF:
.pdffiles including scanned documents, read using OCR - Office documents:
.doc,.docx,.ppt, and.pptxfiles - Plain text:
.txtand.mdfiles
For the per-format detail and for how to size the parser on a self-hosted cluster, see Document conversion and the File Parser.
error_code: FILE_PARSER_PARTIAL_FAILURE, see
Document parsing.Authentication
All endpoints require a JWT in the Authorization header:
Authorization: Bearer <jwt_token>
The service handles token renewal automatically, including for long-running background jobs (corpus build, RAG strategizer, orchestration).
rag_partition_id or overall_status. Responses come
back with the lowerCamelCase equivalents, ragPartitionId and overallStatus,
so convert accordingly when you read one. Request bodies are accepted in either
form.Endpoints
Endpoints are served at http://<host>:8080. For the pipeline
architecture, see Architecture.
Pipeline
| Method | Path | Description | Details |
|---|---|---|---|
GET | /v1/health | Check service readiness | - |
POST | /v1/corpus/builds | Start a corpus build | Corpus Build |
GET | /v1/corpus/builds/{id} | Monitor build progress | Corpus Build |
POST | /v1/rag-strategizer/analyze | Assign RAG strategies to clusters | RAG Strategizer |
GET | /v1/rag-strategizer/jobs/{id} | Monitor a strategizer run | RAG Strategizer |
GET | /v1/rag-strategizer/strategy | Inspect assigned strategies | RAG Strategizer |
PATCH | /v1/rag-strategizer/strategy/{cluster_id} | Override the strategy of one cluster | RAG Strategizer |
POST | /v1/orchestrate | Build the knowledge graph | Graph Operations |
GET | /v1/orchestrate/{id} | Monitor an orchestration and read the partition divergence | Graph Operations |
DELETE | /v1/orchestrate/{id} | Cancel a running orchestration | Graph Operations |
POST | /v1/import-multiple | Deprecated. Direct upload of documents with module labels, superseded by the File Manager | Import Files |
Document-level changes
| Method | Path | Description | Details |
|---|---|---|---|
POST | /v1/graph/insert | Add a document to a knowledge graph that is already built | Graph Operations |
POST | /v1/graph/delete | Remove a document from the graph | Graph Operations |
POST | /v1/graph/update | Replace the content of an existing document | Graph Operations |
POST | /v1/graph/recluster | Rebuild the Layer 3 communities of a partition | Graph Operations |
Project operations
| Method | Path | Description | Details |
|---|---|---|---|
GET | /v1/projects/{project}/overview | Read the whole project state in one call | Project Operations |
PUT | /v1/projects/{project}/model-config/credentials | Set the chat and embedding configuration | Project Operations |
DELETE | /v1/projects/{project}/categories/{category} | Remove a category and its graph data | Project Operations |
DELETE | /v1/projects/{project} | Tear down the whole project | Project Operations |
Standalone
| Method | Path | Description | Details |
|---|---|---|---|
POST | /v1/embed-field-in-collection | Add embeddings to an existing collection | Embeddings |
For HTTP error codes and troubleshooting, see Error Handling.
Asynchronous operations return 202 Accepted. POST /v1/corpus/builds,
POST /v1/rag-strategizer/analyze, and POST /v1/orchestrate acknowledge the
request with 202 and run the work in the background. Accept any 2xx as
“accepted” and poll the matching status endpoint for the outcome.
A corpus build can still be rejected synchronously. If the File Manager has no
files for the selector, the request comes back as 400 and no
corpus_build_id is created, so check the status code before you read the ID
from the response body.
The category contract
A category is the second scope level of a project and carries the label you
set as module when you imported the files, see
Import files.
Every endpoint that takes a category expects the bare label, such as
legal, exactly as GET /v1/projects/{project}/overview reports it in
categories[].name. The internal {project}_legal encoding is a server-side
detail that you never have to construct. An already encoded value is still
accepted as a legacy alias, but the bare form is the one to use.
POST /v1/corpus/builds, POST /v1/rag-strategizer/analyze, and
POST /v1/orchestrate take a list of them in categories, the /v1/graph/*
endpoints take a single one in category, and
DELETE /v1/projects/{project}/categories/{category} takes one in the path.
Responses mix bare labels and internal identifiers. The overview exposes
bare labels on categories[].name, knowledge_graph.new_categories, and
strategies.categories_without_strategies. Those are the values to feed back
into a categories parameter.
knowledge_graph.removed_categories carries rag_partition_id values, and
jobs[].category of an orchestration status carries the encoded module. Never
pass either of them to a categories parameter.
Call sequence
All calls require a valid Authorization: Bearer <token> header. To run
the same sequence without code, use the
AutoGraph Studio web interface.
Standard workflow
GET /v1/health- confirm the service is ready.- Upload the documents to the
File Manager under the
scope
[project, category]. The direct upload withPOST /v1/import-multipleis deprecated. See Import Files. POST /v1/corpus/builds- start the corpus build, preferably withcategories. Returns202with acorpus_build_idand thegraph_name. See Corpus Build.- Poll
GET /v1/corpus/builds/{corpus_build_id}untilstatusiscompleted. Checkerror_codeeven then, because a non-empty value on a completed build means a partial success. See Monitoring Build Status. POST /v1/rag-strategizer/analyze- assign RAG strategies to clusters.projectandcomplexityare required. Returns202with astrategize_job_id. See RAG Strategizer.- Poll
GET /v1/rag-strategizer/jobs/{strategize_job_id}untilstatusiscompleted. See Monitor a strategizer job. - (Optional)
GET /v1/rag-strategizer/strategy- inspect the assigned strategies. See Retrieve RAG Strategies. - (Optional)
PATCH /v1/rag-strategizer/strategy/{cluster_id}- override the strategy of a cluster if the assigned one is not suitable. Do this before you orchestrate. See Update a cluster strategy. POST /v1/orchestrate- spawn Importer workers to build the knowledge graph. Returns202with anorchestration_id. See Trigger Orchestration.- Poll
GET /v1/orchestrate/{orchestration_id}. Branch onstatus, which reachescompletedonly once every job is terminal and the imported partitions were found in the knowledge graph, and renderphaseas the progress. The response also carries the per-partition results, including the divergence of each FullGraphRAG partition. Read them before you start another orchestration, which evicts this run. See Monitor an orchestration.
At any point,
GET /v1/projects/{project}/overview
reports where the project stands: the document and cluster counts, whether the
corpus, the strategies, or the knowledge graph are stale, and which categories
still need work.
Once the Knowledge Graph is built, deploy a retriever and query it with AutoRAG.
Embed-only workflow
Use this path when you already have documents in ArangoDB and only need vector embeddings and a search index on one attribute. No import or corpus build is required.
GET /v1/healthPOST /v1/embed-field-in-collection- add vector embeddings to an existing ArangoDB collection. Repeat per(collection, field)pair. See Embeddings.
Adding a category to an existing corpus
Follow the standard workflow, but in step 3 list only the new category in
categories and leave incremental at its default of false. The existing
categories are left untouched.
Use incremental: true only to append documents to a category that already
exists. A full rebuild of an already built category is rejected with
REBUILD_NOT_ALLOWED, see Corpus Build.
Rebuilding a category
There is no in-place rebuild. To rebuild a category from scratch, remove it with
DELETE /v1/projects/{project}/categories/{category},
then run a corpus build, the strategizer, and an orchestration again. This is
also the supported recovery path for a partition that imported incompletely.
Document-level changes to an existing graph
Use these calls if the corpus graph is already built and you only want to change individual documents. See Incremental Graph Updates for the prerequisites, a comparison with a rebuild, and the full endpoint reference.
- Call
POST /v1/graph/insert,/v1/graph/delete, or/v1/graph/update, depending on what changed. Insert and update only cover Layers 1 and 2. Delete is synchronous and removes the Layer 3 data itself. - After an insert or a successful update, call
POST /v1/orchestratewith thefile_idsof the changed documents, so that Layer 3 contains the new content. A non-emptyfile_idsalso skips the stale-partition filter, so a partition that is already imported stays eligible. - Check
divergence_scoreandneeds_reclusteringin thejobsofGET /v1/orchestrate/{id}. Insert and update responses do not report them. After a delete, they are on each file’s result if itsoverall_statusisCOMMITTED. - (Optional) Call
POST /v1/graph/reclusterif the flag istrueand you want to refresh the communities. Reclustering is never automatic.
Ordering rules
- Do not call
POST /v1/rag-strategizer/analyzeuntil the corpus build reachesstatus: completed. - Do not call
POST /v1/orchestrateuntil the strategizer has finished after a successful build. - Do not call the
/v1/graph/*endpoints before the initial corpus build has finished. - Only one corpus build, orchestration run, or graph update can be active at a
time. If they overlap, you get a
409. POST /v1/orchestratereturns409when every category with strategies is already in the knowledge graph. That is a successful steady state, not a failure, see Telling the three409responses apart.DELETE /v1/projects/{project}/categories/{category}andPATCH /v1/rag-strategizer/strategy/{cluster_id}also return409while a build or an orchestration is running.
For guidance on structuring your data with categories, see the Design Guide.
Workflow examples
Knowledge graph build
This example drives the build from File Manager categories. The direct upload
with POST /v1/import-multiple, and a corpus build without a selector, are
deprecated (see Import Files).
# Step 1: Health check
curl -H "Authorization: Bearer <token>" http://localhost:8080/v1/health
# Step 2: Build the corpus for the categories you uploaded to the File Manager.
# Returns 202 with corpus_build_id and graph_name.
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{
"embedding_strategy": "first_chunk",
"categories": ["legal", "finance"],
"strategy": { "top_k": 7, "cluster_threshold": 2 }
}' \
http://localhost:8080/v1/corpus/builds
# Step 3: Monitor build progress. Poll until status is completed or failed, and
# check error_code even on a completed build.
curl -H "Authorization: Bearer <token>" \
http://localhost:8080/v1/corpus/builds/<corpus_build_id>
# Step 4: Analyze the clusters. Returns 202 with strategize_job_id.
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{"project": "my_project", "complexity": "high"}' \
http://localhost:8080/v1/rag-strategizer/analyze
# Step 5: Monitor the strategizer job
curl -H "Authorization: Bearer <token>" \
http://localhost:8080/v1/rag-strategizer/jobs/<strategize_job_id>
# Step 6: Review the strategies
curl -H "Authorization: Bearer <token>" \
http://localhost:8080/v1/rag-strategizer/strategy
# Step 7: Start the orchestration. Returns 202 with orchestration_id.
# A 409 here means every eligible category is already in the knowledge graph.
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{"project": "my_project", "replicas": 2, "max_retries": 3}' \
http://localhost:8080/v1/orchestrate
# Step 8: Monitor the orchestration
curl -H "Authorization: Bearer <token>" \
http://localhost:8080/v1/orchestrate/<orchestration_id>
Checking the project state
curl -H "Authorization: Bearer <token>" \
http://localhost:8080/v1/projects/my_project/overview
Removing a category
# Graph cleanup and file deletion. delete_files is a query parameter.
curl -X DELETE \
-H "Authorization: Bearer <token>" \
"http://localhost:8080/v1/projects/my_project/categories/legal?delete_files=true"
Field embedding on an existing collection
Use this when you already have documents in ArangoDB and only need vector embeddings and a search index on one attribute. No import or corpus build is required.
# Health check
curl -H "Authorization: Bearer <token>" http://localhost:8080/v1/health
# Embed one field (collection must exist; field must not end with _embedding)
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{"collection": "my_collection", "field": "content"}' \
http://localhost:8080/v1/embed-field-in-collection
Learn more
- LLM Configuration: Configure the chat and embedding providers the service calls.
- Incremental Graph Updates: Insert, delete, and replace individual documents in a graph that is already built.
- Document conversion and the File Parser: What the parser extracts from each format and how to size it.
- The Importer: The worker that builds the Knowledge
Graph, and the parameters you can pass to it through
importer_env. - Architecture: The three-layer knowledge graph architecture and the resulting collections.
- Design Guide: How to structure your data with categories, layers, and components.
- Use Cases: Real-world enterprise applications and business impact metrics.
For the machine-readable API, see the AutoGraph API Reference .
