You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add workspace initialization and agent instructions
- Implemented initWorkspace function to set up a new workspace.
- Created renderInitSummary function to summarize initialization results.
- Added agent instructions in markdown format to guide usage of Contextful.
- Included next steps for users after workspace initialization.
Copy file name to clipboardExpand all lines: README.md
+34-12Lines changed: 34 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,40 @@
1
1

2
2
3
-
# contextful
3
+
# *Contextful*
4
4
5
-
**Most-efficient Context Management Layer for Agentic AI.**
5
+
**Context Management + Search Engine for Agentic AI.**
6
+
7
+
Contextful is a runtime contextual layer & local search engine for agents that gives them one fast way to find, compress, cite, and remember project context.
8
+
9
+
Available as a `cli` + MCP & Skill, it integrates seemlessly with Codex, Claude Code, Cursor, Windsurf, GitHub Copilot, VS Code, Cline, Roo Code, Continue, and Zed.
Contextful is a runtime contextual layer agents need for real projects. Available as an MCP, it integrates with Codex, Claude Code, Cursor, Windsurf, GitHub Copilot, VS Code, Cline, Roo Code, Continue, and Zed, then gives agents one fast way to find, compress, cite, and remember project context.
8
13
9
14
Instead of making an agent read 40 files every session, Contextful indexes the project once and returns a ranked, cited, token-budgeted **context pack**.
10
15
11
-
## Why Agents Need This
16
+
## Why?
17
+
18
+
Context has always been a bottleneck for agentic AI. Large context window models (eg. 1m tokens) are :
19
+
1. Expensive and require significantly more compute & processing time.
20
+
2. Halucinate & loose key information as context window fills up.
21
+
3. Most projects have millions of lines of code, but agents can only fit in limited tokens per context window.
22
+
23
+
The current solution is to make the agent guess which files to read, then pay the token cost to read them every session. This is slow, expensive, and lossy.
12
24
25
+
Apart from this, agents have no way to store or share learnings across sessions. Every time they start, they forget everything and have to re-read the same context again.
I started developing Contextful to keep context window smaller by enabling efficient knowledge retrieval. We can index the project and return a ranked, cited, token-budgeted context pack, we can:
13
30
-**100x more efficient token usage:** stop paying tokens to re-read the same files.
14
31
-**Fewer tool calls:** one context pack can replace dozens of grep, glob, and read-file calls.
15
32
-**No lost context between sessions:** agents can store session learnings in an evidence-backed memory ledger.
16
33
-**Shareable project knowledge:** lessons and context packs survive context compaction and future sessions.
17
34
18
-
## Core
35
+
## Key Features
19
36
20
-
### Search Engine
21
-
22
-
Contextful analyzes the query, classifies intent, and combines lexical search, symbols, docs, graph relationships, and memory hits to retrieve the right evidence. The goal is Google-level project search for agents: vague queries like "resources for auth onboarding" should still land on the right code, docs, and prior lessons.
23
-
24
-
### Efficient Context Storage
37
+
### 1. Context Management
25
38
26
39
The default local store is SQLite with FTS-backed search and typed graph tables. V1 ships with:
27
40
@@ -33,11 +46,20 @@ The default local store is SQLite with FTS-backed search and typed graph tables.
33
46
34
47
The next storage upgrades are optional semantic vectors through sqlite-vec, LanceDB, or local HNSW, and compressed adjacency lists with Roaring bitmaps or CSR arrays for larger repositories.
Contextful analyzes the query, classifies intent, and combines lexical search, symbols, docs, graph relationships, and memory hits to retrieve the right evidence. The goal is Google-level project search for agents: vague queries like "resources for auth onboarding" should still land on the right code, docs, and prior lessons.
55
+
56
+
57
+
58
+
### 3. Memory Ledger
37
59
38
60
Agents can store lessons, decisions, and useful project facts, but not as loose "remember this" notes. Every memory requires evidence refs from files, symbols, commits, or prior context packs. When the evidence changes, Contextful marks the memory stale.
39
61
40
-
### Runtime Architecture
62
+
### 4. Contextful Execution
41
63
42
64
Contextful is an MCP server, local indexer, and small CLI:
Use Contextful as the first retrieval layer for this project. The goal is to avoid broad file-reading loops and return cited, token-budgeted evidence before making code changes.
60
+
61
+
## Default Rule
62
+
63
+
Before running broad grep/glob/read-file exploration, call:
64
+
65
+
\`\`\`text
66
+
context_pack(query, budget, scope)
67
+
\`\`\`
68
+
69
+
Use a budget between 800 and 3000 tokens for normal tasks. Use a higher budget only when the user asks for a deep architecture pass.
70
+
71
+
## When To Use Contextful
72
+
73
+
- Vague project questions: "where is auth handled", "resources for billing webhooks", "how does onboarding state work".
0 commit comments