API reference

Repositories

Manage the repositories the agents can work on. Indexation creates the code map and embeddings that power the Locator.

What this resource does

A repository in this system is a clone of a GitHub repository plus its derived artefacts: the structural code map persisted in Postgres and the embeddings stored in Qdrant. Source code itself is never persisted.

The endpoints below cover the full lifecycle: adding a repo (which triggers indexation), listing repos, fetching detail, streaming indexation progress, re-indexing and deleting.

Endpoints

get/api/repos

List Repos

Responses

  • 200Successful Response
    [
      {
        "id": "string",
        "forge": "string",
        "forge_repo_id": "string",
        "owner": "string",
        "name": "string",
        "full_name": "string",
        "default_branch": "string",
        "indexed_branch": "string",
        "index_status": "string",
        "indexed_at": "2026-01-01T00:00:00.000Z",
        "files_count": 0,
        "symbols_count": 0,
        "edges_count": 0,
        "embedding_tokens": 0,
        "detected_languages": [
          "string"
        ],
        "detected_frameworks": [
          "string"
        ],
        "created_at": "2026-01-01T00:00:00.000Z"
      }
    ]
  • 422Validation Error
post/api/repos

Add Repo

Request body

NameTypeDescription
forgestring—
forge_repo_idRequiredstring—
ownerRequiredstring—
nameRequiredstring—
full_nameRequiredstring—
default_branchstring—
indexed_branchstring | null—
ado_projectstring | null—
Example
{
  "forge": "github",
  "forge_repo_id": "string",
  "owner": "string",
  "name": "string",
  "full_name": "string",
  "default_branch": "main",
  "indexed_branch": "string",
  "ado_project": "string"
}

Responses

  • 201Successful Response
    {
      "id": "string",
      "forge": "string",
      "forge_repo_id": "string",
      "owner": "string",
      "name": "string",
      "full_name": "string",
      "default_branch": "string",
      "indexed_branch": "string",
      "index_status": "string",
      "indexed_at": "2026-01-01T00:00:00.000Z",
      "files_count": 0,
      "symbols_count": 0,
      "edges_count": 0,
      "embedding_tokens": 0,
      "detected_languages": [
        "string"
      ],
      "detected_frameworks": [
        "string"
      ],
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  • 422Validation Error
get/api/repos/{repo_id}

Get Repo

Path parameters

NameTypeDescription
repo_idRequiredstring—

Responses

  • 200Successful Response
    {
      "id": "string",
      "forge": "string",
      "forge_repo_id": "string",
      "owner": "string",
      "name": "string",
      "full_name": "string",
      "default_branch": "string",
      "indexed_branch": "string",
      "index_status": "string",
      "indexed_at": "2026-01-01T00:00:00.000Z",
      "files_count": 0,
      "symbols_count": 0,
      "edges_count": 0,
      "embedding_tokens": 0,
      "detected_languages": [
        "string"
      ],
      "detected_frameworks": [
        "string"
      ],
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  • 422Validation Error
delete/api/repos/{repo_id}

Delete Repo

Path parameters

NameTypeDescription
repo_idRequiredstring—

Responses

  • 204Successful Response
  • 422Validation Error
get/api/repos/{repo_id}/status

Repo Indexing Status

Path parameters

NameTypeDescription
repo_idRequiredstring—

Responses

  • 200Successful Response
    {}
  • 422Validation Error
post/api/repos/{repo_id}/reindex

Reindex Repo

Path parameters

NameTypeDescription
repo_idRequiredstring—

Responses

  • 200Successful Response
    {
      "id": "string",
      "forge": "string",
      "forge_repo_id": "string",
      "owner": "string",
      "name": "string",
      "full_name": "string",
      "default_branch": "string",
      "indexed_branch": "string",
      "index_status": "string",
      "indexed_at": "2026-01-01T00:00:00.000Z",
      "files_count": 0,
      "symbols_count": 0,
      "edges_count": 0,
      "embedding_tokens": 0,
      "detected_languages": [
        "string"
      ],
      "detected_frameworks": [
        "string"
      ],
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  • 422Validation Error
post/api/repos/{repo_id}/import-issues

Import Forge Issues

Manual "refresh" that pulls a repo's OPEN issues into our table as `pending` issues WITHOUT starting the pipeline. Idempotent: issues whose number already exists for this repo are skipped, so the button is safe to press repeatedly. The user later runs the pipeline on the ones they choose. (There is no webhook/sync in the MVP — this is the on-demand alternative.) It reads the forge off the repository row and goes through the adapter, so it has always worked for both forges; only its name said otherwise. Azure DevOps answers with its story-level work items and bugs — never Tasks, see `AdoForgeAdapter._story_work_item_types`.

Path parameters

NameTypeDescription
repo_idRequiredstring—

Responses

  • 200Successful Response
    {
      "imported": 0,
      "skipped": 0
    }
  • 422Validation Error
get/api/repos/{repo_id}/graph

Repo Dependency Graph

The most connected files of a repo and the edges between them. Files rather than symbols: a mid-sized repo indexes hundreds of symbols, which is more than a navigable graph can carry.

Path parameters

NameTypeDescription
repo_idRequiredstring—

Query parameters

NameTypeDescription
limitintegerHow many of the most connected files to return.

Responses

  • 200Successful Response
    {
      "nodes": [
        {
          "file_path": "string",
          "language": "string",
          "symbol_count": 0,
          "incoming": 0,
          "outgoing": 0
        }
      ],
      "edges": [
        {
          "source": "string",
          "target": "string",
          "weight": 0,
          "edge_type": "string"
        }
      ],
      "total_files": 0,
      "total_symbols": 0,
      "total_edges": 0
    }
  • 422Validation Error
get/api/repos/{repo_id}/files/{file_path}/symbols

Repo File Symbols

What the indexer extracted from one file, plus its neighbours. `file_path` is a path converter — source paths contain slashes, and a plain string parameter would only ever match the first segment.

Path parameters

NameTypeDescription
repo_idRequiredstring—
file_pathRequiredstring—

Responses

  • 200Successful Response
    {
      "file_path": "string",
      "symbols": [
        {
          "symbol_name": "string",
          "symbol_type": "string",
          "language": "string",
          "signature": "string",
          "docstring": "string",
          "start_line": 0,
          "end_line": 0
        }
      ],
      "incoming": [
        {
          "file_path": "string",
          "edge_type": "string",
          "weight": 0
        }
      ],
      "outgoing": [
        {
          "file_path": "string",
          "edge_type": "string",
          "weight": 0
        }
      ]
    }
  • 422Validation Error