Skip to content

Commit c8c7603

Browse files
authored
feat(doc): add new config options and supported providers (#84)
1 parent 787ed60 commit c8c7603

5 files changed

Lines changed: 2761 additions & 2636 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \
8181
ghcr.io/vectorize-io/hindsight:latest
8282
```
8383

84-
You can modify the LLM provider by setting `HINDSIGHT_API_LLM_PROVIDER`. Valid options are `gemini`, `groq`, `ollama`, and `openai`. The documentation provides more details on [supported models](https://hindsight.vectorize.io/developer/models).
84+
You can modify the LLM provider by setting `HINDSIGHT_API_LLM_PROVIDER`. Valid options are `openai`, `anthropic`, `gemini`, `groq`, `ollama`, and `lmstudio`. The documentation provides more details on [supported models](https://hindsight.vectorize.io/developer/models).
8585

8686
API: http://localhost:8888
8787
UI: http://localhost:9999

hindsight-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Configure via environment variables:
8080
| Variable | Description | Default |
8181
|----------|-------------|---------|
8282
| `HINDSIGHT_API_DATABASE_URL` | PostgreSQL connection string | `pg0` (embedded) |
83-
| `HINDSIGHT_API_LLM_PROVIDER` | `openai`, `groq`, `gemini`, `ollama` | `openai` |
83+
| `HINDSIGHT_API_LLM_PROVIDER` | `openai`, `anthropic`, `gemini`, `groq`, `ollama`, `lmstudio` | `openai` |
8484
| `HINDSIGHT_API_LLM_API_KEY` | API key for LLM provider | - |
8585
| `HINDSIGHT_API_LLM_MODEL` | Model name | `gpt-4o-mini` |
8686
| `HINDSIGHT_API_HOST` | Server bind address | `0.0.0.0` |

hindsight-docs/docs/developer/configuration.md

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ If not provided, the server uses embedded `pg0` — convenient for development b
2727

2828
| Variable | Description | Default |
2929
|----------|-------------|---------|
30-
| `HINDSIGHT_API_LLM_PROVIDER` | Provider: `groq`, `openai`, `gemini`, `ollama` | `openai` |
30+
| `HINDSIGHT_API_LLM_PROVIDER` | Provider: `openai`, `anthropic`, `gemini`, `groq`, `ollama`, `lmstudio` | `openai` |
3131
| `HINDSIGHT_API_LLM_API_KEY` | API key for LLM provider | - |
3232
| `HINDSIGHT_API_LLM_MODEL` | Model name | `gpt-5-mini` |
3333
| `HINDSIGHT_API_LLM_BASE_URL` | Custom LLM endpoint | Provider default |
34+
| `HINDSIGHT_API_LLM_MAX_CONCURRENT` | Max concurrent LLM requests | `32` |
35+
| `HINDSIGHT_API_LLM_TIMEOUT` | LLM request timeout in seconds | `120` |
3436

3537
**Provider Examples**
3638

@@ -50,10 +52,20 @@ export HINDSIGHT_API_LLM_PROVIDER=gemini
5052
export HINDSIGHT_API_LLM_API_KEY=xxxxxxxxxxxx
5153
export HINDSIGHT_API_LLM_MODEL=gemini-2.0-flash
5254

55+
# Anthropic
56+
export HINDSIGHT_API_LLM_PROVIDER=anthropic
57+
export HINDSIGHT_API_LLM_API_KEY=sk-ant-xxxxxxxxxxxx
58+
export HINDSIGHT_API_LLM_MODEL=claude-sonnet-4-20250514
59+
5360
# Ollama (local, no API key)
5461
export HINDSIGHT_API_LLM_PROVIDER=ollama
5562
export HINDSIGHT_API_LLM_BASE_URL=http://localhost:11434/v1
56-
export HINDSIGHT_API_LLM_MODEL=gpt-oss-20b
63+
export HINDSIGHT_API_LLM_MODEL=llama3
64+
65+
# LM Studio (local, no API key)
66+
export HINDSIGHT_API_LLM_PROVIDER=lmstudio
67+
export HINDSIGHT_API_LLM_BASE_URL=http://localhost:1234/v1
68+
export HINDSIGHT_API_LLM_MODEL=your-local-model
5769

5870
# OpenAI-compatible endpoint
5971
export HINDSIGHT_API_LLM_PROVIDER=openai
@@ -109,7 +121,43 @@ export HINDSIGHT_API_RERANKER_TEI_URL=http://localhost:8081
109121
| `HINDSIGHT_API_HOST` | Bind address | `0.0.0.0` |
110122
| `HINDSIGHT_API_PORT` | Server port | `8888` |
111123
| `HINDSIGHT_API_LOG_LEVEL` | Log level: `debug`, `info`, `warning`, `error` | `info` |
112-
| `HINDSIGHT_API_MCP_ENABLED` | Enable MCP server | `true` |
124+
| `HINDSIGHT_API_MCP_ENABLED` | Enable MCP server at `/mcp/{bank_id}/` | `true` |
125+
126+
### Retrieval
127+
128+
| Variable | Description | Default |
129+
|----------|-------------|---------|
130+
| `HINDSIGHT_API_GRAPH_RETRIEVER` | Graph retrieval algorithm: `bfs` or `mpfp` | `bfs` |
131+
132+
### Entity Observations
133+
134+
Controls when the system generates entity observations (summaries about entities mentioned in retained content).
135+
136+
| Variable | Description | Default |
137+
|----------|-------------|---------|
138+
| `HINDSIGHT_API_OBSERVATION_MIN_FACTS` | Minimum facts about an entity before generating observations | `5` |
139+
| `HINDSIGHT_API_OBSERVATION_TOP_ENTITIES` | Max entities to process per retain batch | `5` |
140+
141+
### Local MCP Server
142+
143+
Configuration for the local MCP server (`hindsight-local-mcp` command).
144+
145+
| Variable | Description | Default |
146+
|----------|-------------|---------|
147+
| `HINDSIGHT_API_MCP_LOCAL_BANK_ID` | Memory bank ID for local MCP | `mcp` |
148+
| `HINDSIGHT_API_MCP_INSTRUCTIONS` | Additional instructions appended to retain/recall tool descriptions | - |
149+
150+
```bash
151+
# Example: instruct MCP to also store assistant actions
152+
export HINDSIGHT_API_MCP_INSTRUCTIONS="Also store every action you take, including tool calls and decisions made."
153+
```
154+
155+
### Performance Optimization
156+
157+
| Variable | Description | Default |
158+
|----------|-------------|---------|
159+
| `HINDSIGHT_API_SKIP_LLM_VERIFICATION` | Skip LLM connection check on startup | `false` |
160+
| `HINDSIGHT_API_LAZY_RERANKER` | Lazy-load reranker model (faster startup) | `false` |
113161

114162
### Programmatic Configuration
115163

hindsight-docs/docs/developer/models.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ All local models (embedding, cross-encoder) are automatically downloaded from Hu
1818

1919
Used for fact extraction, entity resolution, opinion generation, and answer synthesis.
2020

21-
**Supported providers:** OpenAI, Gemini, Groq, Ollama, and **any OpenAI-compatible API**
21+
**Supported providers:** OpenAI, Anthropic, Gemini, Groq, Ollama, LM Studio, and **any OpenAI-compatible API**
2222

2323
:::tip OpenAI-Compatible Providers
2424
Hindsight works with any provider that exposes an OpenAI-compatible API (e.g., Azure OpenAI). Simply set `HINDSIGHT_API_LLM_PROVIDER=openai` and configure `HINDSIGHT_API_LLM_BASE_URL` to point to your provider's endpoint.
@@ -39,6 +39,8 @@ The following models have been tested and verified to work correctly with Hindsi
3939
| **OpenAI** | `gpt-4.1-mini` |
4040
| **OpenAI** | `gpt-4.1-nano` |
4141
| **OpenAI** | `gpt-4o-mini` |
42+
| **Anthropic** | `claude-sonnet-4-20250514` |
43+
| **Anthropic** | `claude-3-5-sonnet-20241022` |
4244
| **Gemini** | `gemini-3-pro-preview` |
4345
| **Gemini** | `gemini-2.5-flash` |
4446
| **Gemini** | `gemini-2.5-flash-lite` |
@@ -67,10 +69,20 @@ export HINDSIGHT_API_LLM_PROVIDER=gemini
6769
export HINDSIGHT_API_LLM_API_KEY=xxxxxxxxxxxx
6870
export HINDSIGHT_API_LLM_MODEL=gemini-2.0-flash
6971

72+
# Anthropic
73+
export HINDSIGHT_API_LLM_PROVIDER=anthropic
74+
export HINDSIGHT_API_LLM_API_KEY=sk-ant-xxxxxxxxxxxx
75+
export HINDSIGHT_API_LLM_MODEL=claude-sonnet-4-20250514
76+
7077
# Ollama (local)
7178
export HINDSIGHT_API_LLM_PROVIDER=ollama
7279
export HINDSIGHT_API_LLM_BASE_URL=http://localhost:11434/v1
73-
export HINDSIGHT_API_LLM_MODEL=gpt-oss-20b
80+
export HINDSIGHT_API_LLM_MODEL=llama3
81+
82+
# LM Studio (local)
83+
export HINDSIGHT_API_LLM_PROVIDER=lmstudio
84+
export HINDSIGHT_API_LLM_BASE_URL=http://localhost:1234/v1
85+
export HINDSIGHT_API_LLM_MODEL=your-local-model
7486
```
7587

7688
**Note:** The LLM is the primary bottleneck for retain operations. See [Performance](./performance) for optimization strategies.

0 commit comments

Comments
 (0)