autogpt 0.3.2

๐Ÿฆ€ A Pure Rust Framework For Building AGIs.
Documentation
<div align="center">

# ๐Ÿค– AutoGPT

[![Work In Progress](https://img.shields.io/badge/Work%20In%20Progress-red)](https://github.com/wiseaidev)
[![made-with-rust](https://img.shields.io/badge/Made%20with-Rust-1f425f.svg?logo=rust&logoColor=white)](https://www.rust-lang.org/)
[![Rust](https://img.shields.io/badge/Rust-1.89%2B-blue.svg)](https://www.rust-lang.org)
[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/wiseaidev)
[![Jupyter Notebook](https://img.shields.io/badge/Jupyter-Notebook-blue.svg?logo=Jupyter&logoColor=orange)](https://jupyter.org/)

[![Share On Reddit](https://img.shields.io/badge/share%20on-reddit-red?logo=reddit)](https://reddit.com/submit?url=https://github.com/wiseaidotdev/autogpt&title=World%27s%20First%2C%20Multimodal%2C%20Zero%20Shot%2C%20Most%20General%2C%20Most%20Capable%2C%20Blazingly%20Fast%2C%20and%20Extremely%20Flexible%20Pure%20Rust%20AI%20Agentic%20Framework.)
[![Share On Ycombinator](https://img.shields.io/badge/share%20on-hacker%20news-orange?logo=ycombinator)](https://news.ycombinator.com/submitlink?u=https://github.com/wiseaidotdev/autogpt&t=World%27s%20First%2C%20Multimodal%2C%20Zero%20Shot%2C%20Most%20General%2C%20Most%20Capable%2C%20Blazingly%20Fast%2C%20and%20Extremely%20Flexible%20Pure%20Rust%20AI%20Agentic%20Framework.)
[![Share On X](https://img.shields.io/badge/share%20on-X-03A9F4?logo=x)](https://twitter.com/share?url=https://github.com/wiseaidotdev/autogpt&text=World%27s%20First%2C%20Multimodal%2C%20Zero%20Shot%2C%20Most%20General%2C%20Most%20Capable%2C%20Blazingly%20Fast%2C%20and%20Extremely%20Flexible%20Pure%20Rust%20AI%20Agentic%20Framework.)
[![Share On Meta](https://img.shields.io/badge/share%20on-meta-1976D2?logo=meta)](https://www.facebook.com/sharer/sharer.php?u=https://github.com/wiseaidotdev/autogpt)
[![Share On Linkedin](https://img.shields.io/badge/share%20on-linkedin-3949AB?logo=linkedin)](https://www.linkedin.com/shareArticle?url=https://github.com/wiseaidotdev/autogpt&title=World%27s%20First%2C%20Multimodal%2C%20Zero%20Shot%2C%20Most%20General%2C%20Most%20Capable%2C%20Blazingly%20Fast%2C%20and%20Extremely%20Flexible%20Pure%20Rust%20AI%20Agentic%20Framework.)

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/wiseaidotdev/autogpt/tree/main.svg?style=svg&circle-token=CCIPRJ_PifnErxs6Ze2XWpjmUeRV1_4e84825e0f6a366716a77c2dbbe93c3bd3e507fa)](https://dl.circleci.com/status-badge/redirect/gh/wiseaidotdev/autogpt/tree/main)
[![Crates.io Downloads](https://img.shields.io/crates/d/autogpt)](https://crates.io/crates/autogpt)
[![Github](https://img.shields.io/badge/launch-Github-181717.svg?logo=github&logoColor=white)](./examples/basic.ipynb)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/wiseaidotdev/autogpt/main?filepath=examples/basic.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/wiseaidotdev/autogpt/blob/main/examples/basic.ipynb)

![banner](https://raw.githubusercontent.com/wiseaidotdev/autogpt/refs/heads/main/assets/logo.png)

|                                                    ๐Ÿง Linux `(Recommended)`                                                    |                                                           ๐ŸชŸ Windows                                                           |                                                          ๐Ÿ‹                                                          |                                                          ๐Ÿ‹                                                          |
| :----------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------: |
|              [![Crates.io Downloads]https://img.shields.io/crates/d/autogpt]https://crates.io/crates/autogpt               |              [![Crates.io Downloads]https://img.shields.io/crates/d/autogpt]https://crates.io/crates/autogpt               | [![Docker]https://img.shields.io/docker/pulls/kevinrsdev/autogpt.svg]https://hub.docker.com/r/kevinrsdev/autogpt | [![Docker]https://img.shields.io/docker/pulls/kevinrsdev/orchgpt.svg]https://hub.docker.com/r/kevinrsdev/orchgpt |
|             ![linux-demo]https://raw.githubusercontent.com/wiseaidotdev/autogpt/refs/heads/main/assets/linux.png             |           ![windows-demo]https://raw.githubusercontent.com/wiseaidotdev/autogpt/refs/heads/main/assets/windows.png           |                                                          -                                                           |                                                          -                                                           |
|         Method 1: [Download Executable File]https://github.com/wiseaidotdev/autogpt/releases/download/v0.3.2/autogpt         |              [Download `.exe` File]https://github.com/wiseaidotdev/autogpt/releases/download/v0.3.2/autogpt.exe              |                                                          -                                                           |                                                          -                                                           |
|                                        Method 2: `cargo install autogpt --all-features`                                        |                                             `cargo install autogpt --all-features`                                             |                                        `docker pull kevinrsdev/autogpt`                                        |                                        `docker pull kevinrsdev/orchgpt`                                        |
| [**Set Environment Variables**]https://github.com/wiseaidotdev/autogpt/blob/main/INSTALLATION.md#environment-variables-setup | [**Set Environment Variables**]https://github.com/wiseaidotdev/autogpt/blob/main/INSTALLATION.md#environment-variables-setup |   [**Set Environment Variables**]https://github.com/wiseaidotdev/autogpt/blob/main/INSTALLATION.md#-using-docker   |   [**Set Environment Variables**]https://github.com/wiseaidotdev/autogpt/blob/main/INSTALLATION.md#-using-docker   |
|                                                 `autogpt -h` <br> `orchgpt -h`                                                 |                                                        `autogpt.exe -h`                                                        |                                       `docker run kevinrsdev/autogpt -h`                                       |                                       `docker run kevinrsdev/orchgpt -h`                                       |

<video src="https://github.com/user-attachments/assets/55a28c1a-eba2-4c94-aee1-2661cbeaabc6"></video>

</div>

> [!NOTE]
> This project is under active development. There is also a parallel project, [**lmm**]https://github.com/wiseaidotdev/lmm, under equally active development; It does **not** use LLMs at all. Instead, it uses equation-based intelligence to predict new words and reason without gradient-trained models. Check it out if you're interested in a fundamentally different approach to machine intelligence!

AutoGPT is a pure rust framework that simplifies AI agent creation and management for various tasks. Its remarkable speed and versatility are complemented by a mesh of built-in interconnected GPTs, ensuring exceptional performance and adaptability.

## ๐Ÿง  Framework Overview

### โš™๏ธ Agent Core Architecture

AutoGPT agents are modular and autonomous, built from composable components:

- ๐Ÿ”Œ **Tools & Sensors**: Interface with the real world via actions (e.g., file I/O, APIs) and perception (e.g., audio, video, data).
- ๐Ÿง  **Memory & Knowledge**: Combines long-term vector memory with structured knowledge bases for reasoning and recall.
- ๐Ÿ“ **No-Code Agent Configs**: Define agents and their behaviors with simple, declarative YAML, no coding required.
- ๐Ÿงญ **Planner & Goals**: Breaks down complex tasks into subgoals and tracks progress dynamically.
- ๐Ÿง **Persona & Capabilities**: Customizable behavior profiles and access controls define how agents act.
- ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ **Collaboration**: Agents can delegate, swarm, or work in teams with other agents.
- ๐Ÿชž **Self-Reflection**: Introspection module to debug, adapt, or evolve internal strategies.
- ๐Ÿ”„ **Context Management**: Manages active memory (context window) for ongoing tasks and conversations.
- ๐Ÿ“… **Scheduler**: Time-based or reactive triggers for agent actions.

### ๐Ÿš€ Developer Features

AutoGPT is designed for flexibility, integration, and scalability:

- ๐Ÿงช **Custom Agent Creation**: Build tailored agents for different roles or domains.
- ๐Ÿ“‹ **Task Orchestration**: Manage and distribute tasks across agents efficiently.
- ๐Ÿงฑ **Extensibility**: Add new tools, behaviors, or agent types with ease.
- ๐Ÿ’ป **CLI Tools**: Command-line interface for rapid experimentation and control.
- ๐Ÿงฐ **SDK Support**: Embed AutoGPT into existing projects or systems seamlessly.
- ๐Ÿ”€ **Mixture of Providers (MoP)**: Parallel fan-out and weighted scoring across multiple AI backends for optimal response quality.

## ๐Ÿ“ฆ Installation

Please refer to [our tutorial](INSTALLATION.md) for guidance on installing, running, and/or building the CLI from source using either Cargo or Docker.

> [!NOTE]
> For optimal performance and compatibility, we strongly advise utilizing a Linux operating system to install this CLI.

## ๐Ÿ”„ Workflow

AutoGPT supports 4 modes of operation: interactive, direct prompt, standalone agentic, and distributed agentic.

### 0. ๐Ÿค– GenericGPT Interactive Mode (Default)

When you run `autogpt` with **no subcommand or flags**, it launches an interactive AI shell powered by **GenericGPT**, a production-hardened autonomous software engineering agent with session persistence, model switching, and multi-provider support:

```sh
autogpt
```

<video src="https://github.com/user-attachments/assets/55a28c1a-eba2-4c94-aee1-2661cbeaabc6"></video>

The interactive shell supports the following commands:

| Command         | Description                                                 |
| --------------- | ----------------------------------------------------------- |
| `<your prompt>` | Send a task to the GenericGPT autonomous agent              |
| `/help`         | Show available commands                                     |
| `/provider`     | Switch AI provider (Gemini, OpenAI, Anthropic, XAI, Cohere) |
| `/models`       | Browse and switch between provider-native models            |
| `/sessions`     | List and resume previous sessions                           |
| `/status`       | Show current model, provider, and directory                 |
| `/workspace`    | Show the current workspace path                             |
| `/clear`        | Clear the terminal                                          |
| `exit` / `quit` | Save session and quit                                       |

> Press `ESC` at any time to interrupt a running generation.

### ๐Ÿ”€ Mixture of Providers (MoP)

AutoGPT introduces a high-availability **Mixture of Providers** architecture. When enabled via the `--mixture` or `-m` flag, every prompt is fanned out concurrently to all configured AI providers (Gemini, OpenAI, etc.). A weighted scoring engine evaluates responses based on:

1. **Length calibration** (rewarding detail, penalizing fluff).
1. **Code quality** (bonus for language-tagged Markdown blocks).
1. **Structural richness** (headings, lists, hygiene).
1. **Reasoning depth** (connectivity words and logical flow).
1. **Completeness** (punctuation and closing delimiters).

The highest-scored response is selected as the winner and injected into the agent's context, promoting the best "intelligence" available from your configured keys.

### The `.autogpt` Directory

GenericGPT maintains all persistent state inside the workspace root (defaults to the **current directory**):

```sh
.autogpt/
โ”œโ”€โ”€ sessions/          # Markdown conversation snapshots, auto-saved after every response
โ”‚   โ”œโ”€โ”€ <uuid>.md
โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ skills/            # TOML lesson files, injected into future prompts automatically
    โ”œโ”€โ”€ rust.toml
    โ”œโ”€โ”€ web.toml
    โ””โ”€โ”€ python.toml
```

Control the workspace root with `AUTOGPT_WORKSPACE`:

```sh
export AUTOGPT_WORKSPACE=/my/project   # scope all file ops to a specific directory
autogpt
```

### Model Selection

Models are sourced dynamically from each provider's crate. Override the active model without entering the shell:

```sh
export GEMINI_MODEL=gemini-2.5-pro-preview-05-06
export OPENAI_MODEL=gpt-4o
export MODEL=<any-model-id>    # global fallback for any provider
```

### How GenericGPT Works

Each prompt goes through a seven-step pipeline:

1. **MoP Fan-out** (optional): Parallel execution across multiple providers.
1. **Reasoning**: structured internal monologue stored in the session log.
1. **Task synthesis**: decomposition into typed actions (`CreateFile`, `PatchFile`, `RunCommand`, ...).
1. **Execution**: file edits via `PatchFile`; shell execution via `RunCommand`.
1. **Build-and-verify**: auto-detects `Cargo.toml` / `package.json` / `Makefile` and runs the build; retries on failure up to 3 times.
1. **Reflection**: reviews outcomes and lesson candidates.
1. **Skill extraction**: lessons written to `.autogpt/skills/<domain>.toml` and injected in future sessions.

```mermaid
flowchart TD
    A([User enters prompt]) --> B{Mixture mode?}
    B -- Yes --> C[Run Mixture of Providers]
    B -- No --> D[Standard Provider]
    C & D --> E[Reasoning pre-step]
    E --> F[Task synthesis]
    F --> G{User approves?}
    G -- yolo mode / yes --> H[Execute actions]
    H --> I[Build-and-verify loop]
    I -- pass --> J[Reflection]
    I -- fail, retry โ‰ค3 --> H
    J --> K[Save skills & session]
    K --> L([Ready for next prompt])
```

```mermaid
flowchart TD
    A([User launches autogpt]) --> B{Any args?}
    B -- No --> C[GenericGPT Interactive Shell]
    B -- Yes --> D{Subcommand}
    C --> E[Select Provider & Model]
    E --> F[Enter Prompt Loop]
    F --> G{Mixture enabled?}
    G -- Yes --> H[Mixture of Providers]
    G -- No --> I[Standard Prompt]
    H & I --> J[Agent Generates Response]
    J --> F
    D -- arch --> K[ArchitectGPT]
    D -- back --> L[BackendGPT]
    D -- front --> M[FrontendGPT]
    D -- design --> N[DesignerGPT]
    D -- manage --> O[ManagerGPT]
    D -- -p prompt --> P[Direct LLM Prompt]
```

### 1. ๐Ÿ’ฌ Direct Prompt Mode

<video src="https://github.com/user-attachments/assets/505737f6-2fe8-4a93-8cd9-fb036b55b8fd"></video>

In this mode, you can use the CLI to interact with the LLM directly, no need to define or configure agents. Use the `-p` flag to send prompts to your preferred LLM provider quickly and easily. Combine with `--mixture` to get the best answer from all your providers at once.

```sh
# Single provider
autogpt -p "Explain the Rust borrow checker in simple terms"

# Mixture of Providers (fanned out)
autogpt -m -p "Implement a Red-Black tree in Rust"
```

### 2. ๐Ÿง  Agentic Networkless Mode (Standalone)

<video src="https://github.com/user-attachments/assets/7d47b1d8-b2f2-4d23-a1f4-da926e425330"></video>

In this mode, the user runs an individual `autogpt` agent directly via a subcommand (e.g., `autogpt arch`). Each agent operates independently without needing a networked orchestrator.

```mermaid
flowchart TD
    User([User Provides Project Prompt]) --> M[ManagerGPT\nDistributes Tasks]
    M --> B[BackendGPT]
    M --> F[FrontendGPT]
    M --> D[DesignerGPT\nOptional]
    M --> A[ArchitectGPT]
    B --> BL[Backend Logic]
    F --> FL[Frontend Logic]
    D --> DL[Design Assets]
    A --> AL[Architecture Diagram]
    BL & FL & DL & AL --> M2[ManagerGPT\nCollects & Consolidates]
    M2 --> Result([User Receives Final Output])
```

- โœ๏ธ **User Input**: Provide a project's goal (e.g. "Develop a full stack app that fetches today's weather. Use the axum web framework for the backend and the Yew rust framework for the frontend.").
- ๐Ÿš€ **Initialization**: AutoGPT initializes based on the user's input, creating essential components such as the `ManagerGPT` and individual agent instances (ArchitectGPT, BackendGPT, FrontendGPT).
- ๐Ÿ› ๏ธ **Agent Configuration**: Each agent is configured with its unique objectives and capabilities, aligning them with the project's defined goals.
- ๐Ÿ“‹ **Task Allocation**: ManagerGPT distributes tasks among agents considering their capabilities and project requirements.
- โš™๏ธ **Task Execution**: Agents execute tasks asynchronously, leveraging their specialized functionalities.
- ๐Ÿ”„ **Feedback Loop**: Continuous feedback updates users on project progress and addresses issues.

### 3. ๐ŸŒ Agentic Networking Mode (Orchestrated)

<video src="https://github.com/user-attachments/assets/ecd82549-a48f-49c2-b751-23f74820bf3d"></video>

In networking mode, `autogpt` connects to an external orchestrator (`orchgpt`) over a secure TLS-encrypted TCP channel. This orchestrator manages agent lifecycles, routes commands, and enables rich inter-agent collaboration using a unified protocol.

AutoGPT introduces a novel and scalable communication protocol called [`IAC`](IAC.md) (Inter/Intra-Agent Communication), enabling seamless and secure interactions between agents and orchestrators, inspired by [operating system IPC mechanisms](https://en.wikipedia.org/wiki/Inter-process_communication).

```mermaid
flowchart TD
    U([User sends prompt via CLI]) -- TLS + Protobuf over TCP --> O[Orchestrator\nReceives & Routes Commands]
    O --> AG[ArchitectGPT]
    O --> MG[ManagerGPT]
    AG <-- IAC --> MG
    subgraph IAC [" IAC - Inter/Intra-Agent Communication Layer"]
        MG
        BG[BackendGPT]
        FG[FrontendGPT]
        DG[DesignerGPT]
    end
    MG -- IAC --> BG
    MG -- IAC --> FG
    MG -- IAC --> DG
    BG & FG & DG --> Exec[Task Execution & Collection]
    Exec --> R([User Receives Final Output])
```

All communication happens securely over **TLS + TCP**, with messages encoded in **Protocol Buffers (protobuf)** for efficiency and structure.

1. **User Input**: The user provides a project prompt like:

   ```sh
   /arch create "fastapi app" | python
   ```

   This is securely sent to the Orchestrator over TLS.

1. **Initialization**: The Orchestrator parses the command and initializes the appropriate agent (e.g., `ArchitectGPT`).

1. **Agent Configuration**: Each agent is instantiated with its specialized goals:
   - **ArchitectGPT**: Plans system structure
   - **BackendGPT**: Generates backend logic
   - **FrontendGPT**: Builds frontend UI
   - **DesignerGPT**: Handles design

1. **Task Allocation**: `ManagerGPT` dynamically assigns subtasks to agents using the IAC protocol. It determines which agent should perform what based on capabilities and the original user goal.

1. **Task Execution**: Agents execute their tasks, communicate with their subprocesses or other agents via IAC (inter/intra communication), and push updates or results back to the orchestrator.

1. **Feedback Loop**: Throughout execution, agents return status reports. The `ManagerGPT` collects all output, and the Orchestrator sends it back to the user.

## ๐Ÿค– Available Agents

At the current release, AutoGPT consists of 9 built-in specialized autonomous AI agents ready to assist you in bringing your ideas to life!
Refer to [our guide](AGENTS.md) to learn more about how the built-in agents work.

## ๐Ÿ“Œ Examples

Your can refer to [our examples](EXAMPLES.md) for guidance on how to use the cli in a jupyter environment.

## ๐Ÿ“š Documentation

For detailed usage instructions and API documentation, refer to the [AutoGPT Documentation](https://docs.rs/autogpt).

## ๐Ÿค Contributing

Contributions are welcome! See the [Contribution Guidelines](CONTRIBUTING.md) for more information on how to get started.

## ๐Ÿ“ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.