Imported from OckermanSethGVSU/VECHINI (
AGENTS.md). Install upstream withnpx skills add OckermanSethGVSU/VECHINI. Copyright stays with the author.
Agents Guide for SCVectorDB
This file is a practical operator guide for future Codex runs in this repo. It is not canonical product documentation. Treat it as a current-state map of the tracked workflow files, the active entrypoints, and the main footguns.
Repository Summary
SCVectorDB is a research repo for vector-database experiments on PBS-based HPC systems, plus local harnesses for some engines and post-run graphing utilities.
The active tracked areas are:
pbs_submit_manager.sh: unified top-level submit/generate entrypoint for all enginescommon/: shared schema and submit helpers used by every engineqdrant/: active Qdrant workflow, Rust clients, PBS runtime, local runtime, and summary helpersmilvus/: active Milvus workflow, Go clients, PBS runtime, local runtime, tracing helpers, and summary helpersweaviate/: active Weaviate PBS workflow, Go clients, and sample configsgraphing/: analysis scripts and notebooks for generated outputs
The repo is not a normal library or service with one build or test command. It is a workflow collection with:
- shell-driven orchestration
- schema-backed config expansion
- generated run directories
- site-specific HPC assumptions
- locally built client binaries
- container images or SIF payloads that may not exist in a fresh checkout
Current Mental Model
The current control plane is unified.
You do not start from per-engine submit managers. You start from the repo root:
./pbs_submit_manager.sh --help
./pbs_submit_manager.sh --help --engine qdrant
./pbs_submit_manager.sh --engine milvus --config path/to/run.env
./pbs_submit_manager.sh --generate-only --engine weaviate --config path/to/run.env
The top-level flow is:
pbs_submit_manager.shresolves the selected engine directory.- It sources
common/submit_lib.shplus<engine>/engine.sh. - The engine loads shared schema from
common/schema.shand appends engine-specific schema from<engine>/schema.sh. - Config is assembled from defaults,
--config, and--set KEY=value. - Sweep values expand into one or more parameter combinations.
- For each combo, the manager creates a generated run directory inside the engine directory.
- The engine stages payload files into that run directory.
- The manager writes
submit.shandrun_config.env. - It submits automatically only when
RUN_MODE=PBSand generation succeeds.
There are two distinct layers in this repo:
- tracked source files under version control
- generated run directories and experiment outputs
If the user wants workflow changes, edit tracked source files, not generated run directories.
Active Entry Points
Top level
pbs_submit_manager.sh: single submit/generate entrypoint for Qdrant, Milvus, and Weaviatecommon/submit_lib.sh: shared generation/submission helperscommon/schema.sh: shared variable registry used by all enginescommon/engine_schema_lib.sh: shared schema registry and validation helpers
Qdrant
qdrant/engine.sh: unified-engine contract implementationqdrant/schema.sh: Qdrant-specific variables and defaultsqdrant/main.sh: PBS runtimeqdrant/local_main.sh: local container-backed runtimeqdrant/runtime/cluster/: PBS launch helpersqdrant/scripts/: collection setup, profiling, indexing, summaries, mixed timeline helpersqdrant/utils/: inspect, dependency checks, SIF download, queue helpersqdrant/clients/build.sh: Rust client build helperqdrant/clients/batch_client/: main insert/query Rust clientqdrant/clients/mixed/: mixed insert/query Rust client
Milvus
milvus/engine.sh: unified-engine contract implementationmilvus/schema.sh: Milvus-specific variables and defaultsmilvus/main.sh: PBS runtimemilvus/local_main.sh: local container-backed runtimemilvus/runtime/cluster/: PBS role launchersmilvus/runtime/configs/: staged runtime config payloadsmilvus/scripts/: collection setup, profiling, indexing, bulk import, summariesmilvus/utils/: tracing, status, local standalone, inspect helpersmilvus/clients/build.sh: Go client build helpermilvus/clients/batch_client/: main insert/query Go clientmilvus/clients/mixed/: mixed insert/query Go client
Weaviate
weaviate/engine.sh: unified-engine contract implementationweaviate/schema.sh: Weaviate-specific variables and defaultsweaviate/main.sh: PBS runtimeweaviate/weaviateSetup/: cluster launch and interface mapping helpersweaviate/clients/build_all.sh: convenience build wrapperweaviate/clients/go_client/build.sh: Go client build helperweaviate/clients/go_client/: Weaviate client binaries built from individual*.gomains
Important: the directory is weaviate/, not weaivate/.
Engine Status
Current reality:
qdrant/is active and supports bothRUN_MODE=PBSandRUN_MODE=localmilvus/is active and supports bothRUN_MODE=PBSandRUN_MODE=localweaviate/is active under the unified manager, but it currently stages PBS runs only
Do not assume older docs or stale scripts are authoritative if they conflict with engine.sh, schema.sh, or main.sh.
Config Model
Config is schema-driven.
Common variables live in common/schema.sh. Engine-specific variables live in each engine schema.sh.
Typical config inputs:
--config path/to/file.env--set KEY=value- environment overrides translated by the submit layer
Config files are plain env-style KEY=value files. Important shared variables include:
TASKRUN_MODEPLATFORMfor PBS runsNODESCORESSTORAGE_MEDIUMACCOUNT,QUEUE,WALLTIMEfor PBS runsENV_PATHorALLOW_SYSTEM_PYTHON=Truefor PBS Python activationVECTOR_DIMDISTANCE_METRICINSERT_DATA_FILEPATHINSERT_CORPUS_SIZEINSERT_BATCH_SIZEQUERY_DATA_FILEPATHQUERY_CORPUS_SIZEQUERY_BATCH_SIZE
When diagnosing config issues, inspect these files first:
common/schema.sh<engine>/schema.sh<engine>/engine.sh
Those files are the truth for required variables, choices, and runtime staging.
Per-Engine Notes
Qdrant
Current Qdrant tasks in active runtime paths:
INSERTINDEXQUERYMIXEDLAUNCHin local and PBS runtime control flow
Operational notes:
qdrant/engine.shenforcesENV_PATHfor PBS unlessALLOW_SYSTEM_PYTHON=True- PBS runs require
QDRANT_SIFas a filename underqdrant/sifs/ - local runs use
qdrant/local_main.shand a Docker or Podman Qdrant container - mixed runs derive
INSERT_START_IDfromRESTORE_DIR,INSERT_CORPUS_SIZE, orINSERT_DATA_FILEPATHif needed - generated run directories often contain
runtime_state/,uploadNPY/,queryNPY/,clientTiming/, andsystemStats/
Build targets:
cd qdrant/clients
./build.sh batch_client
./build.sh mixed
Milvus
Current Milvus tasks in active runtime paths:
INSERTINDEXQUERYIMPORTMIXED
Operational notes:
milvus/engine.shenforcesENV_PATHfor PBS unlessALLOW_SYSTEM_PYTHON=TrueMODEcan beSTANDALONEorDISTRIBUTEDMINIO_MODEis derived automatically when unset:strippedfor distributed,offotherwiseETCD_MEDIUMdefaults toSTORAGE_MEDIUMwhen unset- bulk ingest is controlled by
INSERT_METHOD,BULK_UPLOAD_TRANSPORT, andBULK_UPLOAD_STAGING_MEDIUM - mixed runs also derive
INSERT_START_IDwhen possible - tracing goes through
milvus/utils/launch_otel.shwhenTRACING=True
Build targets:
cd milvus/clients
./build.sh batch_client
./build.sh mixed
Weaviate
Current Weaviate tasks in active runtime paths:
INSERTINDEXQUERY_BSQUERY_COREQUERY_SCALING
Operational notes:
weaviate/main.shis PBS-only in current tracked workflow- the engine stages selected binaries from
weaviate/clients/go_client/ - for
QUERY_SCALING, two binaries must already exist:INSERT_BINandQUERY_SCALING_BIN - the launcher pulls the upstream Weaviate container inline via Apptainer; there is no local
download_sif.sh PLATFORM=AURORAis the currently supported platform path inweaviate/main.sh
Build targets:
cd weaviate/clients
./build_all.sh
./go_client/build.sh query
./go_client/build.sh insert_streaming query
Generated Artifacts and Dirty Trees
This repo frequently has untracked or generated experiment output. Expect dirty trees.
Common examples:
- generated run directories inside
qdrant/,milvus/, orweaviate/ .local/local runtime stateruntime_state/workflow.out,workflow.log,output.loguploadNPY/,queryNPY/,clientTiming/,systemStats/- built client binaries
- container payloads in
sifs/ - notebooks, plots, CSV summaries, and graph outputs under
graphing/
Rules for future agents:
- do not treat generated artifacts as source by default
- do not delete generated artifacts unless the user asked for cleanup
- do not edit generated run directories when the user actually wants source changes
- check
git status --shortbefore editing
HPC Assumptions
Many tracked scripts assume some combination of:
- PBS Pro and
$PBS_NODEFILE mpirun- Apptainer
- site module systems
- Python environments at absolute paths
- DAOS helper scripts on the target cluster
- Aurora- or Polaris-specific runtime behavior
Do not casually replace site-specific absolute paths with placeholders. In this repo, those paths are often part of the real deployment contract.
Validation Strategy
Prefer validation that matches the part of the repo being edited.
Unified submit changes
Inspect:
pbs_submit_manager.shcommon/submit_lib.shcommon/schema.shcommon/engine_schema_lib.sh
Useful checks:
./pbs_submit_manager.sh --help./pbs_submit_manager.sh --help --engine qdrant- generate-only runs against sample configs when they do not require unavailable cluster assets
Qdrant changes
Best local options:
- static inspection of
qdrant/engine.sh,qdrant/main.sh, andqdrant/local_main.sh cargo buildviaqdrant/clients/build.sh
Milvus changes
Best local options:
- static inspection of
milvus/engine.sh,milvus/main.sh, andmilvus/local_main.sh go buildviamilvus/clients/build.sh
Weaviate changes
Best local options:
- static inspection of
weaviate/engine.shandweaviate/main.sh go buildviaweaviate/clients/build_all.shorweaviate/clients/go_client/build.sh
Graphing changes
Best local options:
- run the affected Python scripts against existing outputs if present
- otherwise validate imports and syntax only
When a change depends on PBS, MPI, Aurora, Polaris, Apptainer caches, or site-local files, say so explicitly instead of pretending to validate end to end.
Known Footguns
Current hazards worth remembering:
- old docs or old mental models may still refer to per-engine submit managers; the active flow is now unified through the repo-root
pbs_submit_manager.sh - large generated run directories can live next to source and look deceptively similar
- some helper scripts and dependency checkers may lag behind the active workflow layout
- local binaries may already exist in the tree; do not assume they were just built from current source
milvus/andqdrant/both support local and PBS runtimes;weaviate/does not currently have a local harnessqdrantandmilvusmixed modes rely on auto-derivedINSERT_START_IDbehavior; do not break that path casually- Weaviate client binaries are built in place under
weaviate/clients/go_client/; the engine expects those exact filenames
Safe Editing Strategy
When working in this repo:
- Identify the target area: unified submit path,
qdrant/,milvus/,weaviate/, orgraphing/. - Read the corresponding
README.md,engine.sh,schema.sh, and runtime entrypoint. - Separate tracked source from generated outputs.
- Make the smallest tracked-source change that satisfies the request.
- Validate locally with builds or static checks when possible. Note that this may time out if the machine does not have enough CPU power.
- If cluster-only behavior is involved, call out the validation gap clearly.
Recommended Starting Point for Future Runs
For most tasks:
- Run
git status --short. - Read
README.mdplus the engine-specificREADME.md. - Inspect the relevant
engine.sh,schema.sh, and runtime entrypoint. - Confirm whether the user wants a source change or a generated-run artifact change.
- Prefer editing tracked source files and regenerating behavior through the unified flow.
Status of This Guide
This guide was rewritten to match the current tracked repo layout and unified submit flow on 2026-04-19. Update it again when:
- the unified submit contract changes
- an engine adds or removes local-mode support
- task names or schema variables change
- client build locations move
- major generated artifact conventions change