Code Intelligence
Code-aware indexing, search, symbols, deps, and graph workflows introduced in the v0.18 series
Code Intelligence
Knowns includes a code-awareness layer so agents can reason from real files and symbols instead of guessing from task and doc text alone.
What It Provides
- AST-based indexing for supported source files
- Dedicated code workflows for ingesting, watching, searching, and inspecting dependencies
- Code-aware graph exploration in the Web UI
- MCP code tools for structured agent retrieval
- Structural knowledge retrieval (v0.20) — relation-aware traversal across entities and graph edges
This feature is opt-in. If you never index code, your existing task/doc/memory workflows keep working normally.
Core Flow
# Build the initial code index
knowns code ingest
# Keep code index fresh while you work
knowns code watch
# Discover likely entry points
knowns code search "oauth login"
# Inspect indexed symbols in a scope
knowns code symbols
# Inspect raw code relationships
knowns code deps
Recommended Retrieval Order
When you need code context, use this order:
knowns code searchfor entry-point discoveryknowns code symbolsto verify what was indexed in a file or scopeknowns code depsto inspect raw relationships
That order matches the imported learnings for the v0.18 code graph work: search is best for discovery, symbols verify parser/index output, and deps confirm relationships.
What Gets Indexed
The imported AST Code Intelligence spec describes these capabilities:
- Functions, methods, classes, interfaces, and file-level entries can become code chunks
- Relationship edges such as calls, imports, and contains are stored for later graph and dependency exploration
- Supported languages include Go, TypeScript, JavaScript, and Python
- Browser watch mode can keep the UI server and file watching in the same workflow
Web UI Support
The v0.18.0 release also introduced a dedicated Code Graph experience in the Web UI:
- Show or hide code nodes separately from tasks, docs, and memories
- Explore code-connected project context visually
- Use graph details and relationships to jump from knowledge to implementation
For the browser workflow, see Web UI.
MCP Tools
Agents can use the code-aware MCP tools directly (v0.20 consolidated format):
// Search for code symbols
code({ action: "search", query: "oauth login" })
// Inspect symbols in a file or scope
code({ action: "symbols", path: "src/auth/" })
// Inspect dependency edges
code({ action: "deps", type: "imports" })
// Get graph data for exploration
code({ action: "graph" })
These are a better fit for machine-readable code exploration than trying to force code results into generic text search.
Related
- MCP Integration - structured tools for code-aware agent workflows
- Web UI - code graph, workspace switching, and richer chat UI
- Semantic Search - search and retrieval behavior across docs, tasks, and memory
[Semantic Search
AI-powered search using vector embeddings for better relevance](https://knowns.sh/docs/semantic-search) [Web UI
Local interface for tasks, docs, memories, code graph, workspace switching, and built-in AI Chat](https://knowns.sh/docs/web-ui)