- Overview
- Preview
- Features
- Installation
- Using as a Search Engine
- One-Click Deployment
- Upcoming Features
- Support Us
- Contribution
- Help and Support
This project was originally forked from Perplexica, an open-source AI search engine. We've adapted and expanded upon their work to create a specialized tool for the Starknet ecosystem. We're grateful for their initial contribution which provided a base foundation for Starknet Agent.
Starknet Agent is an open-source AI-powered searching tool specifically designed for the Starknet Ecosystem. It uses advanced machine learning algorithms to search and understand the Starknet documentation and the Cairo Book, providing clear and accurate answers to your queries about Starknet and Cairo.
- Local LLMs: You can make use of local LLMs such as Llama3 and Mixtral using Ollama.
- Focus Modes: Special modes to better answer specific types of questions. Starknet Agent currently has 3 focus modes:
- Starknet Ecosystem: Searches the entire Starknet Ecosystem, including the Cairo Book and the Starknet documentation.
- Cairo Book: Searches the Cairo Book for answers.
- Starknet Docs: Searches the Starknet documentation for answers.
There are mainly 2 ways of installing Starknet Agent - With Docker, Without Docker. Using Docker is highly recommended.
-
Ensure Docker is installed and running on your system.
-
Clone the Starknet Agent repository:
git clone https://github.com/cairo-book/starknet-agent.git
-
After cloning, navigate to the directory containing the project files.
-
Rename the
sample.config.toml
file toconfig.toml
. For Docker setups, you need only fill in the following fields:-
OPENAI
: Your OpenAI API key. You only need to fill this if you wish to use OpenAI's models. -
OLLAMA
: Your Ollama API URL. You should enter it ashttp://host.docker.internal:PORT_NUMBER
. If you installed Ollama on port 11434, usehttp://host.docker.internal:11434
. For other ports, adjust accordingly. You need to fill this if you wish to use Ollama's models instead of OpenAI's. -
GROQ
: Your Groq API key. You only need to fill this if you wish to use Groq's hosted models. -
ANTHROPIC
: Your Anthropic API key. You only need to fill this if you wish to use Anthropic models.Note: You can change these after starting Starknet Agent from the settings dialog.
-
SIMILARITY_MEASURE
: The similarity measure to use (This is filled by default; you can leave it as is if you are unsure about it.) -
CAIRO_DB and STARKNET_DB: These are the databases for the Cairo Book and Starknet Documentation. You will need to fill these with your own database URLs.
-
-
Ensure you are in the directory containing the
docker-compose.yaml
file and execute:docker compose up -d
5bis. Alternatively, you can start the containers in dev mode, with hot reloading, by running:
docker compose up -f docker-compose.dev.yaml up -d
- Wait a few minutes for the setup to complete. You can access Starknet Agent at http://localhost:3000 in your web browser.
Note: After the containers are built, you can start Starknet Agent directly from Docker without having to open a terminal.
- Install SearXNG and allow
JSON
format in the SearXNG settings. - Clone the repository and rename the
sample.config.toml
file toconfig.toml
in the root directory. Ensure you complete all required fields in this file. - Rename the
.env.example
file to.env
in theui
folder and fill in all necessary fields. - After populating the configuration and environment files, run
npm i
in both theui
folder and the root directory. - Install the dependencies and then execute
npm run build
in both theui
folder and the root directory. - Finally, start both the frontend and the backend by running
npm run start
in both theui
folder and the root directory.
Note: Using Docker is recommended as it simplifies the setup process, especially for managing environment variables and dependencies.
If you're encountering an Ollama connection error, it is likely due to the backend being unable to connect to Ollama's API. To fix this issue you can:
-
Check your Ollama API URL: Ensure that the API URL is correctly set in the settings menu.
-
Update API URL Based on OS:
- Windows: Use
http://host.docker.internal:11434
- Mac: Use
http://host.docker.internal:11434
- Linux: Use
http://<private_ip_of_host>:11434
Adjust the port number if you're using a different one.
- Windows: Use
-
Linux Users - Expose Ollama to Network:
-
Inside
/etc/systemd/system/ollama.service
, you need to addEnvironment="OLLAMA_HOST=0.0.0.0"
. Then restart Ollama bysystemctl restart ollama
. For more information see Ollama docs -
Ensure that the port (default is 11434) is not blocked by your firewall.
-
- Add settings page
- Adding support for local LLMs
- History Saving features
- Expanding coverage of Starknet-related resources
- Adding an Autonomous Agent Mode for more precise answers
For more information on contributing to Starknet Agent you can read the CONTRIBUTING.md file to learn more about Starknet Agent and how you can contribute to it.