#ai #llm #tui #pull-request #terminal #swiftide

app kwaak

Run a team of autonomous agents on your code, right from your terminal

6 releases

new 0.1.5 Dec 20, 2024
0.1.4 Dec 20, 2024

#47 in Development tools

Download history 55/week @ 2024-12-14

55 downloads per month

MIT license

430KB
4K SLoC

Table of Contents

CI Crate Badge Contributors Stargazers MIT License LinkedIn Discord


Logo

Kwaak

Run a team of autonomous AI agents on your code, right from your terminal!
Powered by swiftide »

Report Bug · Request Feature · Discord

What is Kwaak?

Always wanted to run a team of AI agents locally from your own machine? Improve test coverage, write documentation, or improve code quality, while you focus on building the cool stuff? Kwaak enables you to run a team of autonomous AI agents right from your terminal.

Powered by Swiftide, Kwaak is aware of your codebase and can answer questions about your code, find examples, write and execute code, create pull requests, and more. Unlike other tools, Kwaak is focussed on autonomous agents, and can run multiple agents at the same time.

[!CAUTION] Kwaak can be considered alpha software. The project is under active development, expect breaking changes. Contributions, feedback, and bug reports are very welcome.

Kwaak is part of the bosun.ai project. An upcoming platform for autonomous code improvement.

(back to top)

High level features

  • Run multiple agents in parallel
  • Quacking terminal interface
  • As fast as it gets; written in Rust, powered by Swiftide
  • Agents operate on code, use tools, and can be interacted with
  • Sandboxed execution in docker
  • Python, TypeScript/Javascript, Java, Ruby, and Rust

(back to top)

Getting started

Requirements

Before you can run Kwaak, make sure you have Docker installed on your machine.

Kwaak expects a Dockerfile in the root of your project. This Dockerfile should contain all the dependencies required to test and run your code. Additionally, it expects the following to be present:

If you already have a Dockerfile for other purposes, you can either extend it or provide a new one and override the dockerfile path in the configuration.

For an example Dockerfile in Rust, see this projects Dockerfile

Additionally, you will need an OpenAI API key and a github token.

(back to top)

Installation and setup

Currently, Kwaak is not available on crates.io. You can install it by cloning the repository and running cargo install --path . in the root of the repository. Proper releases will be available soon.

Once installed, you can run kwaak --init in the project you want to use Kwaak in. This will create a kwaak.toml in your project root. You can edit this file to configure Kwaak.

After verifying the default configuration, one required step is to set up the test and coverage commands. There are also some optional settings you can consider.

Api keys can be prefixed by env:, text: and file: to read secrets from the environment, a text string, or a file respectively.

Running Kwaak

You can then run kwaak in the root of your project. This will start the Kwaak terminal interface. On initial bootup, Kwaak will index your codebase. This can take a while, depending on the size. Once indexing has been completed, subsequent startups will be faster.

Keybindings:

  • ctrl-s: Send the current message to the agent
  • ctrl-x: Exit the agent
  • ctrl-c: Exit kwaak
  • ctrl-n: Create a new agent
  • Page Up: Scroll chat up
  • Page Down: Scroll chat down
  • tab: Switch between agents

(back to top)

How does it work?

On initial boot up, Kwaak will index your codebase. This can take a while, depending on the size. Once indexing has been completed once, subsequent startups will be faster. Indexes are stored with lancedb, and indexing is cached with redb.

Kwaak provides a chat interface similar to other LLM chat applications. You can type messages to the agent, and the agent will try to accomplish the task and respond.

When starting a chat, the code of the current branch is copied into a on-the-fly created docker container. This container is then used to run the code and execute the commands.

After each chat completion, kwaak will lint, commit, and push the code to the remote repository if any code changes have been made. Kwaak can also create a pull request and will include the full conversation history in the pull request.

(back to top)

Upcoming

  • Support for more LLMs
  • Tools for code documentation
  • Different and specialized agents

(back to top)

Community

If you want to get more involved with kwaak, have questions or want to chat, you can find us on discord.

(back to top)

Contributing

If you have a great idea, please fork the repo and create a pull request.

Don't forget to give the project a star! Thanks again!

Testing agents is not a trivial matter. We have internal benchmarks to verify agent behaviour across larger datasets.

If you just want to contribute (bless you!), see our issues or join us on Discord.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat: Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

See CONTRIBUTING for more

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Dependencies

~174MB
~3.5M SLoC