Arango logo

AutoGraph HTTP API reference

The HTTP API of the AutoGraph service: corpus build, RAG Strategizer, and orchestration

Agentic AI Suite

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):

POST https://<EXTERNAL_ENDPOINT>:8529/_platform/acp/v1/autograph

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

KeyNotes
db_nameArangoDB database holding the project.
genai_project_nameProject name. Prefixes every collection and has to match the project field of API calls.
fps_recovery_usernameArangoDB 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_provideropenai or custom.
embedding_api_provideropenai or custom.
chat_secret_profile_id or chat_api_keyRequired for openai and custom. Prefer the secret profile.
embedding_secret_profile_id or embedding_api_keyRequired for openai and custom. Prefer the secret profile.
chat_api_url / embedding_api_urlRequired for custom; optional for openai.

Common optional keys

KeyDefaultNotes
chat_modelgpt-5.4-nano
embedding_modeltext-embedding-3-smallFixed for the life of the project.
embedding_dim512Embedding vector width. Has to match the output dimension of the embedding model.
multimodal_modelunsetForwarded to the Importer for image extraction.
embedding_api_keysfalls back to the single keyComma-separated pool, used round-robin.
embedding_concurrency10Starting concurrency; adapts upward when unset.
chunk_size1200Tokens 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: .pdf files including scanned documents, read using OCR
  • Office documents: .doc, .docx, .ppt, and .pptx files
  • Plain text: .txt and .md files

For the per-format detail and for how to size the parser on a self-hosted cluster, see Document conversion and the File Parser.

Parsing runs on CPU. Throughput for large-scale ingestion of PDF and Office documents is governed by how many File Parser worker pods your node pool can support, not by GPU availability. Parsing PDFs is by far the most expensive operation, because every page without a text layer has to be read using OCR. See Tuning the File Parser if a self-hosted cluster is slower than you expect.
A document has to yield extractable text. An image-only PDF without OCR-readable content fails as a single file, and the build can still complete with 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).

Field names are lowerCamelCase over HTTP. This reference spells field names in snake_case, such as 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

MethodPathDescriptionDetails
GET/v1/healthCheck service readiness-
POST/v1/corpus/buildsStart a corpus buildCorpus Build
GET/v1/corpus/builds/{id}Monitor build progressCorpus Build
POST/v1/rag-strategizer/analyzeAssign RAG strategies to clustersRAG Strategizer
GET/v1/rag-strategizer/jobs/{id}Monitor a strategizer runRAG Strategizer
GET/v1/rag-strategizer/strategyInspect assigned strategiesRAG Strategizer
PATCH/v1/rag-strategizer/strategy/{cluster_id}Override the strategy of one clusterRAG Strategizer
POST/v1/orchestrateBuild the knowledge graphGraph Operations
GET/v1/orchestrate/{id}Monitor an orchestration and read the partition divergenceGraph Operations
DELETE/v1/orchestrate/{id}Cancel a running orchestrationGraph Operations
POST/v1/import-multipleDeprecated. Direct upload of documents with module labels, superseded by the File ManagerImport Files

Document-level changes

MethodPathDescriptionDetails
POST/v1/graph/insertAdd a document to a knowledge graph that is already builtGraph Operations
POST/v1/graph/deleteRemove a document from the graphGraph Operations
POST/v1/graph/updateReplace the content of an existing documentGraph Operations
POST/v1/graph/reclusterRebuild the Layer 3 communities of a partitionGraph Operations

Project operations

MethodPathDescriptionDetails
GET/v1/projects/{project}/overviewRead the whole project state in one callProject Operations
PUT/v1/projects/{project}/model-config/credentialsSet the chat and embedding configurationProject Operations
DELETE/v1/projects/{project}/categories/{category}Remove a category and its graph dataProject Operations
DELETE/v1/projects/{project}Tear down the whole projectProject Operations

Standalone

MethodPathDescriptionDetails
POST/v1/embed-field-in-collectionAdd embeddings to an existing collectionEmbeddings

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

  1. GET /v1/health - confirm the service is ready.
  2. Upload the documents to the File Manager under the scope [project, category]. The direct upload with POST /v1/import-multiple is deprecated. See Import Files.
  3. POST /v1/corpus/builds - start the corpus build, preferably with categories. Returns 202 with a corpus_build_id and the graph_name. See Corpus Build.
  4. Poll GET /v1/corpus/builds/{corpus_build_id} until status is completed. Check error_code even then, because a non-empty value on a completed build means a partial success. See Monitoring Build Status.
  5. POST /v1/rag-strategizer/analyze - assign RAG strategies to clusters. project and complexity are required. Returns 202 with a strategize_job_id. See RAG Strategizer.
  6. Poll GET /v1/rag-strategizer/jobs/{strategize_job_id} until status is completed. See Monitor a strategizer job.
  7. (Optional) GET /v1/rag-strategizer/strategy - inspect the assigned strategies. See Retrieve RAG Strategies.
  8. (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.
  9. POST /v1/orchestrate - spawn Importer workers to build the knowledge graph. Returns 202 with an orchestration_id. See Trigger Orchestration.
  10. Poll GET /v1/orchestrate/{orchestration_id}. Branch on status, which reaches completed only once every job is terminal and the imported partitions were found in the knowledge graph, and render phase as 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.

  1. GET /v1/health
  2. POST /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.

  1. 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.
  2. After an insert or a successful update, call POST /v1/orchestrate with the file_ids of the changed documents, so that Layer 3 contains the new content. A non-empty file_ids also skips the stale-partition filter, so a partition that is already imported stays eligible.
  3. Check divergence_score and needs_reclustering in the jobs of GET /v1/orchestrate/{id}. Insert and update responses do not report them. After a delete, they are on each file’s result if its overall_status is COMMITTED.
  4. (Optional) Call POST /v1/graph/recluster if the flag is true and you want to refresh the communities. Reclustering is never automatic.

Ordering rules

  • Do not call POST /v1/rag-strategizer/analyze until the corpus build reaches status: completed.
  • Do not call POST /v1/orchestrate until 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/orchestrate returns 409 when every category with strategies is already in the knowledge graph. That is a successful steady state, not a failure, see Telling the three 409 responses apart.
  • DELETE /v1/projects/{project}/categories/{category} and PATCH /v1/rag-strategizer/strategy/{cluster_id} also return 409 while 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 .