> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vrin.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Commands

> Insert, upload, and manage content in your VRIN knowledge base

## vrin insert

Insert text content into the knowledge base. VRIN automatically chunks the text, extracts structured facts, and indexes everything in the knowledge graph.

```bash theme={null}
vrin insert "ACME Corp reported $50M revenue in Q4 2025, up 23% YoY." --title "ACME Q4"
```

### Options

| Flag                 | Short | Default      | Description                                       |
| -------------------- | ----- | ------------ | ------------------------------------------------- |
| `--title`            | `-t`  | `"Untitled"` | Document title                                    |
| `--tag`              |       |              | Tags (repeatable: `--tag finance --tag earnings`) |
| `--metadata`         |       |              | Metadata as JSON string                           |
| `--wait / --no-wait` |       | `--wait`     | Wait for processing to complete                   |
| `--dry-run`          |       | `false`      | Show payload without sending                      |
| `--json`             |       |              | Force JSON output                                 |

### Async mode

By default, `insert` waits for fact extraction to complete. Use `--no-wait` to get a job ID immediately:

```bash theme={null}
vrin insert "long document content..." --title "Report" --no-wait --json
# {"ok": true, "data": {"job_id": "job_abc123"}}

# Check status later
vrin job job_abc123
```

### Tags and metadata

```bash theme={null}
vrin insert "content" \
  --title "Q4 Earnings" \
  --tag finance \
  --tag quarterly \
  --metadata '{"source": "SEC filing", "period": "Q4 2025"}'
```

***

## vrin upload

Upload a file to the knowledge base. Supports PDF, CSV, TXT, MD, and DOCX.

```bash theme={null}
vrin upload ./earnings_report.pdf
```

### Options

| Flag                                     | Default            | Description                             |
| ---------------------------------------- | ------------------ | --------------------------------------- |
| `--save-to-memory / --no-save-to-memory` | `--save-to-memory` | Persist extracted knowledge permanently |
| `--wait / --no-wait`                     | `--wait`           | Wait for processing to complete         |
| `--json`                                 |                    | Force JSON output                       |

### Examples

```bash theme={null}
# Upload and wait for processing
vrin upload ./report.pdf

# Upload without waiting
vrin upload ./report.pdf --no-wait --json
# {"ok": true, "data": {"job_id": "job_xyz789"}}

# Upload for temporary analysis (not persisted)
vrin upload ./draft.pdf --no-save-to-memory
```

***

## vrin bulk-insert

Insert multiple items from a JSON file. Uses adaptive concurrency for fast batch processing.

```bash theme={null}
vrin bulk-insert ./papers.json
```

### Input format

The JSON file must contain an array of objects:

```json theme={null}
[
  {
    "content": "First document text...",
    "title": "Document 1",
    "tags": ["research"],
    "metadata": {"author": "Smith"}
  },
  {
    "content": "Second document text...",
    "title": "Document 2"
  }
]
```

Only `content` is required. `title`, `tags`, and `metadata` are optional.

### Options

| Flag                | Default | Description                              |
| ------------------- | ------- | ---------------------------------------- |
| `--concurrency`     | `8`     | Initial concurrent workers               |
| `--max-concurrency` | `25`    | Maximum concurrent workers (auto-scales) |
| `--tag`             |         | Default tags applied to all items        |
| `--json`            |         | Force JSON output                        |

### Example

```bash theme={null}
# Insert 100 research papers with progress output
vrin bulk-insert ./papers.json --tag research --tag 2025

# Output:
# [1/100] completed: Adaptive-RAG: Learning to Adapt...
# [2/100] completed: Self-RAG: Learning to Retrieve...
# ...
```

***

## vrin job

Check the status of an async job (from `--no-wait` inserts or uploads).

```bash theme={null}
vrin job job_abc123
```

### Options

| Flag     | Description                  |
| -------- | ---------------------------- |
| `--wait` | Poll until the job completes |
| `--json` | Force JSON output            |

### Example

```bash theme={null}
# Check once
vrin job job_abc123 --json
# {"ok": true, "data": {"status": "processing", "progress": 0.6}}

# Wait for completion
vrin job job_abc123 --wait --json
# {"ok": true, "data": {"status": "completed", "facts_extracted": 47}}
```
