Skip to content

Commit e92daa9

Browse files
authored
Merge pull request #36 from constructive-io/feat/update-readme-documents
docs: update README for documents table (91 → 95 tables)
2 parents 41578df + 3820614 commit e92daa9

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Once deployed, you can ask your agent questions in plain English and it translat
2525
- *"Find memories from conferences near San Francisco last spring."*
2626
- *"Remember who I met with at the partner summit last month?"*
2727
- *"Show me notes where I wrote about RAG architecture."*
28+
- *"Find all documents from the biz-docs repo tagged 'pitch'."*
2829
- *"Who have I met with more than three times this quarter?"*
2930
- *"What's the latest status on deals tagged `enterprise`?"*
3031

@@ -39,6 +40,7 @@ Conversations, messages, tool calls, long-term memories, rules, skills, prompts,
3940
| Need for an agent | What agentic-db ships |
4041
|---|---|
4142
| Long-term memory | `memories` + agent-scoped `memories` with vector + BM25 + chunked embeddings |
43+
| Documents / CMS | `documents` with chunked embeddings + BM25, repo/path/commit tracking for Git-backed content; junction tables to companies and projects |
4244
| Working memory / conversation state | `conversations` + `messages` + `tool_calls` + `tool_results` |
4345
| Skills / tools registry | `skills`, `tool_definitions`, `tool_executions`, `prompts` (versioned) |
4446
| Behavior rules | `rules` with semantic `trigger_concept` matching |
@@ -72,6 +74,8 @@ It's all in one database, with vector + BM25 + full-text + trigram + PostGIS sea
7274
│ │
7375
│ memories ── autonomy_records ── notes (chunked) │
7476
│ │
77+
│ documents (chunked) ── company_documents ── project_… │
78+
│ │
7579
│ contacts · companies · events · places · emails · … │
7680
│ │
7781
│ [ vector · BM25 · FTS · trigram · PostGIS, unified ] │
@@ -92,8 +96,9 @@ It's all in one database, with vector + BM25 + full-text + trigram + PostGIS sea
9296
- **`autonomy_records`** — self-managed knowledge units the agent writes for itself (goals, notes-to-self, learned facts), with self-referential many-to-many links (`autonomy_record_links`) so the agent builds its own knowledge graph.
9397
- **`notes`** — long-form knowledge with **chunked embeddings**: a single note gets split into multiple vector rows automatically so retrieval works on long documents.
9498
- **Cross-domain memory junctions**`contact_memories`, `company_memories` tie memories to the people/orgs they're about, so the agent can pull "everything I remember about Alice" in one query.
99+
- **Document junctions**`company_documents`, `project_documents` link version-controlled documents to CRM entities.
95100
- **Agent-attributed memories** — every memory can carry an `agent_id` FK so multi-agent setups get isolated or shared memory.
96-
- **Chunk-aware search**`contacts_chunks` and `notes_chunks` let the agent retrieve the *relevant paragraph* of a long record, not the whole record.
101+
- **Chunk-aware search**`contacts_chunks`, `notes_chunks`, and `documents_chunks` let the agent retrieve the *relevant paragraph* of a long record, not the whole record.
97102
- **Tags as first-class citizens**`citext[]` tag columns on every memory-ish table, GIN-indexed, so filtering by `['hackathon','kris-floyd']` is fast.
98103

99104
### 💬 Chats / Conversations
@@ -141,21 +146,22 @@ It's all in one database, with vector + BM25 + full-text + trigram + PostGIS sea
141146
- `memory.nearbyMemories` — self-join, "what else happened near this memory?" (1 km default)
142147

143148
All 5 use `st_dwithin` with a per-query `distance` param, so radius is a query-time input not a schema constant. Each renders server-side as an `EXISTS (… ST_DWithin(geo_a, geo_b, $distance) …)` subquery — zero GeoJSON on the wire.
144-
- **Chunked long-doc retrieval** on contacts and notes.
149+
- **Chunked long-doc retrieval** on contacts, notes, and documents.
145150

