Skip to main content

Prerequisites

Infrastructure

  • A BubbleRAN MXK-PDK + MX-AI license.
  • (Optional) One or more GPU installed on the MXK-PDK testbed.

Software

  • Python 3.12 or higher (3.12.3 recommended).
  • BR rApp SDK.
  • (Optional) uv as a virtual environment and package manager.

Others

  • Basic LangGraph knowledge.

AIFabric Custom Resource

The MX-AI license gives you access to the AIFabric resource managed by the odin-operator. An AIFabric is a collection of:

  • Services: Generic applications that can be used by agents, other services, or directly by users. Currently, there are two supported services: a vector database and a UI.
  • LLMs: LLM API endpoints descriptions, which can be used by agents to perform tasks. The currently supported LLM providers are OpenAI, Nvidia and Ollama. Other providers will be supported in the future: feel free to contact us if you need support for a specific provider.
  • Agents: LLM-powered agents compliant to the Agent2Agent protocol. Currently, there is one domain-specific agent interacting with the athena-base-operator, and one orchestrator agent that manages the domain-specific agents and assigns tasks to them.

Agent's Codebase setup

Agents in the MX-AI ecosystem are implemented as Python applications compliant to the Agent2Agent protocol. In this guide, we provide suggestions on how to set up your agent's codebase, including the project structure, dependencies, and configuration files.

Although you may choose your own structure, as long as you remain compliant with the Agent2Agent standard, the following structure is already well tested and integrates perfectly with the BR rApp SDK and the MX-AI ecosystem.

Agent2Agent (A2A)

A2A defines the way agents discover and communicate with each other. In this context, the only concept that you really need to understand about A2A, is the AgentCard.

The AgentCard is a JSON file that describes the agent's capabilities, inputs, outputs, and other metadata. It is accessible through a well defined API endpoint ./well-known/agent.json.

In MX-AI, the AgentCard is used by domain-specific agents to describe themselves to the orchestrator agent, which is responsible for assigning queries and tasks to the appropriate agents based on their capabilities.

For more details on the AgentCard, refer to the Agent2Agent documentation.

Codebase Setup

If you don't have uv installed, you can create a virtual environement and install it in there. Remember to activate the virtual environement every time you come back to work on the codebase.

python -m venv myvenv
source myvenv/bin/activate
pip install uv

To set up your agent's codebase:

  1. Create a new directory as your project root and navigate to it:

    mkdir my_agent
    cd my_agent/
  2. Initialize a new uv project and create a virtual environment for it:

    uv init
    uv venv

    uv will create a pyproject.toml file in the project root, which is used to manage dependencies and project metadata. To add dependencies, you can use:

    uv add <package_name>

    For example, to add the BR rApp SDK you would run:

    uv add br_rapp_sdk

    The command will automatically update the pyproject.toml file with the new dependency.

    To install all the dependencies specified in pyproject.toml inside of the project's virtual environment, run:

    uv sync

    This will remove all the unnecessary packets that you may have installed in advance, and install all the missing ones.

  3. Structure the rest of the codebase as follows:

    my_agent/
    ├── agent.json
    ├── .env
    ├── __init__.py
    ├── __main__.py
    ├── pyproject.toml
    ├── README.md
    ├── src/
    │   ├── graph.py
    │   ├── __init__.py
    │   └── llm_clients/
    │   ├── __init__.py
    │   └── ...
    ├── uv.lock
    └── .venv/

Available Labs