Metadata-Version: 2.4
Name: microbots
Version: 0.0.18
Summary: container-based autonomous agent framework
Author-email: xxx <xxx@example.com>
Project-URL: Source Repo, https://github.com/microsoft/minions
Project-URL: Issues, https://github.com/microsoft/minions/issues
Keywords: agent,bot,micro
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: aiohappyeyeballs==2.6.1
Requires-Dist: aiohttp==3.12.15
Requires-Dist: aiosignal==1.4.0
Requires-Dist: annotated-types==0.7.0
Requires-Dist: anthropic==0.75.0
Requires-Dist: anyio==4.10.0
Requires-Dist: attrs==25.3.0
Requires-Dist: bashlex==0.18
Requires-Dist: certifi==2025.8.3
Requires-Dist: charset-normalizer==3.4.3
Requires-Dist: click==8.3.0
Requires-Dist: coverage==7.11.3
Requires-Dist: datasets==4.5.0
Requires-Dist: dill==0.4.0
Requires-Dist: distro==1.9.0
Requires-Dist: docker==7.1.0
Requires-Dist: docstring_parser==0.17.0
Requires-Dist: fastapi==0.116.1
Requires-Dist: filelock==3.20.3
Requires-Dist: frozenlist==1.7.0
Requires-Dist: fsspec==2025.10.0
Requires-Dist: h11==0.16.0
Requires-Dist: hf-xet==1.2.0
Requires-Dist: httpcore==1.0.9
Requires-Dist: httpx==0.28.1
Requires-Dist: huggingface_hub==1.3.2
Requires-Dist: idna==3.10
Requires-Dist: iniconfig==2.1.0
Requires-Dist: jiter==0.11.0
Requires-Dist: markdown-it-py==4.0.0
Requires-Dist: mdurl==0.1.2
Requires-Dist: multidict==6.6.4
Requires-Dist: multiprocess==0.70.18
Requires-Dist: numpy==1.26.4
Requires-Dist: openai==1.107.3
Requires-Dist: packaging==25.0
Requires-Dist: pandas==3.0.0
Requires-Dist: pexpect==4.9.0
Requires-Dist: pluggy==1.6.0
Requires-Dist: propcache==0.3.2
Requires-Dist: ptyprocess==0.7.0
Requires-Dist: pyarrow==23.0.0
Requires-Dist: pydantic==2.11.9
Requires-Dist: pydantic_core==2.33.2
Requires-Dist: Pygments==2.19.2
Requires-Dist: pytest==8.4.2
Requires-Dist: pytest-cov==7.0.0
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: python-dotenv==1.1.1
Requires-Dist: python-multipart==0.0.20
Requires-Dist: PyYAML==6.0.2
Requires-Dist: requests==2.32.5
Requires-Dist: rich==14.1.0
Requires-Dist: shellingham==1.5.4
Requires-Dist: six==1.17.0
Requires-Dist: sniffio==1.3.1
Requires-Dist: starlette==0.47.3
Requires-Dist: swe-rex==1.4.0
Requires-Dist: tqdm==4.67.1
Requires-Dist: typer-slim==0.21.1
Requires-Dist: typing-inspection==0.4.1
Requires-Dist: typing_extensions==4.15.0
Requires-Dist: urllib3==2.5.0
Requires-Dist: uvicorn==0.35.0
Requires-Dist: xxhash==3.6.0
Requires-Dist: yarl==1.20.1
Provides-Extra: ghcp
Requires-Dist: github-copilot-sdk; extra == "ghcp"
Provides-Extra: azure-ad
Requires-Dist: azure-identity>=1.15.0; extra == "azure-ad"
Dynamic: license-file

# 🤖 Microbots

MicroBots is a lightweight, extensible AI agent for code comprehension and controlled file edits. It integrates cleanly
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

myWritingBot = WritingBot(
    model="azure-openai/my-gpt5", # model format : <provider/deployment_model_name>
    folder_to_mount=str("myReactApp"),
)

data = myWritingBot.run("""when doing npm run build, I get an error.
Fix the error and make sure the build is successful.""", timeout_in_seconds=600)
print(data.results)
```

## 🚀 How to install

### Pre-requisites

- Docker
- AI LLM Provider and API Key

### Install Microbots

```bash
pip install microbots
```


## ✨LLM Support

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

```env
AZURE_OPENAI_ENDPOINT=XXXXXXXXXXXXXXXXXXXXXXXXXX
AZURE_OPENAI_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AZURE_OPENAI_API_VERSION=2025-03-01-preview
```

## 🤖 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

myBot = ReadingBot(
    model="azure-openai/my-gpt5",
    folder_to_mount="code"
)

runResult = myBot.run("When I am running missing_colon.py I am getting SyntaxError: invalid syntax. Find the error and explain me what is the error", timeout_in_seconds=600)
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:
From the root the application, Create a folder called  `code` inside which clone the repo `https://github.com/swe-agent/test-repo/`. Now run the code

```py
from microbots import WritingBot

myBot = WritingBot(
    model="azure-openai/my-gpt5",
    folder_to_mount="code"
)

myBot.run("When I am running missing_colon.py I am getting SyntaxError: invalid syntax. Fix the error and make sure the code runs without any errors.", timeout_in_seconds=600)
```

The `WritingBot` will read and write the files inside `code` folder based on specific instructions given to the bot.

## ⚙️ 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.

#Legal Notice

Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
