Skip to content

Commit

Permalink
Adds README + concepts to make the tracking server more first-class
Browse files Browse the repository at this point in the history
We want everyone using Burr to use it.
  • Loading branch information
elijahbenizzy committed Feb 23, 2024
1 parent 11f163a commit 399cdba
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ is always hard!

Link to [documentation](https://studious-spork-n8kznlw.pages.github.io/).

Burr is:
1. A (dependency-free) python library that enables you to build and manage state machines with simple python functions
2. A server that can run your state machines and provide a UI to track execution/debug

## What can you do with Burr?

Burr can be used for a variety of applications. Burr can build a state machine to orchestrate, express, and track:
Expand All @@ -20,7 +24,7 @@ And a lot more!
Using hooks and other integrations you can (a) integrate with any of your favorite vendors (LLM observability, storage, etc...), and
(b) build custom actions that delegate to your favorite libraries.

Bur will _not_ tell you how to build your models, how to query APIs, or how to manage your data. It will help you tie all these together
Burr will _not_ tell you how to build your models, how to query APIs, or how to manage your data. It will help you tie all these together
in a way that scales with your needs and makes following the logic of your system easy. Burr comes out of the box with a host of integrations
including tooling to build a UI in streamlit and watch your state machine execute.

Expand All @@ -41,6 +45,14 @@ To get started, install from `pypi`, using your favorite package manager:
pip install burr
```

Then, run the server and check out the demo projects:

```
burr
```

This will open up a browser window with a few demo projects preloaded for you to play with.

Next, see the documentation for [getting started](https://studious-spork-n8kznlw.pages.github.io/getting_started/simple-example.html), and follow the example.
Then read through some of the concepts and write your own application!

Expand Down
28 changes: 25 additions & 3 deletions docs/concepts/tracking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ Tracking Burr
=============

Burr comes with a telemetry system that allows tracking a variety of information for debugging,
both in development and production. Note this is a WIP.
both in development and production.

The data model for tracking is simple:

1. **Projects** are the top-level grouping of data (the first page). This is specified in the constructor for the
:py:meth:`with_tracker <burr.core.application.ApplicationBuilder.with_tracker>`, as the only required argument.
2. **Applications** get logged to projects. An application would be considered similar to a "trace" in distributed
tracing systems. This is (optionally) specified as the ``app_id`` argument for the :py:meth:`with_tracker <burr.core.application.ApplicationBuilder.with_tracker>`
method. A single ``application`` has shared state path across all its steps.
3. **Steps** are the individual steps that are executed in the state machine. The Burr UI will show the state of the
state machine at the time of the step execution, as well as the input to and results of the step.

---------------
Tracking Client
Expand All @@ -22,6 +32,18 @@ This is a lifecycle hook that does the following:
- The timestamps

This currently defaults to (and only supports) the :py:class:`LocalTrackingClient <burr.tracking.LocalTrackingClient>` class, which
writes to a local file system, althoguh we will be making it pluggable in the future.
writes to a local file system, although we will be making it pluggable in the future. It will, by default, write to the directory
``~/.burr``.

---------------
Tracking Server
---------------

The tracking server (now) is meant for visualizing the state machine and the steps that have been executed. You can
run it with the following command:

.. code-block:: bash
burr
This will be used with the UI, which can serve out of the specified directory. More coming soon!
This will start a server on port 7241, and open up a browser window with the UI for you to explore.

0 comments on commit 399cdba

Please sign in to comment.