146151
### 🌍 World model (context the agent needs to actually help you)
147152

148153
- **CRM**: `contacts` (with denormalized primary email/phone/location + normalized `contact_emails` / `contact_phones` / `contact_addresses` children), `companies`, `deals`, `events`, `venues`, `notes`, `interactions`, `touchpoints`, `tags`, image galleries.
149154
- **Life-OS**: `goals`, `habits`, `activity_logs`, `memories`, `trips`, `places`.
150155
- **Projects & expenses**: `projects`, `expenses`, with cross-relations to contacts, trips, tasks.
156+
- **Documents / CMS**: `documents` — version-controlled files with `repo_name`, `file_path`, `commit_hash` for Git sync; `title`, `content`, `metadata` (jsonb), `tags`. Chunked embeddings via `documents_chunks` for long-doc RAG. Junction tables: `company_documents`, `project_documents`.
151157
- **Email & Calendar**: `email_threads`, `emails`, `email_attachments`, `calendars`, `calendar_events`, `calendar_attendees`, `provider_sync_states` (for Gmail / Google Calendar-style provider sync).
152158
- **Staging tables** (`raw_contacts`, `raw_contact_emails`, etc.) for messy import pipelines before normalizing into `contacts`.
153-
- **~25 cross-domain M:N junctions** so your agent can answer "notes about Alice from the partner summit" without schema gymnastics.
159+
- **~27 cross-domain M:N junctions** so your agent can answer "notes about Alice from the partner summit" or "documents linked to this project" without schema gymnastics.
154160

155161
### ⚙️ Platform / DX
156162

157163
- **One command to deploy**: `pgpm deploy --createdb --database agentic-db --yes --package agentic-db`.
158-
- **[`@agentic-db/sdk`](sdk/sdk)** — Prisma-like typed ORM generated from the GraphQL schema (covers all 91 tables).
164+
- **[`@agentic-db/sdk`](sdk/sdk)** — Prisma-like typed ORM generated from the GraphQL schema (covers all 95 tables).
159165
- **[`@agentic-db/cli`](sdk/cli)** — CRUD + search + admin commands for every table.
160166
- **[`@agentic-db/rag`](packages/rag)** — hybrid search, batch embedding, multi-pass Q&A CLI tools.
161167
- **[`@agentic-db/worker`](packages/worker)** — background embedding worker.
@@ -204,7 +210,7 @@ pgpm init workspace
204210
cd my-app && pgpm init && cd packages/my-module
205211
pgpm install agentic-db
206212

207-
# Create the database and deploy all 91 tables + indexes + triggers
213+
# Create the database and deploy all 95 tables + indexes + triggers
208214
pgpm deploy --createdb --database agentic-db --yes --package agentic-db
209215
```
210216

@@ -363,7 +369,7 @@ cd packages/worker
363369
pnpm run start
364370
```
365371

366-
The worker generates embeddings for all tables with `SearchUnified` or `SearchVector` nodes. Contacts and notes also get chunked embeddings for long-document search.
372+
The worker generates embeddings for all tables with `SearchUnified` or `SearchVector` nodes. Contacts, notes, and documents also get chunked embeddings for long-document search.
367373

368374
## Testing
369375

@@ -386,8 +392,8 @@ This repo ships with [Agent Skills](https://github.com/agent-skills/agent-skills
386392
| Skill | Description |
387393
|-------|-------------|
388394
| `pgpm` | Install and deploy agentic-db using pgpm |
389-
| `cli-default` | CLI command reference for all 91 tables |
390-
| `orm-default` | Type-safe ORM client reference for all 91 tables |
395+
| `cli-default` | CLI command reference for all 95 tables |
396+
| `orm-default` | Type-safe ORM client reference for all 95 tables |
391397
| `agent/memories` | Storing and retrieving long-term agent memories |
392398
| `agent/tasks` | Managing agent task queues |
393399
| `rag-query` | Multi-collection RAG query patterns |

0 commit comments

Comments
 (0)