CodeGraph

Index code repositories as a searchable knowledge graph.

CodeGraph indexes your code repositories so agents can search and understand your codebase semantically.

What CodeGraph does

  • Parses source code into a graph of symbols (classes, functions, variables)

  • Indexes relationships between symbols (calls, imports, inheritance)

  • Enables agents to answer questions like:

    • "Where is the User class defined?"

    • "What calls the authentication middleware?"

    • "Show me all API endpoints"

Connecting a repository

  1. Go to Knowledge Bases → CodeGraph

  2. Click + Add Repository

  3. Enter the repository URL (or select from connected GitHub repos)

  4. Choose branches to index

  5. Click Index

Browsing the graph

Once indexed, you can:

  • Browse files and symbols

  • See call graphs and dependency trees

  • Search by symbol name or description

  • View code snippets with syntax highlighting

How agents use CodeGraph

When you ask a code question in Chat, the agent:

  1. Searches CodeGraph for relevant symbols and files

  2. Retrieves the source code context

  3. Uses it alongside the LLM to generate an accurate answer

This is especially powerful for large codebases where agents need to understand relationships between components.

circle-info

CodeGraph re-indexes automatically when new commits are pushed to connected repositories (if GitHub integration is active).

Last updated