Autonomous Agent

An advanced autonomous, unsupervised AI agent that writes Go code, fixes bugs, and implements features seamlessly.

What is Autonomous Agent?

Autonomous Agent is a revolutionary AI product designed to automate complex software development tasks. Powered by cutting-edge AI technology, it can autonomously write, debug, and enhance Go code without supervision, improving productivity and software quality.

It leverages the Gemini API for decision-making, tool execution, and continuous learning from its environment to evolve and adapt.

Key Features

How It Works

The Autonomous Agent operates by maintaining a conversation history used for context and decision making. It utilizes the Gemini API calls to interact with various tools like reading and writing files, linting code, and more.

This approach allows the agent to act intelligently and independently, performing complex tasks such as understanding code context, fixing bugs, and implementing new features automatically.

Detailed Project Wiki

Agent Core (agent.go)

This component defines the autonomous agent's core logic and interaction with the environment. It is responsible for decision-making, tool selection, and communication with the Gemini API.

  • Constants: Defines model parameters such as MODEL_BIG and MODEL_SMALL.
  • Variables: Conversation history, working directory, and response temperature settings.
  • Functions:
    • handleChatCompletion: Manages chat interactions with the Gemini API.
    • handleToolCall: Executes tool calls for environment interaction.
    • YesNoQuestion: Facilitates yes/no queries with enforced responses.

Code Manipulation (code.go)

This module contains tools for reading, linting, and modifying Go code, critical for the agent's ability to maintain and extend the codebase.

  • Linting: Automatic code quality checks and fixes.
  • Code Reading: Extract specific function implementations.
  • Function Editing: Add or modify functions programmatically.

File System Interaction (file.go)

Provides file and directory manipulation abilities including reading, writing, directory listing, and gitignore-aware filtering.

  • Gitignore Handling: Understands and respects .gitignore patterns.
  • File Operations: Read, write, create directories, and search file content.

Web Interaction (web.go)

Enables web page visits and searches as part of the agent's research and information gathering capabilities.

Wiki Generation (wiki.go)

Supports generating and updating project documentation to keep it accurate and comprehensive.

Available Tools

File System

List directories, Read & write files, Create directories, Search text

Code Manipulation

Lint files, Read specific functions, Add or edit functions

Web Interaction

Visit web pages, Web search

Wiki

Fetch detailed documentation