Getting started

Deploy your first agent in ten minutes.

Install the mb CLI, push your code with git, and get a running agent with its own HTTPS address.

  1. Install the CLI

    curl -fsSL https://get.mesangebleue.io | sh

    Installs to ~/.local/bin after checking the download's SHA-256. No sudo needed.

    Check it worked:

    mb version
  2. Sign in

    mb login

    A browser window opens to sign you in. mb also sets up git so that pushing to your agents uses this sign-in. There are no passwords or SSH keys to manage.

    Several workspaces? Commands use your workspace automatically when you belong to just one. Otherwise add --tenant <workspace>, or set MB_TENANT once in your shell.
  3. Write a small app

    An agent is any web service that listens on the port in $PORT. Python, Go and LangChain are supported. This example uses Python's standard library, so it needs no dependencies.

    $ mkdir hello && cd hello && git init -b main
    main.py
    import os
    from http.server import BaseHTTPRequestHandler, HTTPServer
    
    class Hello(BaseHTTPRequestHandler):
        def do_GET(self):
            self.send_response(200)
            self.send_header("Content-Type", "text/plain")
            self.end_headers()
            self.wfile.write(b"Hello from MesangeBleue\n")
    
    HTTPServer(("", int(os.environ.get("PORT", "8080"))), Hello).serve_forever()

    That's the whole app: main.py is found and started automatically. Add a requirements.txt for dependencies, or a Procfile with a web: line to start it differently.

  4. Create the agent

    Run this inside the project folder:

    mb agent create --name hello --runtime python

    This registers the agent and adds a git remote called mb to your repository. Other runtimes: --runtime go or --runtime langchain.

  5. Deploy with git

    git add . && git commit -m "First version"
    git push mb main

    Every push to main builds and deploys a new version. Follow it with:

    mb agent get  --slug hello     # status and address
    mb agent logs --slug hello     # application output

    When the status is running, your agent is live at https://hello.<workspace>.mesangebleue.io, with HTTPS already set up.

  6. Add settings and secrets

    Values are stored encrypted and passed to your agent as environment variables. Reading a secret from standard input keeps it out of your shell history:

    mb agent secret set --slug hello --key OPENAI_API_KEY --stdin
    mb agent secret sync --slug hello      # restart with the new values
    mb agent secret list --slug hello

    New values also take effect on your next push.

  7. Add a database (optional)

    Get a managed PostgreSQL database and connect it to your agent:

    mb agent db create --name hello-db
    mb agent db bind --slug hello --db hello-db --env-var DATABASE_URL

    Your agent restarts with DATABASE_URL set. You never handle the database password yourself.

  8. Use your own domain (optional)

    mb agent alias add --slug hello --domain agent.example.com

    The command shows a DNS TXT record that proves you own the domain. Add it with your DNS provider, and point the domain at your agent with a CNAME to hello.<workspace>.mesangebleue.io. Then run:

    mb agent alias verify --slug hello --domain agent.example.com

    The certificate is issued automatically, usually within a couple of minutes.

  9. Work as a team

    Whoever creates an agent owns it. Everyone in your workspace can see it. Contributors can push code and change settings, while only the owner and workspace admins can delete it or give it to someone else.

    mb agent contributor add --slug hello --user teammate@example.com
    mb agent owner --slug hello
    mb agent transfer --slug hello --to teammate@example.com

Where to go next

mb --help lists every command, and adding --help to any command shows its options. For automated deploys from CI, create a workspace API client and sign in with mb service-login.