Skip to content

Git Search

In this recipe we have created a GitHub copilot who can answer questions about the Eidolon monorepo.

It dynamically pulls in information via similarity search to answer user queries.

This is important if you have a body of information that is constantly changing, but you need real time information about (ie, a git repository).

Core Concepts

Multi-agent communication
Sub-component customization
Dynamic embedding management


Repo Expert

The user facing copilot. Ask this agent questions about a repository, and it will go and find the answer with the assistance of the repo search agent. It needs to be able to communicate with the repo search agent to get the information it needs.

The SimpleAgent template defines a shorthand mechanism to add an agent as a logic unit. Just add the downstream agent to the agent_refs list.

agent_refs: [repo_search]

Handles loading, embedding, and re-embedding documents ensuring they are up-to-date.

Translates queries into a vector search query and returns the top results.

You will notice that this agent uses the RetrieverAgent template. By default, this template is defined to use a loader that reads files from disk, but Eidolon has a GitHub loader built in that we can use.

implementation: GitHubLoader
owner: "eidolon-ai"
repo: "eidolon"
- "examples/**/getting_started/**/*.yaml"
- "examples/**/git_search/**/*.yaml"
- "**/*.md"
- "**/*.py"
exclude: "**/test/**/*"

💡Notice that we only care about certain types of files in the repository, and we exclude test files.

Try it out!

First let’s fork for Eidolon’s chatbot repository, clone it to your local machine, and start your server.

Terminal window
gh repo fork eidolon-ai/eidolon-git-search --clone=true
cd eidolon-git-search
make serve-dev

🚨make sure you set your github token, otherwise you will hit rate limit errors

Now you can interact with the Repo Expert via the Eidolon UI or the CLI. For this example let’s launch the UI.

Terminal window
docker run -e "EIDOLON_SERVER=http://host.docker.internal:8080" -p 3000:3000 eidolonai/webui:latest

Now Head over to the chatbot ui in your favorite browser and start chatting with your new agent.