| import gradio as gr |
|
|
| README = """ |
| # BrainCore pgvector Starter |
| |
| A safe-by-default Postgres and pgvector memory architecture starter for AI agents. |
| |
| This Space is a lightweight landing page for the code starter. Clone the repo to run the FastAPI service and Postgres stack locally. |
| |
| ```bash |
| git clone https://huggingface.co/spaces/trentdoney/braincore-pgvector-starter |
| cd braincore-pgvector-starter |
| docker compose up -d |
| python -m venv .venv |
| source .venv/bin/activate |
| pip install -r requirements.txt |
| uvicorn app.main:app --reload |
| ``` |
| |
| ## Included |
| |
| - FastAPI endpoints: `POST /write_memory` and `POST /search_memory` |
| - Postgres + pgvector schema for sources, memory items, events, retrieval logs, and trust classes |
| - Docker Compose quickstart |
| - Synthetic public-safe seed data |
| - Security notes for provenance, tenant isolation, trust classes, and public/restricted memory boundaries |
| |
| ## Related BrainCore Collective Assets |
| |
| - [Agent Memory Research Corpus](https://huggingface.co/datasets/trentdoney/agent-memory-research-corpus) |
| - [Memory Explorer Space](https://huggingface.co/spaces/trentdoney/memory-explorer-space) |
| - [BrainCore Memory Benchmark](https://huggingface.co/datasets/trentdoney/braincore-memory-benchmark) |
| - [LoRA Caption Quality Checker](https://huggingface.co/spaces/trentdoney/lora-caption-quality-checker) |
| |
| This starter is educational and not production-ready. Add authentication, row-level security, TLS, backups, and real embeddings before production use. |
| """ |
|
|
| with gr.Blocks(title="BrainCore pgvector Starter") as demo: |
| gr.Markdown(README) |
|
|
| if __name__ == "__main__": |
| demo.launch() |
|
|