aimos 1.0.0
An easy-to-use modular observability for AI Systems. Extensible, scalable and modular.
Requires Python: >=3.7.0

<div align="center">
  <table>
    <tbody>
      <tr>
        <td>Drop a star to support AimOS ⭐</td>
        <td>
          <a href="https://community.aimstack.io/">Join AimOS discord community</a>
          <img width="20px" src="https://user-images.githubusercontent.com/13848158/226759622-063b725d-8b3e-4c75-80c7-11fb04b7adf5.png">
        </td>
      </tr>
    </tbody>
  </table>
</div>

<br />

<div align="center">
  <img src="https://github.com/aimhubio/aimos/assets/13848158/723acdfc-5f35-42ff-88c2-9d506b885f15">
  
  <h3>
    Open-source modular observability for AI Systems.
  </h3>
  
  Easily log, connect and observe any parts of your AI Systems from experiments to production to prompts to AI system monitoring.
  
</div>

<br/>

<div align="center">
  
  [![Discord Server](https://dcbadge.vercel.app/api/server/zXq2NfVdtF?compact=true&style=flat)](https://community.aimstack.io/)
  [![Twitter Follow](https://img.shields.io/twitter/follow/aimstackio?style=social)](https://twitter.com/aimstackio)
  [![Medium](https://img.shields.io/badge/Medium-12100E?style=flat&logo=medium&logoColor=white)](https://medium.com/aimstack)
  
  [![Platform Support](https://img.shields.io/badge/platform-Linux%20%7C%20macOS-blue)]()
  [![PyPI - Python Version](https://img.shields.io/badge/python-%3E%3D%203.7-blue)](https://pypi.org/project/aimos/)
  [![PyPI Package](https://img.shields.io/pypi/v/aimos?color=yellow)](https://pypi.org/project/aimos/)
  [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg)](https://opensource.org/licenses/Apache-2.0)
  [![PyPI Downloads](https://img.shields.io/pypi/dw/aimos?color=green)](https://pypi.org/project/aimos/)
  [![Issues](https://img.shields.io/github/issues/aimhubio/aimos)](http://github.com/aimhubio/aimos/issues)
  
</div>

<div align="center">
  <br/>
  <kbd>
    <img src="https://github.com/aimhubio/aim/assets/13848158/f3b88aa5-2621-4b35-8541-dac3fd5c6f07"/>
  </kbd>
</div>

</br>

<div align="center">
  <sub><strong>SEAMLESSLY INTEGRATES WITH:</strong></sub>
  <br/>
  <br/>
  <img src="https://user-images.githubusercontent.com/97726819/225954732-2b263308-8ed8-4df3-810b-704840328e98.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954727-04eccf0e-51ed-4f2d-8f3b-c9a675ca8e8f.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954728-ca2f498d-51a7-487b-bd69-ffb5f0c2af58.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954689-1076998c-42f4-4e31-ab47-d9f39575fda1.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954739-0231d659-3202-4458-9c35-ba92d1f079b8.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954697-ef2c7091-b089-4b68-8543-80ce7275b683.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954743-dbfe1e98-7b9f-446a-9fe4-ad4fd562f3df.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954736-7c52ab5a-6780-4375-a6f8-b394dae3ad31.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954710-36551a71-b26d-4665-af20-44ee452dd5dd.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954707-4bc078b5-ae6f-4847-bc2c-3f81959accb2.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954725-a4d4c32c-75db-470a-b1da-698982faa23c.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954665-8d844747-a857-41b8-9104-7c27a8bdb81a.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954686-b9c8ec57-d4fc-44e1-a4b8-443db381a00f.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954693-94bc20b4-f51a-4130-8d5f-ddee30d81205.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954674-42fbfdb3-0351-492d-9ea3-1d3ab2b545f5.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954678-25f1b626-2cb1-4e7e-ad83-f7c8ab679c6f.png" height="60" />
  <img src="https://user-images.githubusercontent.com/97726819/225954702-d18d2706-dc87-4e09-a678-f010f6d95736.png" height="60" />
</div>

<br/>

<p align="center">
  AimStack offers enterprise support that's beyond core AimOS. Contact via <a href="mailto:hello@aimstack.io">hello@aimstack.io</a> e-mail.
</p>

---

<h3 align="center">
  <a href="#ℹ️-about"><b>About</b></a> &bull;
  <a href="#-demos"><b>Demos</b></a> &bull;
  <a href="#-default-logging-apps"><b>Default logging apps</b></a> &bull;
  <a href="#-quick-start"><b>Quick Start</b></a> &bull;
  <a href="https://github.com/aimhubio/aimos/tree/main/examples"><b>Examples</b></a> &bull;
  <a href="#-community"><b>Community</b></a> &bull;
  <a href="https://aimstack.io/blog"><b>Blog</b></a> &bull;
</h3>  

---

# ℹ️ About

AimOS is an open-source operating system for logs. 
With AimOS you can build, run and combine any kind of logging applications - experiment tracking, production monitoring, AI System (LLM-based) monitoring, usage monitoring etc.

The Logging applications are typically a combination of these components: 

- The types and relationships of the data being logged
- The observability UI over the data logged
- Automations over the data logged


AimOS comes installed with a number of default logging apps:

- Base App - a basic generic log exploration and the logging primitives
- AI Experiment Tracking App - log and explore your machine learning experiments. Includes integrations with the majority of leading ML frameworks.
- AI Systems Tracing and Debugging Apps - a combination of variety of apps that log from langchain to llamaindex traces all in one place.

Apart from running the logging apps, AimOS comes with explorers and reports.

- Explorers are advanced logs comparison tools for specific kind of logs - they allow to compare 1000s of sessions of metrics, images, text, audio and other types of data.
- Reports are embedded knowledge-base that operate with the apps and explorers seamlessly to enable capture the knowledge built on top of the logged  data from the observations through AimOS apps and explorers.

With the rise of AI Systems and the challenges it brings forward, logging apps are going to be a crucial part of the software. 

Our mission is to democratize developer tools for building AI.

<div align="center">
  <img src="https://github.com/aimhubio/aim/assets/13848158/26422615-3b06-4085-a3b3-ed5e1731041d" height="140" />
  <img src="https://github.com/aimhubio/aim/assets/13848158/22d63c83-4b4e-431a-85cb-ff38064f8b55" height="140" />
  <img src="https://github.com/aimhubio/aim/assets/13848158/c36b0f67-3efe-49c4-ae01-695c987251c5" height="140" />
</div>

</br>

### Base App

A general observability over anything logged with AimOS.

| Visualize all the logs ever logged with AimOS for the given project 🗺️ |
| --- |
| Base types to log common artifacts such as Images, Audio objects, Figures, Metrics  |
| High-level overview of the logs, the types logged and the respective sessions/ containers  |
| Deep-dive into each type of the log |

### Experiment Tracking App

<div align="left">
  <table>
    <tbody>
      <tr>
        <th>Log Metadata Across Your ML Pipeline 💾</th>
        <th>Visualize & Compare Metadata via UI 📊</th>
      </tr>
      <tr>
        <td>
          <ul>
            <li>ML experiments and any metadata tracking</li>
            <li>Integration with popular ML frameworks</li>
            <li>Easy migration from other experiment trackers</li>
            </ul>
          </td>
        <td>
          <ul>
            <li>Metadata visualization via AimOS Explorers</li>
            <li>Grouping and aggregation</li>
            <li>Querying using Python expressions</li>
          </ul>
        </td>
      </tr>
      <tr>
        <th>Run ML Trainings Effectively ⚡</th>
        <th>Organize Your Experiments 🗂️</th>
      </tr>
      <tr>
        <td>
          <ul>
            <li>System info and resource usage tracking</li>
            <li>Real-time alerting on training progress (upcoming)
          </ul>
        </td>
        <td>
          <ul>
            <li>Detailed run information for easy debugging</li>
            <li>Centralized dashboard for holistic view</li>
        </td>
      </tr>
    </tbody>
  </table>
</div>

### AI Systems Tracing Apps

<div align="left">
  <table>
    <tbody>
      <tr>
        <th>Log Inputs, Outputs and Actions of Executions 🤖</th>
        <th>Visualize & Compare Executions Steps via UI 🔍</th>
      </tr>
      <tr>
        <td>
          <ul>
            <li>Track all the prompts, generations of LLMs</li>
            <li>Track all the inputs, outputs of tools</li>
            <li>Capture chains metadata</li>
            </ul>
          </td>
        <td>
          <ul>
            <li>Deep dive into single execution steps</li>
            <li>Compare executions side-by-side</li>
          </ul>
        </td>
      </tr>
    </tbody>
  </table>
</div>

# 🎬 Demos

Check out live AimOS demos NOW to see it in action.

<table>
    <tr>
        <td align="center">
            <h3>Tracing LangChain-based chatbot executions</h3>
            <a href="https://play-v4.aimstack.io/langchain-chatbot-ui/apps/langchain_debugger/traces.py">View Demo</a> &nbsp;|&nbsp; 
            <a href="https://github.com/aimhubio/awesome-aim-demos/tree/main/langchain-chatbot">View Code</a><br><br>
            <kbd><img src="https://github.com/aimhubio/aim/assets/13848158/26422615-3b06-4085-a3b3-ed5e1731041d" style="display: block; margin-left: auto; margin-right: auto;"></kbd>
        </td>
        <td align="center">
            <h3>Tracing LlamaIndex query executions</h3>
            <a href="https://play-v4.aimstack.io/llamaindex-retriever-ui/apps/llamaindex_observer/traces.py">View Demo</a> &nbsp;|&nbsp; 
            <a href="https://github.com/aimhubio/awesome-aim-demos/tree/main/llamaindex-retriever">View Code</a><br><br>
            <kbd><img src="https://github.com/aimhubio/aim/assets/13848158/75c859d0-8c20-4218-b418-d7e8cc8ba715" style="display: block; margin-left: auto; margin-right: auto;"></kbd>
        </td>
    </tr>
    <tr><td colspan="2"></td></tr>
    <tr>
        <td colspan="2" align="center" width="50%">
            <h3>Tracking PyTorch-based CNN trainings</h3>
            <a href="https://play-v4.aimstack.io/mnist-training-ui/apps/experiment_tracker/runs.py">View Demo</a> &nbsp;|&nbsp; 
            <a href="https://github.com/aimhubio/awesome-aim-demos/tree/main/mnist-training">View Code</a><br><br>
            <img src="https://github.com/aimhubio/aim/assets/13848158/22d63c83-4b4e-431a-85cb-ff38064f8b55" style="display: block; margin-left: auto; margin-right: auto;" width="50%">
        </td>
    </tr>
</table>

# 🌍 Default logging apps

AimOS comes pre-installed with a wide variety of apps. Here is the full list:

| App Name             | Description                                                                                         | Category            | Docs     | Source  |
|----------------------|-----------------------------------------------------------------------------------------------------|----------------------|----------|---------|
| base                 | Base AimOS app for general observability over anything logged with AimOS. Includes base types to log common artifacts, such as Image, Audio object, Figure, Metric. | Base | [docs](https://aimstack.readthedocs.io/en/latest/apps/base_app.html) | [source](https://github.com/aimhubio/aimos/tree/main/pkgs/aimstack/base) |
| docs                 | Use this AimOS app to access AimOS docs. | Docs | -        | [source](https://github.com/aimhubio/aimos/tree/main/pkgs/aimstack/docs) |
| langchain_debugger   | Debugger for LangChain that logs LLMs prompts and generations, tools inputs/outputs, and chains metadata. | AI Systems Tracing  | [docs](https://aimstack.readthedocs.io/en/latest/apps/langchain_debugger.html) | [source](https://github.com/aimhubio/aimos/tree/main/pkgs/aimstack/langchain_debugger) |
| llamaindex_observer  | Debugger and observer for LlamaIndex. Logs metadata like retrieval nodes, queries and responses, embeddings chunks, etc. | AI Systems Tracing  | [docs](https://aimstack.readthedocs.io/en/latest/apps/llamaindex_observer.html) | [source](https://github.com/aimhubio/aimos/tree/main/pkgs/aimstack/llamaindex_observer) |
| experiment_tracker   | App for tracking and exploring ML experiments. Integrations with various ML libraries, including Acme, CatBoost, fastai, Hugging Face Transformers, Keras, Keras Tuner, LightGBM, MXNet, Optuna, PaddlePaddle, PyTorch Ignite, SDB3, and XGBoost. | Experiment Tracking | [docs](https://aimstack.readthedocs.io/en/latest/apps/experiment_tracker.html) | [source](https://github.com/aimhubio/aimos/tree/main/pkgs/aimstack/experiment_tracker) |

# 🏁 Quick start

Follow the steps below to get started with AimOS.

## 1. Install AimOS on your training environment

```shell
pip3 install aimos
```

## 2. Integrate AimOS with your code

```python
from aimstack.base import Run, Metric

# Initialize a new run
run = Run()

# Log run parameters
run["hparams"] = {
    "learning_rate": 0.001,
    "batch_size": 32,
}

# Init a metric
metric = Metric(run, name='loss', context={'subset': 'training'})

for i in range(1000):
      metric.track(i, epoch=1)
```

## 3. Start AimOS server

```shell
aimos server
```

## 4. Start AimOS UI

```shell
aimos ui
```

# 👥 Community

## AimOS README badge

Add AimOS badge to your README, if you've enjoyed using AimOS in your work:

[![AimOS](https://img.shields.io/badge/powered%20by-AimOS-%231473E6)](https://github.com/aimhubio/aimos)

```
[![AimOS](https://img.shields.io/badge/powered%20by-AimOS-%231473E6)](https://github.com/aimhubio/aimos)
```

## Contributing to AimOS

Considering contibuting to AimOS? 
To get started, please take a moment to read the [CONTRIBUTING.md](https://github.com/aimhubio/aimos/blob/main/CONTRIBUTING.md) guide. 

Join AimOS contributors by submitting your first pull request. Happy coding! 😊

<a href="https://github.com/aimhubio/aimos/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=aimhubio/aimos" />
</a>

Made with [contrib.rocks](https://contrib.rocks).

## More questions?

1. [Open a feature request or report a bug](https://github.com/aimhubio/aimos/issues)
2. [Join Discord community server](https://community.aimstack.io/)