zkApps Umstad AI Assistant, your expert guide in the world of MINA Protocol, o1js. This agent provides in-depth assistance with zkApps o1js which is specifically designed to assist developers working on zkApps development powered by the GPT language model. This project includes two main application:
- Web Application Chatbot: zkappsumstad.com
- CLI Agent: zkappumstad
The Umstad AI Assistant offers a comprehensive range of features designed to support developers in various aspects of the MINA Protocol and o1js:
-
Documentation & General Knowledge:
- Access to extensive resources including the Mina Protocol documentation, o1js guides, and Auro Wallet information.
- Integration with Mina Book and Mina Blog for up-to-date knowledge and insights.
- Availability of various project documentations to enhance understanding and application.
-
Example Codebase:
- Embedded code examples within the documentation for practical reference.
-
Projects Repositories:
- Embedded codebase of zkApps projects.
-
Community Interaction and Issue Tracking:
- Embedded and processed integration with the Mina Protocol Discord channels, specifically zkapps-developers and zkapps-questions, for community support and engagement.
- Direct access to o1js GitHub Issues, providing insights into current challenges, bugs, and solutions within the community.
-
Mainnet Blockchain Information Access:
- Direct access to Blockchain Summary, Block and Account Information utilizing Mina Explorer API.
- Current MINA Price utilizing Coingecko API(TODO: Fix Fetching issue for deployment)
-
Be Specific: Clearly state your issue or the topic you need assistance with.
-
Querying issues, errors, problems: Begin with "I have an issue ..." or "I have a problem ..." for asking about errors, issues, problems, discussion, strange questions etc in order to utilize Issue Tool which queries the Issue Vectors which includes Discord and Github data.
-
Do not extend the conversation: Even though
gpt-4-1106-preview
can handle overlong contexts, it is strongly advised that not to extend the conversation too much(For now, ideal 3 questions). Just create new chat after 2-3 questions because every query creates crowded context.
- Language and Frameworks: Built using Next.js functions, OpenAI node.js ensuring robust and scalable performance.
- Database: Uses vercel KV db.
- APIs: Uses Vercel Functions.
- Data Privacy: We store your conversations in the KV db. Do not share confidentials, private keys etc. We are not responsible for Vercel's security.
- OPENAI API KEY: Application stores your OpenAI API KEY on the browser local storage. So, if you are using shared computer, please remove your key in the settings panel.
Introducing the zkApps Umstad AI Agent, your specialized assistant in the realm of the MINA Protocol and o1js. This agent, powered by the advanced GPT language model, is tailored to support developers in creating, debugging and testing zkApps smart contracts. It offers comprehensive guidance and expertise specifically for those working on zkApps development within the MINA ecosystem.
- Python 10 or above
- Installed
zkapp-cli
pip install zkappumstad
It is suggested that before using the tool create a folder and use it inside the folder.
mkdir new_folder
cd new_folder
After activating conda and py10 or environment that you use. Set API Key like this:
export OPENAI_API_KEY=XXXXXXXX
You must first activate a Billing Account here: https://platform.openai.com/account/billing/overview Then get your OpenAI API Key here: https://platform.openai.com/account/api-keys And need to get access GPT-4 Models
Create zk project and wait 10-15 seconds:
zkumstad-create
Go into the zkapps project folder and you can optionally open the project in editor:
cd initial_project
code .
Then, you can run and use the tool:
zkumstad-start
Currently uses our own API to send queries. No need to post your OPENAI API KEY. However, it will be needed to POST the query with OPENAI API KEY later on.
- Documentations
- Code Snippets
- Projects
- Issues
- Gets related context and writes code
- Builds and gets errors
- Debugs errors
- Fix and retry code
zkumstad-start
: Runs the tool.zkumstad-create
: Initialize zkapps project named initial_project.zkumstad-help
: Display commands- You can save your conversations by writing 'save' to console as a Markdown file.
- You can reset the conversation by writing 'reset'.
- Write 'quit' to terminate the agent.
- You Must Delete smart contract and test files from src folder before creating new contract in order to build.
- Specify your project requirements in detail and collaborate with the AI Agent.
- In order to query about issues, errors etc. start with "I have an issue...".
If you don't want to use our applications for any reason, you can use the API with your API Key to use Umstad. Or you can use the api for your applications :)
http://zkappsumstad.com/api/evalapi
POST
: http://zkappsumstad.com/api/evalapi
message
(string) - Your message, question etc. to Umstad. (Required)previewToken
(string) - OPENAI API KEY which has access to gpt-4 for more information please visit the openai website. (Required)
Json Request
{
"message": "Hello, I have an issue about zk programs, can you write example zk program and explain it?",
"previewToken": "sk-YOUR-OPENAI-API-KEY"
}
String Answer
Evaluation dataset is prepared for Mina Docs to evaluate the performance of the agent. It is compared against chatgpt. table below shows the results of the evaluation, agent, accuracy, average latency. Reference the paper: Evaluating Large Language Models Trained on Code and the repo.
Agent | Accuracy | Latency |
---|---|---|
chatgpt-3.5 | 51.5% | 1.969 seconds |
chatgpt-4 | 69.5% | 10.594 seconds |
umstad | 79.75% | 27.796 seconds |
Here we saw that our agent is more accurate than chatgpt-4 but slower. Because it is using chatgpt-4 and some additional tools to get more accurate results. Chatgpt-3.5 is the fastest but least accurate. We are planning to improve the speed of the agent.
For any technical issues or further inquiries, please contact our support team at [email protected].
- Discord Scraper: Project for scraping discord data
- Vector Uploaders: Data processor and uploaders
- Thread Uploader: Thread Uploader for Discord Mods
- Umstad API: If you don't want to use zkappumstad applications for any reason, you can use the API for your own purposes by POSTING API KEY
- Discord Umstad: Discord Bot which uses Umstad API, just uses Discord Chat Interface for now. Can be developed for using it with commands in channels.
- Beginner Template Umstad(TODO): Uses 20+ Perfect Smart Contract and provides them with very changes.
- Umstad the Teacher(TODO): Interactive learning platform(think about cryptozombies) which utilizes Beginner Template Umstad.
- GPT Store Umstad(TODO): Umstad in the GPT Store
Special thanks to the Mina Protocol zkIgnite program for funding the project and all contributors to this project.
Very special thanks to Yunus, Ilya, Filip, DFST, Santiago for all feedbacks and contributions.