How It Works

Anamnesis scans your workspace folder using language-specific extractors powered by tree-sitter and custom parsers. Each extractor produces nodes (files, classes, functions, config blocks) and edges (contains, imports, calls).

The unified graph is uploaded to Anamnesis Cloud and can be queried from the VS Code extension or via MCP tools when AI integration is enabled.

Quick Start Workflow

  1. Install the extension and configure credentials.
  2. Right-click a folder - Create Knowledge Graph.
  3. Browse the project in the Projects tree.
  4. Switch between Table and Graph views.
  5. Click nodes to jump to source code.
  6. Enable AI Tools for MCP-powered agent queries.

Extractor Reference

Extractors run automatically when you create a knowledge graph.

Technology File Patterns Graph Entities
TypeScript / JavaScript .ts, .tsx, .js, .jsx, .mjs, .cjs classes, interfaces, functions, methods, imports, calls
Java .java classes, interfaces, methods, imports, invocations
Maven pom.xml, *.pom projects, modules, dependencies, plugins, properties, profiles
HTL / Sightly (AEM) .html with data-sly-* components, Sling Models, includes, templates
AEM Content XML .content.xml components, dialogs, tabs, fields, clientlibs
Apache Web Server .conf, .any vhosts, domains, SSL, proxies, backends
NGINX Server .conf, .upstream.conf server blocks, upstreams, backends, locations
Markdown Architecture .md projects, modules, API routes, Mermaid flows
Bash .sh, .bash functions, commands, env vars, deploy targets
Jenkins Pipeline Jenkinsfile, *.jenkinsfile pipelines, stages, steps, environment

MCP Tools Reference

When AI Tools are enabled, agents can call these MCP tools against your knowledge graphs.

list_projects

List all knowledge-graph projects with node/edge counts

graph_stats

Overview of a project graph: nodes, edges, communities

search_symbols

Find nodes by name, id, or source file

get_node

Get a symbol with its callers, callees, and imports

get_neighbors

Direct neighbors of a symbol (in, out, or both)

shortest_path

Dependency path between two symbols

impact_of_change

Everything that depends on a symbol (blast radius)

god_nodes

Most connected nodes - architectural hubs

query_graph

Keyword-driven scoped subgraph for any question

Use Cases

Architecture Exploration

Use query_graph to ask "where is authentication handled?" and get a scoped subgraph instead of grepping hundreds of files.

Dependency Analysis

Trace shortest_path between two symbols to understand how modules, classes, or config blocks connect.

Impact Assessment

Run impact_of_change before editing a function to see everything that depends on it - callers, imports, and downstream effects.

Architectural Hotspots

Use god_nodes to find the most connected nodes - hubs that affect many parts of the system and deserve careful review.