Bartlebot is a demonstration of an AI Agent for the legal domain with a Slack integration. It is in early development.
See the Bartlebot repository on GitHub.
To be guided through installation, configuration, data build, message handling, and attaching to chat server
git clone git@github.com:The-AI-Alliance/bartlebot.git
python -m venv venv
. venv/bin/activate
python -m pip install .
In the root of the repository is a default bartlebot.yml
file.
Peruse it to get a sense of the layout and options available.
This file can be edited in place, or copied elsewhere and then provided to
the bartlebot
command line interface via the --config-file
parameter.
Bartlebot is configured to use Llama 4 models hosted by Together.AI by default.
To use inference on Together.AI, you will need to obtain and set the TOGETHER_API_KEY
.
New accounts come with a small amount of free credit to get started.
Any provider supported by AI Suite will work. To use another provider, change the model id strings.
Bartlebot is configured to use a Neo4j graph database. Neo4j provides free sandbox instances.
Enter your Neo4j URI in graph.neo4j_uri
in bartlebot.yml
Set the values for NEO4J_USERNAME
and NEO4J_PASSWORD
as either environment variables
or in the graph
section of the configuraiton file (lower-cased).
Bartlebot is implemented as a Slack application.
See the Proscenium Slack setup document.
Provide the bot and app tokens in the environment varaibles SLACK_BOT_TOKEN
and SLACK_APP_TOKEN
, respectively.
The main channel for the law librarian feature is set by name in
the configuration file as the key production.scenes.law_library.channel
.
Be sure that the Prosceinum app has been invited to that channel.
Bartlebot requires a channel to be designated as the administration channel.
Configure this by setting the slack.admin_channel
value in the configuration file.
The vectors and knowledge graph derived from case law the first time Bartlebot runs.
bartlebot build --verbose
bartlebot handle --verbose
bartlebot --verbose
Bartlebot implements question-answering related to large, public-domain legal datasets including U.S. case law.
The questions chosen highlight categories of questions where the ability to traverse a Knowledge Graph provides advantages over a naive RAG approach.
Existing legal benchmarks today are very narrow and/or do not map well to customer value.
Bartlebot will demonstrate creating and monitoring domain-specific benchmarks.
To find the Bartlebot community, see the discussions