Skip to content

Commit ee5a2ae

Browse files
committed
docs: clarify yaad is a library embedded in hawk, not a standalone binary
Rewrites the README to reflect that yaad ships no CLI — it is the memory engine consumed by hawk. Adds Library API section, adjusts gitignore for bin/ dist/ build artifacts.
1 parent 3fcab97 commit ee5a2ae

2 files changed

Lines changed: 48 additions & 51 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
/yaad
33
/yaad.exe
44

5+
# Build output (yaad is library-only; any local sample build lands here)
6+
bin/
7+
dist/
8+
59
# Database / local cache
610
elrond*.db
711
*.codegraph.db

README.md

Lines changed: 44 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,20 @@ Every coding agent forgets everything when the session ends.
2626

2727
### The Fix
2828

29-
Add one line to your agent's MCP config:
30-
31-
```json
32-
{ "mcpServers": { "yaad": { "command": "yaad", "args": ["mcp"] } } }
33-
```
34-
35-
Now your agent remembers everything — across sessions, across models, across projects.
36-
37-
---
38-
39-
## 30-Second Setup
40-
41-
```bash
42-
# Install
43-
go install github.com/GrayCodeAI/yaad/cmd/yaad@latest
44-
45-
# Add to your project
46-
cd your-project && yaad init
47-
48-
# Connect your agent (generates .mcp.json + hooks)
49-
yaad setup
50-
```
51-
52-
**That's it.** Your agent now has persistent, graph-native memory.
29+
Yaad is the **memory engine** behind the [`hawk`](https://github.com/GrayCodeAI/hawk)
30+
coding agent. Run `hawk` and your agent gets persistent, graph-native memory — across
31+
sessions, across models, across projects — with no separate install or daemon to manage.
32+
33+
> **Yaad is a Go library, not a standalone binary.** It ships no `yaad` command of its
34+
> own; its memory features are surfaced through the host agent (hawk). To embed Yaad in
35+
> your own Go program, import it directly:
36+
>
37+
> ```go
38+
> import (
39+
> yaad "github.com/GrayCodeAI/yaad/engine"
40+
> "github.com/GrayCodeAI/yaad/storage"
41+
> )
42+
> ```
5343
5444
---
5545
@@ -240,7 +230,7 @@ Zep-style `valid_at` / `invalid_at` intervals on edges let recall filter to fact
240230
<details>
241231
<summary><b>Versions & Rollback</b></summary>
242232

243-
Every edit is versioned. Inspect history with `yaad versions <node-id>` and restore a prior state with `yaad rollback <node-id> <version>` — the rollback itself is recorded as a new version.
233+
Every edit is versioned. The engine can list a node's version history and restore a prior state — the rollback itself is recorded as a new version.
244234
</details>
245235

246236
<details>
@@ -269,9 +259,10 @@ Detects topic boundaries in a session to segment memories into coherent units be
269259

270260
---
271261

272-
## MCP Tools (23 tools)
262+
## Memory Tools (23 tools)
273263

274-
Your agent gets these tools automatically via `yaad mcp`:
264+
When Yaad is embedded in a host agent (such as hawk), it exposes these operations to the
265+
agent. Yaad implements the logic; the host surfaces them (e.g. as MCP tools):
275266

276267
| Tool | What it does |
277268
|---|---|
@@ -318,34 +309,35 @@ Your agent gets these tools automatically via `yaad mcp`:
318309
└─────────────────────────────────────────────────────────────────┘
319310
```
320311

321-
**Single binary. Zero dependencies. Pure Go. No CGO. No Docker. No cloud.**
312+
**Zero dependencies. Pure Go. No CGO. No Docker. No cloud.** Embedded by the host agent;
313+
all data stays local (SQLite, WAL mode).
322314

323315
---
324316

325-
## CLI Commands
317+
## Library API
326318

327-
```bash
328-
yaad init # Initialize .yaad/ in current project
329-
yaad setup # Configure MCP + hooks for your agent
330-
yaad serve # Start REST API server
331-
yaad mcp # Start MCP server on stdio (used by agents)
332-
333-
yaad remember "..." # Store a memory
334-
yaad recall "..." # Search memories
335-
yaad link A B type # Create edge between nodes
336-
yaad status # Show graph stats
337-
yaad doctor # Diagnose setup issues
338-
339-
yaad decay # Apply confidence decay
340-
yaad gc # Garbage collect low-confidence nodes
341-
yaad bench # Run retrieval benchmark
342-
343-
yaad export-json # Export as JSON
344-
yaad export-md # Export as Markdown
345-
yaad export-obsidian # Export as Obsidian vault
346-
yaad import-json # Import from JSON
319+
Yaad is consumed as a Go library. The core entry points:
320+
321+
```go
322+
import (
323+
yaad "github.com/GrayCodeAI/yaad/engine"
324+
"github.com/GrayCodeAI/yaad/storage"
325+
)
326+
327+
// Open (or create) a memory store rooted at the repo / working dir.
328+
store, err := storage.Open(".yaad")
329+
eng := yaad.New(store)
330+
331+
// Store, recall, link, and inspect impact — the same operations the
332+
// host agent exposes as tools (see the table above).
333+
eng.Remember(ctx, yaad.Note{Type: "decision", Text: "Chose NATS for backpressure"})
334+
hits, _ := eng.Recall(ctx, "why did we choose NATS?")
347335
```
348336

337+
See [ARCHITECTURE.md](ARCHITECTURE.md) and [api/openapi.yaml](api/openapi.yaml) for the
338+
full surface. Versioning/rollback, export/import, decay, and GC are all available as
339+
engine methods (the host agent decides which to expose).
340+
349341
---
350342

351343
## Configuration
@@ -385,9 +377,10 @@ auto_stale = true
385377
```bash
386378
git clone https://github.com/GrayCodeAI/yaad.git
387379
cd yaad
388-
make build # Build binary
380+
make build # go build ./... (library packages; no standalone binary)
389381
make test # Run all tests
390-
make install # Install to $GOPATH/bin
382+
make cover # Coverage report (coverage.out + coverage.html)
383+
make ci # Everything CI runs (tidy, fmt, vet, lint, test-race, security)
391384
```
392385

393386
---

0 commit comments

Comments
 (0)