Skip to content

Tutorial: Getting Started with the Examples

By the end of this tutorial, you’ll have built and published your own agent and tools, installed Murmur, and confirmed everything works by running the provided examples. You’ll be ready to create more advanced agents and tools using the same approach.

Prerequisites

Do this first!

How to: Setup your own PyPI server. Use it to host your own agents and tools.

Install Murmur

  1. (Optional) Create and activate a python virtual environment:
mkdir murmur-artifacts
cd murmur-artifacts
python -m venv venv
source venv/bin/activate
  1. Install murmur-nexus and mur, both are essential for running the examples.
pip install 'murmur-nexus[langgraph,swarm]' mur
  • murmur-nexus: Murmur enables the use of published agents and tools within your orchestration code.
  • mur: Mur is a command-line interface (CLI)for creating and managing agents and tools.

Verify the installation by running mur --help.

  1. Done. To the moon! 🚀

Issues?

If during the installation process you experience any issues, please join our Discord and ask for help.

Publish an Agent

  1. Clone the murmur-example-artifacts repo into your workspace directory.
git clone https://github.com/murmur-nexus/murmur-example-artifacts.git
  1. Build the friendly-assistant agent. Optionally edit the murmur-build.yaml file first.
cd murmur-example-artifacts/agents/friendly-assistant
mur build

You should see something like this: Docker Container Running

Built for agent completed.

  1. Then simply run:
mur publish

Connection refused?

If you get a Connection refused error, it means either your PyPI server is not running or you didn't set the MURMUR_INDEX_URL environment variable in your current terminal session.

export MURMUR_INDEX_URL=http://localhost:8080/simple

To prevent re-setting the environment variable every time you open a new terminal session, add the above to your .bashrc or .zshrc file.

  1. You’ve published your first agent 🎉.

Publish Tools

  1. Build the add tool. Optionally edit the murmur-build.yaml file first. In the root project directory where murmur-example-artifacts resides (cd ../../) do:
cd tools/add
mur build
  1. Then run:
mur publish
  1. You’ve published your first tool 🔥.

  2. Repeat step 1 to 3 for publishing tools for multiply, divide, and is_prime. These are the minimum required tools for testing the basic examples.

Install Agents and Tools

  1. Go to your /murmur-artifacts directory (cd ../../) and clone the murmur.
git clone https://github.com/murmur-nexus/murmur.git
  1. cd into the examples/basic directory.
cd murmur/examples/basic
  1. Open murmur.yaml and adjust names/versions if needed. Here is what the file should look like:
examples/murmur.yaml
name: examples-basic
version: 1.0.0
agents:
  - name: friendly-assistant
    version: 1.0.0
tools:
  - name: add
    version: 1.0.0
  - name: multiply
    version: 1.0.0
  - name: divide
    version: 1.0.0
  - name: is_prime
    version: 1.0.0 # (1)
  1. It's recommended to put a strict version for maximum control.

Almost there! You just need to install requirements for using the examples.

  1. Install the requirements.txt file.
pip install -r ../requirements.txt
  1. Create OPENAI_API_KEY environment variable. Get OpenAI API key.
export OPENAI_API_KEY=sk-proj-aBCdeFg...
  1. Install all the agents and tools from murmur.yaml:

mur install
You should see something like this: Successfully installed all artifacts.

  1. Execute an example. E.g. for LangGraph:
python langgraph_math.py

You just orchestrated your first agent and tools with Murmur! 🎉

Wrap Up

  • You can now run the examples and build your own agents and tools.
  • Star the murmur repo 🌟 and join our Discord to continue learning.
  • Submit any feature requests or bugs; we’d love your feedback.