How the Ask Agent works
The agent is a ReAct LLM connected to your Neo4j graph via 19 code exploration tools. When you submit a question, the agent:- Decides which tools to call based on your question.
- Runs those tools against the graph — for example, searching for a function by name, tracing its callers, or looking up class inheritance.
- Uses the results to decide whether to call more tools or synthesize a final answer.
- Cites the source files and shows the relevant code inline in its response.
How to use it
Open the Ask Agent page from the BugViper dashboard sidebar. Select the repository you want to query, type your question in the chat input, and press Enter. The agent’s response appears in the conversation thread with cited source files linked to the exact lines in the graph. The Ask Agent endpoint is also available via the REST API:Example questions
The Ask Agent works best for questions about relationships, architecture, and code understanding. Here are some examples of what you can ask:Architecture and dependencies
Architecture and dependencies
- “What embedding model do we use and where is it configured?”
- “Which modules does the ingestion engine depend on?”
- “What external APIs does this service call?”
- “How does the webhook router decide which handler to invoke?”
Call chains and usages
Call chains and usages
- “Which functions call the authentication middleware?”
- “Where is
embed_textscalled from?” - “What code runs when a GitHub push event is received?”
- “Show me all callers of the
search_codefunction.”
Classes and inheritance
Classes and inheritance
- “What is the inheritance hierarchy of the
IngestionEngineclass?” - “Which classes extend
BaseModel?” - “What methods does
CodeSearchServiceexpose?”
Complexity and risk
Complexity and risk
- “What are the most complex functions in the repo?”
- “Which functions have cyclomatic complexity above 10?”
- “What would break if I changed the
embed_textsfunction signature?”
Prerequisites
- The repository must be indexed before the Ask Agent can answer questions about it. See index a repository.
- Questions that involve semantic similarity — such as “find code related to rate limiting” — require embeddings to be generated. If you see no results for conceptual questions, run the embed endpoint for your repository.
The Ask Agent uses the model configured in your
REVIEW_MODEL environment variable for reasoning. More capable models (such as anthropic/claude-sonnet-4-5) produce more accurate and detailed answers but cost more per query. Lighter models are suitable for simple structural questions; use a more capable model when you need the agent to reason across complex multi-hop relationships.