Skip to content

New Guide Article : "Microbots : Introduction, Installation Guide and Creating Your First MicroBot" and structural changes in blog#132

Open
shivashanmugam wants to merge 4 commits intomainfrom
siva/getting-started-with-microbots
Open

New Guide Article : "Microbots : Introduction, Installation Guide and Creating Your First MicroBot" and structural changes in blog#132
shivashanmugam wants to merge 4 commits intomainfrom
siva/getting-started-with-microbots

Conversation

@shivashanmugam
Copy link
Copy Markdown
Collaborator

@shivashanmugam shivashanmugam commented Apr 17, 2026

Changes with this PR

  1. New article in guide section "Microbots : Introduction, Installation Guide and Creating Your First MicroBot"

  2. Created index file in guide section

image
  1. Creation of new sections in Guide
    Bots. Tools, Advanced

  2. Fix of paths


From : microbots/copilot-bot/
To : microbots/guides/bots/copilot-bot/

From : microbots/blog/guides/tesseract_ocr_tool_use/
To : microbots/guides/tools/tesseract_ocr_tool_use/

From : /microbots/authentication/
To : microbots/guides/advanced/authentication/

@shivashanmugam shivashanmugam changed the title microbots intro New Guide Article : "Microbots : Introduction, Installation Guide and Creating Your First MicroBot" and structural changes in blog Apr 17, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.08%. Comparing base (a080fd3) to head (41cb5a2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
- Coverage   97.15%   97.08%   -0.07%     
==========================================
  Files          30       30              
  Lines        1546     1546              
==========================================
- Hits         1502     1501       -1     
- Misses         44       45       +1     
Flag Coverage Δ
integration 51.81% <ø> (+0.25%) ⬆️
ollama_local 48.18% <ø> (ø)
slow-browser 40.10% <ø> (ø)
slow-other 56.46% <ø> (-1.36%) ⬇️
unit 88.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shivashanmugam shivashanmugam requested a review from 0xba1a April 17, 2026 12:39
@@ -0,0 +1,9 @@
"use strict";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to add output files and log files. Only initial source files are sufficient as it can be used by the reader

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the build.log and app.js which was output of tsc app.ts

!!! note
For advanced authentication options (Azure AD tokens, managed identity, service principals), see the [Authentication Guide](../advanced/authentication.md).

## Install Microbots
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs detailed walkthrough - Python installation, venv creation and microbots installation. Also, in Windows, we need to do it inside wsl.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added python installation in Install Microbots prerequisites Section


### Step 1: Prepare a sample project

Create a project folder with a TypeScript file that has a syntax error. When the TypeScript compiler (`tsc`) tries to convert it to JavaScript, it fails — and the error output is captured in a log file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User can create it or they can simply clone your example folder and follow the instructions step-by-step

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added detailed instruction on creating project and create files inside and expected project structure


Create `code/app.ts` with a deliberate syntax error:

```typescript title="code/app.ts"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use line number feature of snippet plugin

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added line number feature in code/app.ts


```bash title="Terminal"
cd code
tsc app.ts > build.log 2>&1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log files are naturally ignored by .gitignore. So, it will not be visible after deployment. Because sharing original log file may explose system related information. So, please use snippet of the log file here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed build.log reference

This produces the following build log:

```log title="code/build.log"
--8<-- "docs/examples/microbots_introduction/code/build.log"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build.log will not be checke-in to the git repo

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed build.log reference

└── build.log
```

### Step 2: Analyze logs with a LogAnalysisBot
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering this is going to be the very first blog for the user, we need to add more details here. The flow of agent creation and agent run. Individual arguments of Agent initialization and run function has to be explained.

Copy link
Copy Markdown
Collaborator Author

@shivashanmugam shivashanmugam Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added detailed code walkthrough which can be expanded which will have each function call and arguments which it will accept ( mainly the Microbots Instance creation and run function )


1. **Created a Docker container** with the `code` folder mounted using the appropriate permissions.
2. **Sent your task** to the LLM along with a system prompt tailored to the bot type.
3. **Executed commands** inside the container as directed by the LLM (e.g., `cat`, `grep`, `sed`).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please import logging and set logging config to print INFO log in the LogAnalysisBot.py. So, user can see the individual command the LLM runs. Also, you can point them how to read the logs with some examples here.

Copy link
Copy Markdown
Collaborator Author

@shivashanmugam shivashanmugam Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabled logging info in code and added the full log output when user is interested to see
image

@shivashanmugam shivashanmugam requested a review from 0xba1a April 21, 2026 08:50

**Install Python:**

- **Windows:** Download the latest installer from [python.org](https://www.python.org/downloads/). During installation, check **"Add Python to PATH"**.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you verify running microbots on Windows without WSL. If not, you can only mention this guide for Linux setup. We'll update it soon for Windows setup.

sudo apt update && sudo apt install python3 python3-pip python3-venv

# Fedora
sudo dnf install python3 python3-pip
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3-venv is missing for Fedora. Please create a simple Fedora container and verify your steps whether they are valid.

Create a `.env` file in the root of your application with:

```env title=".env"
OPEN_AI_END_POINT=https://your-resource-name.openai.azure.com
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With reference Kavya's internal chat, END_POINT value should be enclosed in double quotes. Please verify.

├── log_analysis_bot.py
└── code/
├── app.ts
├── app.js
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will app.js present if ts file compilation fails?


from dotenv import load_dotenv

load_dotenv()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_dotenv() will be used if environment variables are stored in a file named .env. As in your example, you are explicitely setting env variables, you may not need .env

|----------|------|----------|-------------|
| `model` | `str` | Yes | The LLM to use, in the format `<provider>/<model_name>`. Supported providers include `azure-openai`, `anthropic`, and `ollama`. |
| `folder_to_mount` | `str` | Yes | Path to the local folder the bot can access. For `LogAnalysisBot`, this is mounted as **read-only** inside the Docker container so the bot can read source files but never modify them. |
| `environment` | `any` | No | A custom execution environment. Defaults to a `LocalDockerEnvironment` if not provided. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to mention all the possible arguments here. Please explain only those arguments. In parallel, you can generate an auto documentation and link to the class definition of LogAnalysisBot.

| Argument | Type | Default | Description |
|----------|------|---------|-------------|
| `file_name` | `str` | — | **(Required)** Path to the log file to analyze. The file is copied into the container as read-only. |
| `max_iterations` | `int` | `20` | Maximum number of LLM reasoning/command loops before the bot stops. Each iteration is one round of the LLM issuing a command and receiving its output. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_iteration can be removed from here as it is not used in the code


When `run()` is called, it:

1. Copies the log file into the Docker container at a dedicated `/var/log/` path.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This detailed explanation will not make sense until someone understood the agentic architecture and Microbot's internals. So, you can simply mention that the Agent is invoked by run. Once agent completes, the result will be available in result.result.

```
Prints the bot's root-cause analysis.

The `my_bot.run()` method returns a `BotRunResult` object with the following fields:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BotRunResult should be a link to the BotRunResult class documentation. In python document generation is easier. That document you should create and make corresponding link.

```text title="Terminal output"
(.venv) $ python3 log_analysis_bot.py

INFO:microbots.environment.local_docker.LocalDockerEnvironment:🗂️ Created working directory at /home/sikannan/MICROBOTS_WORKDIR_18da47d7
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving the complete terminal output is not advised as it may reveal some machine related secrets. You can simply mention how to run the code, where the user can find the log and how to interpret the log with snippets of log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants