Skip to main content

🤖 The TALOS Framework

💬 ChatOps made easy

📖 About

With TalosBot, you can build operational bots without struggling with chat APIs or artificial intelligence.
Just focus on your skills —simple Python functions that return the message to send back.

The framework is designed to be:

  • 🧩 Easy to use
  • 🔧 Fully extensible
  • 🚀 Production-ready

🧱 Components

A bot in Talos is composed of three main components:

  • Channel: Handles messaging through a communication platform.
  • Matcher: Matches an input sentence to an example sentence tied to a skill.
  • Parser (optional): Extracts parameters from user input and passes them to the skill without needing to manually parse anything.

🧠 Built-in Models

Talos runs locally —no data is sent to third parties.
Out-of-the-box models include:

  • BertMatcher: Uses sentence-transformers to perform cosine similarity.
  • NERParser: Uses a spaCy pipeline with NER via the default en_core_web_lg model. You can replace it with a custom one using the CLI trainer (explained below).

🌐 Built-in Channels

Talos supports several channels, so you don’t have to deal with chat platform intricacies:

  • Slack:
    Uses slack-bolt with slash commands and no public endpoint required.
    Simply:

    • Create a new Slack App
    • Add the chat:write OAuth scope
    • Enable Socket Mode
    • Register a slash command (default: /talos)
      You’ll receive the app token and bot token, both required for the connection.
  • Telegram:
    Create a bot via Telegram’s @BotFather, and get your bot token.
    Plug it into Talos and you're ready to go.

🔄 Workflow Overview

  1. A user sends a sentence via a supported channel (e.g., a Telegram group).
  2. The bot matches the sentence against all registered examples.
  3. If a parser is configured, parameters are extracted into a dictionary.
  4. The matching skill is executed and the return message is sent back through the channel.

⚡ Quickstart

Install Talos with pip:

pip install talosbot

Then create a simple bot in bot.py:

from talosbot.matchers.bert import BertMatcher
from talosbot.parsers.ner import NERParser
from talosbot.channels.cli import CLIChannel
from talosbot.talos import Bot

channel = CLIChannel()
matcher = BertMatcher(acceptance_threshold=0.6)
parser = NERParser(getenv('MODEL_PATH', './ner_model'))

bot = Bot(matcher=matcher, parser=parser, channel=channel)

@bot.match('Execute the job XXX in the project some/repository', ('PROJECT', 'JOB'))
def check_pipeline(JOB, PROJECT):
    return f"Checking pipeline {JOB} for project {PROJECT}..."

@bot.default_match()
def no_skill():
    return 'No skill, my bad!'


if __name__ == '__main__':
    bot.run()

This launches a CLI channel for quick local testing.
For the NER parser, you’ll need a trained model to detect your entities.
You can download a pre-trained one here.


🧪 Training a New NER Model

Train from a dataset:

talos trainer --trainingset data.json --output ner_model

Train from a specific spaCy model:

talos trainer --trainingset data.json --output ner_model/ --model en_core_web_lg

You’ll find data.json examples in the pretrained models repo.


📁 More Examples

Explore the examples directory in this repo to see how to use Talos in different setups and contexts.

Metadata

Release files for talosbot 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for talosbot 0.2.0
File Size Uploaded
talosbot-0.2.0.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for talosbot 0.2.0
File Interpreter ABI Platform
talosbot-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / talosbot-0.2.0.tar.gz

Download URL talosbot-0.2.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3b05dbf539be47277cf93fd394441b6d85171fefdf64ec135d8b830becc60115
BLAKE2b-256 checksum
How to use checksums
203515e77ff7f80e70546eb7cc46c7b2fe3e597d3f5ded513f93749ff812c02a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / talosbot-0.2.0-py3-none-any.whl

Download URL talosbot-0.2.0-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b48b87a5ef8ab90b17595302d8d7902d7e3decb42e17c217949791dc93b1c70
BLAKE2b-256 checksum
How to use checksums
671bd395858c181d69f1976604c21a7eadcd025f9f390cee465a145380a17cb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page