A code Q&A chatbot for developers and support¶
A developer who owns one service still has questions about the rest of the system: what calls this endpoint? which job writes this table? what happens to an order after my code hands it off? A support engineer has a stack trace and needs to know which code produced it. Today those questions go to whoever remembers the answer.
CodeNavi's chat answers them from the indexed code on your own hardware, and
every answer cites the file:line ranges it used, so the reader can check it.
This page covers what chat does well, where to use another tool, and what you must know before you share one server between people. Everything on it is shipped behaviour; there is nothing extra to install.
For your own staff, not your customers
Do not put this chat in front of customers or anyone outside your company. Answers are built from your source code, and CodeNavi has no per-user permissions (see Before you share it).
Who it helps¶
Developers outside their own area. Someone who works on the billing service can ask about the shipping service without a checkout, a local build or an interrupted colleague. Onboarding new developers covers the first weeks of a new hire; this page is for everyone after that.
Internal support engineers. A long message, such as a pasted log or stack trace plus a question, gets up to three extra search queries written by the LLM, so the search looks for the code behind the log and not only for the log's words. The answer points to the code that a developer would read first, which makes for a better ticket when the case has to go to engineering.
Three ways to ask¶
| Where | Good for |
|---|---|
| Web UI Chat screen | People who only need a browser. Pick a codebase, or all of them, and ask. |
codenavi chat |
People who already work in a terminal on the server. |
POST /chat |
Your own internal tool, for example a Slack or Teams bot (recipe below). |
Which tool for which question¶
Chat runs one search per question and gives the LLM up to 12 short excerpts. This is good for a specific question. It is weak for a question about the whole system, because 12 excerpts cannot cover a whole system. Send those questions elsewhere:
| The question | Use | Why |
|---|---|---|
| "Where is the session token validated?" | Chat | Specific, and one search finds it. |
"Who calls PaymentGateway::charge?" or "What breaks if I change it?" |
Chat | If the symbol is in the call graph, the result is computed and shown under the answer as Call graph (computed, not generated). |
| "What do the docs say about the release process?" | Chat or Wiki | The docs are indexed too. |
| "How do our services fit together?" | Wiki and Graph | Pages compiled over all the docs, and a map you can explore. |
| "Follow this bug through the code and find the cause." | A coding agent | An agent can search many times and open files. Chat cannot. |
What to expect from the answers¶
- The LLM sets the quality. Retrieval is the same for every model, but a small local model can misread excerpts and invent names. Test with questions you know the answer to before you share the chat. See providers.
- Check the citations. A citation that the excerpts do not contain gets a ⚠️ warning. Other citations can still be read wrongly by the model, so open the cited line before you act on an answer.
- Answers describe what is indexed. The index follows the host's clone, not anyone's working tree and not the version a customer runs. If support needs to answer about an older release, check out that release in its own clone and add it as a codebase, then scope questions to it.
Before you share it¶
There are no per-user permissions. One bearer token opens the server. Choosing a codebase in the Scope list narrows the results, but it is not access control. If a team must not read another team's code, give that team its own instance with only its own code indexed.
The token gives more than chat. The same token opens the admin functions of the web UI (backup and restore, reindex, settings) and the MCP tools, which read every file in the index. Treat the token as an admin password. If people only need to ask questions, keep it away from them with a bot in front.
Everyone with the token sees every chat session. They can list, read and
delete all of them. That helps when a mentor follows a new hire's questions, but
it is a problem for private conversations. A POST /chat call without a
session_id also joins a shared session named cli, so its history feeds into
the answers of other callers that do the same.
What people paste stays as they pasted it. Redaction of secrets and personal data applies to indexed content. A pasted message is not redacted: it goes to the LLM as typed and is saved in the session's history file on the server. Sessions keep their last 20 turns, do not expire on their own and are included in backups. So for support work:
- Remove customer names, addresses and credentials from a log before you paste it.
- Use a local LLM. With a cloud provider, the pasted message goes to that provider together with the retrieved code.
- Delete sessions you no longer need
(
DELETE /history).
Reindexing can interrupt chat. While a reindex or crawl holds the GPU, a question can fail. Nothing is wrong; ask again in a minute or two. Incremental reindexes usually take seconds; run full reindexes outside working hours.
People asking at once wait in a queue. In our test Ollama answered one question
at a time, so the last person waited for everyone ahead of them. Nobody got an
error. We ran two rounds per row, every question different, on an RTX PRO 4500
Blackwell (32 GB) with llama3.1 on Ollama at about 120 tokens per second, against
the Laravel source, with no reindex running:
| People asking at the same moment | Median answer, round 1 / round 2 | Slowest answer, round 1 / round 2 |
|---|---|---|
| 1 | 2.0 s / 11.4 s | 2.0 s / 11.4 s |
| 2 | 4.1 s / 15.2 s | 6.0 s / 21.2 s |
| 4 | 5.1 s / 20.8 s | 14.9 s / 31.3 s |
| 8 | 10.7 s / 17.7 s | 25.1 s / 22.8 s |
The rounds differ because Ollama sometimes reloaded the model between questions. CodeNavi sizes the context window to each prompt, and Ollama reloads the model when that size changes; on this box one reload took 7.6 s. With Ollama, an answer that does not arrive within 120 seconds, time in the queue included, fails with an error. A bigger or slower model makes every step of this queue longer, so run the same test with your model before you size for a team.
Put a bot in front¶
CodeNavi does not include a chat-platform bot, and it needs only one HTTP call. Your bot keeps the token on its own host, takes a question from a user and forwards it:
curl -s -X POST http://codenavi.internal:8765/chat \
-H "Authorization: Bearer $CODENAVI_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "Which job writes the invoices table?",
"codebase": "billing",
"session_id": "slack-U024BE7LH"}'
The answer comes back in the response field, with its citations in the text.
- Give each user their own
session_id, built from your chat platform's user ID. Only letters, digits,-and_count and the rest are dropped, soa.b@c.comandab@c.comcan end up as the same session. The limit is 64 characters. - Set
source_type_filterto"doc"to answer from documentation only, or to"code"or"web". The web UI has no such filter; the API does. - Allow time. Answers can wait in a queue and a slow model takes longer, so reply to the chat platform at once and post the answer when it arrives.
- Limit who can reach the server. If only the bot needs CodeNavi, let your firewall accept only the bot's host. See remote access.
- Count usage with a webhook. The
chat.completedevent carries metadata only, never the question or the answer.
The bot keeps people away from the token. It does not add permissions: every question still searches whatever the bot's request allows.
Licensing¶
| Plan | Chat for its named user | One shared server for a team or support desk |
|---|---|---|
| Trial | Yes | Yes, to evaluate it for the 30 days of the trial |
| Personal | Yes, on the same computer | No |
| Professional | Yes | No |
| Corporate | Yes | Yes, on the terms in your order |
The trial is there to test this with your team, not to run a live support desk. When it ends, every use needs a plan, and a server shared by several people needs Corporate with a Seat for each of them. A bot does not change this: each person whose questions it passes on needs a Seat. Ask us for terms; the same form handles a pilot on a codebase larger than the trial's 10,000 files.
The EULA is the governing text.
Setting it up¶
- Install CodeNavi and index the repositories people will ask about. Keep the index fresh with the team server recipe.
- Choose the LLM on Settings → Chat LLM. Start with a local one if people will paste logs.
- Test it with ten questions whose answers you know. If the answers are weak, try a stronger model first; the model is the usual limit.
- Decide who gets what: the web UI and the token for people you trust as admins, a bot for everyone else.