Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"microbots",
"ollama",
"qwen"
]
}
],
"python.testing.pytestEnabled": true
}
64 changes: 57 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ MicroBots is a lightweight, extensible AI agent for code comprehension and contr
into automation pipelines, mounting a target directory with explicit read-only or read/write modes so LLMs can safely
inspect, refactor, or generate files with least‑privilege access.


```py
from microbots import WritingBot

Expand Down Expand Up @@ -35,25 +34,23 @@ This project is currently **under active development**. Features, APIs, and inte
pip install microbots
```


## ✨LLM Support

Azure OpenAI Models - Add the below environment variables in a `.env` file in the root of your application

```env
OPEN_AI_END_POINT=XXXXXXXXXXXXXXXXXXXXXXXXXX
OPEN_AI_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AZURE_OPENAI_DEPLOYMENT_NAME=XXXXXXXXXXXXXXXXXXXXXX
```

## 🤖 Bots & Usage Examples

Pre-requisite for the below example code of Bots:
From the root of your application, Create a folder called `code` inside which clone the repo `https://github.com/swe-agent/test-repo/`. Now run the code


### 📖 ReadingBot


```py
from microbots import ReadingBot

Expand All @@ -69,7 +66,6 @@ print(runResult)

The `ReadingBot` will read the files inside `code` folder and will extract information based on specific instructions given to the bot.


### ✍️ WritingBot

Pre-requisite for the example code:
Expand All @@ -90,7 +86,61 @@ The `WritingBot` will read and write the files inside `code` folder based on spe

## ⚙️ How it works


![Overall Architecture Image](./docs/images/overall_architecture.png)

The MicroBots create a containerized environment and mount the specified directory with restricting the permissions to read-only or read/write based on Bot used. It ensures that the AI agents operate within defined boundaries which enhances security and control over code modifications as well as protecting the local environment.
The MicroBots create a containerized environment and mount the specified directory with restricting the permissions to read-only or read/write based on Bot used. It ensures that the AI agents operate within defined boundaries which enhances security and control over code modifications as well as protecting the local environment.

## 🛠️ Local Development Setup

**Prerequisites:** Python 3.11+, Docker

**Setup:**

```bash
git clone https://github.com/microsoft/minions.git
cd minions
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
```

**LLM Provider (choose any combination):**

```env
# Azure OpenAI
OPEN_AI_END_POINT=https://your-endpoint.openai.azure.com/openai/v1/
OPEN_AI_KEY=your-api-key
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-5
OPEN_AI_DEPLOYMENT_NAME=gpt-5

# Anthropic
ANTHROPIC_API_KEY=your-api-key
ANTHROPIC_END_POINT=https://api.anthropic.com/
ANTHROPIC_DEPLOYMENT_NAME=claude-3-5-sonnet-20241022

# Ollama (local) - see test/llm/README_OLLAMA_TESTING.md
LOCAL_MODEL_NAME=qwen2.5-coder:latest
LOCAL_MODEL_PORT=11434
```

```env
# Required for basic tests
LOCAL_MODEL_NAME=fake_model
LOCAL_MODEL_PORT=12345

# Required for BrowserBot tests
BROWSER_USE_LLM_MODEL="gpt-5"
BROWSER_USE_LLM_TEMPERATURE=1
AZURE_OPENAI_API_KEY=your-api-key
AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
AZURE_OPENAI_API_VERSION="2025-01-01-preview"
```

**Run tests:**

```bash
pytest -m unit # Fast unit tests (no Docker)
pytest -m integration # Integration tests (requires Docker)
pytest -m "not slow" # Skip slow tests
pytest # Run all tests
```
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "microbots"
dynamic = ["version", "dependencies"]
dynamic = ["version", "dependencies", "optional-dependencies"]
description = "container-based autonomous agent framework"
readme = "README.md"
license = { file = "LICENSE" }
Expand All @@ -23,6 +23,7 @@ requires-python = ">=3.11"

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
optional-dependencies.dev = { file = ["requirements-dev.txt"] }

[tool.setuptools_scm]
# This tells setuptools-scm to get version from git tags
Expand All @@ -32,4 +33,4 @@ where = ["src"]

[project.urls]
"Source Repo" = "https://github.com/microsoft/minions"
Issues = "https://github.com/microsoft/minions/issues"
Issues = "https://github.com/microsoft/minions/issues"
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest
pytest-asyncio
Loading