Skip to main content

container-based autonomous agent framework

Project description

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

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

pip install microbots

✨LLM Support

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

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

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

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microbots-0.0.19.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microbots-0.0.19-py3-none-any.whl (74.7 kB view details)

Uploaded Python 3

File details

Details for the file microbots-0.0.19.tar.gz.

File metadata

  • Download URL: microbots-0.0.19.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for microbots-0.0.19.tar.gz
Algorithm Hash digest
SHA256 55311bc58f18e9fd55b1aefbb97c626555d6d7c2fde487ecde02f3ff275cc4a9
MD5 8e89a05fbdeb2156efd13360ed1cbef3
BLAKE2b-256 07e99ce5a9731bf726997449b17542e1b9bda6c9eb4efc5dae679eca493162e9

See more details on using hashes here.

File details

Details for the file microbots-0.0.19-py3-none-any.whl.

File metadata

  • Download URL: microbots-0.0.19-py3-none-any.whl
  • Upload date:
  • Size: 74.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for microbots-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 45db4290452521638ef0985919220cebc53a876a68a9f9bda9cc5e17cae5583b
MD5 3665d44b31e8218f7b7ff2fc8a79799d
BLAKE2b-256 b522e9c2953069dec1643380228becefd801e84ea5b732ba912ed45d8d4ff48b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page