Besser Agentic Framework

Design and implement agents, bot and chatbots in Python

Last verified:

Visit Besser Agentic Framework

What is Besser Agentic Framework?

The BESSER Agentic Framework (BAF) is an open-source Python library designed to make the design and implementation of agents, bots, and chatbots easier and accessible for everyone. It is part of the BESSER (Building Better Smart Software Faster) project at the Luxembourg Institute of Science and Technology (LIST). The framework supports building everything from simple deterministic agents with hardcoded responses to advanced LLM-based agents and RAG (Retrieval Augmented Generation) systems.

Key features include support for multiple platforms (Telegram, GitHub, GitLab, WebSocket), Built-in NLP capabilities like Speech-to-Text and Text-to-Speech for voice bots, Simple Intent Classifier with PyTorch and TensorFlow implementations, RAG implementation with vector stores, and LLM integration with OpenAI, Replicate, and Transformers. The framework provides example agents including greetings_agent, weather_agent, llm_agent, rag_agent, telegram_agent, github_agent, and gitlab_agent to help users get started quickly.

BAF is designed for Python developers, data scientists, AI researchers, and anyone interested in building AI agents, chatbots, or bots. It is particularly useful for developers who want low-code agent development, those working on multilingual agents (including Luxembourgish support), and teams building agents that need to interact with development platforms like GitHub and GitLab for project management tasks.

Besser Agentic Framework pricing

Pricing model: Freemium

The BESSER Agentic Framework is completely free and open-source under the MIT license. There are no paid plans or tiers. All features including core functionality, RAG, Speech-to-Text, LLM integrations, and platform support (Telegram, GitHub, GitLab, WebSocket) are available at no cost. Users only need to pay for any external API services they choose to use (such as OpenAI API, Replicate, or other LLM providers). The package can be installed via pip with various optional dependency tags: extras for additional agent functionalities, llms for LLM dependencies, torch for PyTorch, tensorflow for TensorFlow, docs for documentation, or all for all dependencies at once.

Besser Agentic Framework pros

  • Open-source with MIT license
  • Python 3.11 compatibility
  • Support for Telegram platform integration
  • GitHub platform for repository interactions
  • GitLab platform for project development tasks
  • WebSocket platform for bidirectional communication
  • Built-in Speech-to-Text with Whisper models
  • Text-to-Speech capability for voice bots
  • RAG implementation with vector stores
  • Simple Intent Classifier with PyTorch and TensorFlow
  • LLM support for OpenAI, Replicate, and Transformers
  • Multiple optional dependency tags for flexible installation
  • Example agents for quick starting
  • Custom handler support for Telegram
  • Session management with get_or_create_session
  • File handling with base64, path, or raw data options
  • Multilingual support including Luxembourgish
  • Low-code agent development approach
  • Comprehensive documentation on Read the Docs

Besser Agentic Framework cons

  • Requires Python 3.11 minimum
  • TensorFlow installation is heavy and optional
  • Luxembourgish requires manual spellux library installation
  • Telegram Platform doesn't wrap all python-telegram-bot features
  • Agent cannot detect when user opens Telegram chat window
  • First message needed to 'wake the agent up' in Telegram
  • Some replies (files, media, charts) still in development
  • Only 54 GitHub stars indicating smaller community
  • Limited to 6 contributors in the project

Frequently asked questions about Besser Agentic Framework

What is the BESSER Agentic Framework?

The BESSER Agentic Framework (BAF) is an open-source Python library that aims to make the design and implementation of agents, bots, and chatbots easier and accessible for everyone. It is part of the BESSER (Building Better Smart Software Faster) project at the Luxembourg Institute of Science and Technology (LIST). The framework supports building deterministic agents with hardcoded responses, RAG-based agents, and LLM-based agents depending on your needs and risk tolerance.

What Python version is required?

The BESSER Agentic Framework requires Python 3.11 as a minimum requirement. It is recommended to create a virtual environment (e.g., venv, conda) before installing the package to avoid conflicts with other Python packages.

How do I install the framework?

You can install the base package using pip install besser-agentic-framework. This installs core dependencies but omits optional dependencies. You can add tags for additional functionality: extras for RAG, Speech-to-Text, plotly, opencv; llms for OpenAI, Replicate, transformers; torch for PyTorch; tensorflow for TensorFlow; docs for documentation; or all for all dependencies at once. For example: pip install besser-agentic-framework[extras,llms,tensorflow].

What platforms does BAF support?

BAF supports multiple platforms including Telegram Platform (for chatbots via Telegram Bot API), GitHub Platform (for repository events and actions through PyGithub), GitLab Platform (for project development tasks), and WebSocket Platform (for bidirectional client-server communication). Each platform allows your agent to communicate with users through different channels.

Can I build voice bots with BAF?

Yes, BAF allows you to transform agents into voicebots using Speech-to-Text (STT) and Text-to-Speech (TTS) components. For Speech-to-Text, you can use HuggingFace models (tested with openai/whisper models like openai/whisper-tiny) or the Whisper Python library. The framework transcribes audio, treats it as a text message sent to an LLM, then converts the LLM's text response back to audio.

What is RAG in BAF?

RAG (Retrieval Augmented Generation) in BAF is an implementation that uses a vector store containing vectorized representations (embeddings) of data chunks. For a given input query, a retriever gets the k most similar stored embeddings. An LLM then generates an answer using the original query and retrieved data as context. This is commonly used for question-answering systems where you need to retrieve relevant information chunks.

How do I add custom handlers to my Telegram agent?

The BAF Telegram Platform uses the python-telegram-bot library and allows you to add custom handlers using CommandHandler and other handlers from telegram.ext. You define an async handler function, create the handler (e.g., CommandHandler('help', help)), and add it using telegram_platform.add_handler(handler). Built-in handlers include text message handling, /reset command, voice messages, file handling, and image handling.

What LLM providers are supported?

BAF supports multiple LLM providers through the llms optional dependency tag. This includes OpenAI, Replicate, and Transformers (HuggingFace). You need to install the llms tag with pip install besser-agentic-framework[llms] to get the necessary dependencies for running LLMs.

Are there example agents I can learn from?

Yes, BAF provides several example agents: greetings_agent (simple agent for first contact), weather_agent (introducing entities), llm_agent (introducing Large Language Models), rag_agent (introducing Retrieval Augmented Generation), telegram_agent (introducing TelegramPlatform), github_agent (introducing GitHubPlatform), and gitlab_agent (introducing GitLabPlatform). More examples are available in the BAF-agent-examples repository.

Can I use BAF for multilingual agents?

Yes, BAF supports multilingual agents. Notably, it supports Luxembourgish, though if you want to set your agent's language to Luxembourgish and are using the pip-installed package, you need to manually install the spellux library. The framework's NLP components including intent classifiers and LLM integrations can work with multiple languages depending on the models you use.

Categories

Use cases

Browse all AI tools on NeedAnAI