BIP on AI Agents
Blended Intensive Programme — Universidad de Málaga
Everything you need to prepare your homework, advance your work, and collaborate with other participants.
During this BIP you will use TOMMI Lite, a lightweight framework for building and testing AI agents. This page contains everything BIP participants need to prepare before the 15th of June. Please complete the following tasks:
- Learn to use a terminal — Read through Section 1 below and practise opening a terminal on your computer, navigating folders, and running basic commands.
- Create a free* ( New) or payable Mistral account — Go to console.mistral.ai and sign up. You can now choose between a free Experiment plan or a paid plan. Both work with TOMMI Lite. See Section 1b below for detailed instructions on both options. Generate an API key and keep it at hand for the next step.*
- Download and install TOMMI Lite — Download the zip for your operating system (Section 2), extract it, configure your API key in env.txt, and start the server following the instructions in Section 3.
- Test at least one or two AI agents — Once the server is running, open http://localhost:8000 in your browser, select an agent from the sidebar (e.g. Hello World), and have a short conversation to confirm everything works.
* Note: During the virtual session we were not aware that MISTRAL offered also free accounts. Apparently these free accounts should be enough for you to complete this BIP satisfactorily. Sorry about the confusion and see you soon in Málaga!
Before You Arrive: What to Bring
For the in-person component of the BIP, please make sure you have the following ready before you arrive in Málaga:
Equipment
- A laptop with Wi-Fi access — you will be working on your own machine throughout all sessions.
- A Mistral account (a free account is sufficient — see Section 1b) with a working API key configured in TOMMI Lite.
Data for Your Own Agent (optional but recommended)
If you would like to go beyond the provided examples and build one or more agents that you can actually use in your work afterwards, you will need to bring the relevant data with you. The type of data depends on the task you have in mind. Here are some examples:
Lecturer / Teacher
If you want to build an agent to support your teaching — for example, to answer student questions or help explain course content — bring your lecture notes, slides, or course materials.
Student / Researcher
If you want an agent that can help you summarise or analyse papers in your area of research, bring the papers or documents you work with most frequently. PDF files work well.
Administrative Staff
If you want an agent that can help you consult or navigate a database or document collection, bring a sample of the type of database or document you work with. It does not need to contain real or sensitive data — a representative structure or a small anonymised example is enough.
1. Terminal Basics
A terminal (also called "command line" or "console") is a text-based interface where you type commands to interact with your computer. You will need it to run TOMMI Lite and manage your AI agents.
macOS
Opening the Terminal
- Press Cmd + Space to open Spotlight Search
- Type Terminal and press Enter
- A window with a command prompt will appear (usually showing your username and a % or $ sign)
Alternatively: open Finder > Applications > Utilities > Terminal
Essential Mac Commands
| Command | What it does | Example |
|---|---|---|
| cd folder_name | Change directory (move into a folder) | cd Downloads/tommilite |
| cd .. | Go up one folder level | cd .. |
| ls | List files in current folder | ls |
| pwd | Show current folder path | pwd |
| python3 --version | Check if Python is installed | python3 --version |
| ./start.sh | Run a shell script | ./start.sh |
| Ctrl + C | Stop a running program | (press keys together) |
Example: Starting TOMMI Lite on Mac
# Navigate to the TOMMI Lite folder
cd ~/Downloads/tommilite
# Start the server
./start.sh
Windows
Opening the Terminal
Windows has several terminal options. We recommend PowerShell or Command Prompt:
- Press Win + R, type cmd and press Enter (for Command Prompt)
- Or: press Win + X and select "Windows Terminal" or "PowerShell"
- Or: search "PowerShell" in the Start menu
Essential Windows Commands
| Command | What it does | Example |
|---|---|---|
| cd folder_name | Change directory | cd Downloads\tommilite |
| cd .. | Go up one folder level | cd .. |
| dir | List files in current folder | dir |
| cd | Show current folder path (no arguments) | cd |
| python --version | Check if Python is installed | python --version |
| start.bat | Run a batch script | start.bat |
| Ctrl + C | Stop a running program | (press keys together) |
Example: Starting TOMMI Lite on Windows
:: Navigate to the TOMMI Lite folder
cd C:\Users\YourName\Downloads\tommilite
:: Start the server
start.bat
Common Tips
- Tab completion: Press Tab while typing a folder or file name to auto-complete it.
- Command history: Press the Up arrow key to recall previous commands.
- Copy/Paste: On Mac, use Cmd+C / Cmd+V. On Windows terminal, use Ctrl+Shift+C / Ctrl+Shift+V (or right-click to paste).
- If something goes wrong: Press Ctrl + C to stop whatever is running, then try again.
New 1b. Create Your Mistral Account
Step 1: Sign Up
- Go to Mistral AI Studio.
- Click Sign Up and fill in your details.
- Verify your email address.
Step 2: Choose Your Plan
Once logged in, navigate to the Subscription section. You have two options:
New Free Experiment Plan (recommended)
- Select Experiment for free and click Subscribe.
- Verify your phone number (one phone number per account).
- Done! You get 1 billion tokens/month at no cost.
Paid Plan (optional)
- Select a basic paid plan.
- Add a payment method (credit card).
- Basic plans start at a few euros and offer higher rate limits.
Step 3: Generate an API Key
- In Mistral AI Studio, go to the API Keys section.
- Click Create New Key.
- Give your key a name (e.g., "AI Agent Project").
- Copy the generated API key and store it securely.
Step 4: Add the Key to TOMMI Lite
Open the file env.txt in your tommi_lite folder with any text editor and paste your key:
# LLM Provider configuration
LLM_PROVIDER=mistral
MISTRAL_API_KEY=your_key_here
MISTRAL_MODEL=mistral-small-latest
Replace paste_your_key_here with the actual API key you copied in Step 3.
Step 5: Monitor Usage
Check your usage and limits at any time in the Limits section of Mistral AI Studio.
2. Download TOMMI Lite
TOMMI Lite is the lightweight framework you will use to build and test AI agents during the BIP. Download the version for your operating system:
3. Setting Up TOMMI Lite
Prerequisites
Computer
macOS, Linux, or Windows.
Python 3.10+
If not installed, start.sh will detect this and offer to install it automatically.
Basic Command Line Knowledge
See Section 2 above.
3.1 Choose a Large Language Model (LLM)
TOMMI Lite needs an LLM to power its agents. You have two options — choose one:
- Mistral Cloud (recommended) for most participants — faster setup, better responses, and works on any computer without special hardware.
- Ollama only if you have a GPU, some technical experience, and want privacy (data stays on your machine).
3.2 Extract TOMMI Lite
Unzip the downloaded file to any folder on your computer. You will get a folder called tommi_lite containing all the necessary files.
# Navigate to where you downloaded the zip
cd ~/Downloads
unzip tommi_lite.zip
cd tommi_lite
:: Right-click tommi_lite.zip and select "Extract All"
:: Then open a Command Prompt and navigate to the folder:
cd %USERPROFILE%\Downloads\tommi_lite
3.3 Verify the folder structure
You should see these files:
tommi_lite/
app.py # Server
agent_runner.py # Agent engine
llm_client.py # LLM provider abstraction
env.txt # Configuration
requirements.txt # Python dependencies
start.sh # Mac/Linux startup
start.bat # Windows startup
static/
index.html # Chat interface
create.html # Agent creator
agents/
hello_world/ # Example agent
3.4 Configure your API Key (Mistral Cloud only)
If you chose Mistral Cloud, open the file env.txt in the tommilite folder with any text editor:
# LLM Provider configuration
LLM_PROVIDER=mistral
MISTRAL_API_KEY=YOUR_MISTRAL_API_HERE
MISTRAL_MODEL=mistral-small-latest
Replace YOUR_MISTRAL_API_HERE with your actual Mistral API key (obtained from console.mistral.ai).
3.5 Start the Server
The start script automatically creates a Python virtual environment, installs dependencies, and starts the server.
./start.sh
:: Double-click start.bat, or from Command Prompt:
start.bat
If Python is not installed, the script will ask you to accept its installation. Type Y (or just press Enter) to proceed.
The first time, it will also install dependencies (this takes about 30 seconds). You should see:
TOMMI Lite running at http://localhost:8000
3.6 Open the Interface and Chat with an Agent
Open your browser and go to:
http://localhost:8000
You will see the TOMMI Lite interface, which has three main areas:
- Sidebar (left) — Lists all available agents. You will see Hello World Agent pre-installed as an example.
- Chat area (centre) — Where conversations with your agent take place. Messages appear here in real time as the agent responds.
- Input bar (bottom) — Type your message and press Enter or click Send.
To start chatting:
- Click on an agent in the sidebar (e.g. Hello World) to select it.
- The agent's welcome message will appear in the chat area, along with example queries you can click.
- Type a message in the input bar and press Enter. The agent will stream its response in real time.
- To start a fresh conversation, click the "New Chat" button in the top bar.
4. Troubleshooting
Here are the most common issues encountered during setup and how to fix them:
"Permission denied" when running ./start.sh
The script does not have execute permissions. Run this command first:
chmod +x start.sh
Then try ./start.sh again.
"python" or "python3" is not recognised
Python is not installed or not in your system PATH.
- Mac/Linux: The start script will offer to install Python automatically. Accept by typing Y.
- Windows: Download Python from python.org. During installation, make sure to check "Add Python to PATH".
API key error / "Authentication failed"
Your Mistral API key is missing or incorrect.
- Open env.txt and verify that MISTRAL_API_KEY contains your actual key with no extra spaces or quotes.
- Make sure your Mistral account has an active plan (free Experiment plan or a paid plan).
- After editing env.txt, restart the server (press Ctrl+C to stop, then run the start script again).
"Address already in use" / port 8000 conflict
Another program (or a previous TOMMI Lite instance) is already using port 8000.
- Close the other terminal window running TOMMI Lite, or stop the other program.
- On Mac/Linux: lsof -i :8000 to find what is using the port, then kill
to stop it. - On Windows: netstat -ano | findstr :8000 to identify the process.
The page loads but the agent does not respond
- Check the terminal where the server is running for error messages.
- Verify your internet connection (required for Mistral Cloud).
- Make sure env.txt has the correct LLM_PROVIDER value (mistral or ollama).
- If using Ollama, make sure it is running: open a new terminal and run ollama serve.
"Module not found" or dependency errors
The Python dependencies were not installed correctly.
- Delete the venv folder inside the tommi_lite directory.
- Run the start script again — it will recreate the virtual environment and reinstall all dependencies.