Inspiration
The fundamental problems with agents and agentic actions are:
- We have to equip the agent with all its tools before it starts.
- We don't know what the agent will/can do until it does it.
There are computer science solutions to eliminate or minimize these problems:
- Write and test the program in rust so we can statically analyze the code (and the agent's changes) at compiletime, not runtime
- Package and deploy the program binary with Nix for reproducible, deterministic builds so we can guarantee the correctness of the tool the agent uses across time.
What it does
The flakebot tool:
- Takes agent instructions as input
- Finds a useful rust program as a starting point from crates.io
- Forks and clones that program's repo
- Adds/removes functionality from the repo as needed, guaranteeing correctness by recursively testing its functionality at compile time
- Deploys the rust program via a nix flake
- Spits out instructions for the agent to consume the software it just built and deployed
- Cleans itself up after the agent is done.
How we built it
I built this program in Rust using Groq for inference and Replit for the dev and build environments.
Challenges we ran into
Rust doesn't have many easy to use agent frameworks so I had to write out a lot of the more basic things myself.
Accomplishments that we're proud of
I built a tool that writes, builds, and uses its own tools #artificialdeveloperintelligence #toolception
What we learned
It is extremely annoying to get llama to just give me what I ask for, I had to threaten it to give me back json.
What's next for Flakebot: the Deterministic Program CRAFTer
I built this as a demo for a service I'd like to add into Replit as a first class feature: on-the-fly service deployments from nix flakes. Replit is already built on nix and has recently added nix flakes. However, all their deployment options are built off of deploying from a dev environment. Normally you need the dev environment to build and test the software, but with a working nix flake you can guarantee the correctness of the program so we should be able to simply on-the-fly provision and deploy nix flake based services. Humans could use this for deploying things like bitcoin nodes, databases, matrix chat servers, etc, but eventually agents could use it as a deployment environment for software it builds or requires as needed.
Log in or sign up for Devpost to join the conversation.