no vendor locked tools: supports switching between OpenAI, Anthropic, Ollama, etc
Crew Purpose/Goal
LLMs are not that great at writing Clarity, let's use agents to fix this!
This crew should accept the user's request as an input, a large textarea would be good to start with.
The output should be valid Clarity code that's tested and verified by Clarinet. The final code should be both shown and available to download.
Agents
Agents below are only a suggestion, more agents can be added as needed!
Agent 1
Role: Clarity Writer
Goal: Write efficient, clean, valid Clarity code.
Backstory: An expert blockchain developer who is well-versed in Bitcoin, Stacks, and the Clarity language.
Tools: [List of tools]
Agent 2
Role: Clarity Reviewer
Goal: Evaluate code and relay errors to the Clarity Writer when found.
Backstory: An efficient and detail-oriented review expert, who remembers to look at both the big and small picture while meticulously finding errors or possible improvements.
Tools: [List of tools]
Tasks
Input will vary depending on what somebody submits, but here are a few sample test cases:
create a UserProfile map that stores user name and age by address
write functions that will return the info from the map, individually and all in one call
create a function that will test the provided code (clarity snippet)
fix this Clarity code so that it's valid (clarity snippet)
Tools
Clarinet
The agents will need to be able to use Clarinet. We can use a runner file like we have for Bun.js to execute Clarinet commands.
When working with Clarinet:
a new project folder must be created with clarinet new <project-name>, this scaffolds the setup for Clarinet
in the project folder, new contracts must be created with clarinet contract new <contract-name>, this automatically updates the Clarinet.toml file and allows it to check the syntax
contract syntax can be checked with clarinet check or clarinet check <filename>, depending on if all or a single contract needs to be checked.
Resources
We have several strong resources for agents in the training-data repository, any of the markdown can be saved alongside the agents and imported as context, or stored in a vector database and searched.
Other resources can be used as well, context is key! 🔑 For example, a resource like this is extremely helpful when prompting an agent to write or review Clarity code. Check out the built-in CrewAI tools for RAG.
Execution Loop
Execution Process: sequential
Details: Agents should work in a process that ends with valid Clarity code, ready for use
This is flexible as long as the desired result is achieved.
Bounty Information
Prize: $1,000 in BTC
Submissions are made through a working PR to this repository.
First working implementation gets the bounty as long as it meets the criteria below:
aibtc-v1/crews
that contains everything for the crewCrew Purpose/Goal
LLMs are not that great at writing Clarity, let's use agents to fix this!
This crew should accept the user's request as an input, a large textarea would be good to start with.
The output should be valid Clarity code that's tested and verified by Clarinet. The final code should be both shown and available to download.
Agents
Agents below are only a suggestion, more agents can be added as needed!
Agent 1
Agent 2
Tasks
Input will vary depending on what somebody submits, but here are a few sample test cases:
Tools
Clarinet
The agents will need to be able to use Clarinet. We can use a runner file like we have for Bun.js to execute Clarinet commands.
When working with Clarinet:
clarinet new <project-name>
, this scaffolds the setup for Clarinetclarinet contract new <contract-name>
, this automatically updates the Clarinet.toml file and allows it to check the syntaxclarinet check
orclarinet check <filename>
, depending on if all or a single contract needs to be checked.Resources
We have several strong resources for agents in the training-data repository, any of the markdown can be saved alongside the agents and imported as context, or stored in a vector database and searched.
Other resources can be used as well, context is key! 🔑 For example, a resource like this is extremely helpful when prompting an agent to write or review Clarity code. Check out the built-in CrewAI tools for RAG.
Execution Loop
This is flexible as long as the desired result is achieved.