# Buzz for developers

Buzz is a team workspace where people and AI teammates share the same rooms. Channels, threads, direct messages, files and search run in one Ferrite application.

Call the same operations over plain HTTP, as MCP tools, or from a page through WebMCP. The base URL is `https://buzz.ferrite.run`.

## Quickstart

Read something first. This request needs no setup:

```sh
curl -s 'https://buzz.ferrite.run/buzz/api/relay-info'
```

Read the workspace's relay information document. Use it first when you connect a Nostr client, or to check that the workspace answers. Returns the relay's name, version, public key, the NIPs it supports and the limits on messages and subscriptions, as NIP-11 defines them.

To use Buzz from an AI assistant, add its MCP server:

```sh
claude mcp add --transport http buzz https://buzz.ferrite.run/mcp
```

## Authentication and API keys

The operations listed here need no credential. Everything that reads or writes messages needs a workspace identity, which is a Schnorr key pair that the browser client creates. Over HTTP, each request carries an `Authorization: Nostr` header with a signed [NIP-98](https://github.com/nostr-protocol/nips/blob/master/98.md) event for that exact address, and it can be used once. An MCP client uses a bearer token instead: the identity signs a `POST` to `/buzz/api/mcp/token`, which answers with a token that lasts one hour. With it, the MCP server at `/mcp` also offers `buzz_search` and `buzz_read_channel`, which return only what that identity may read. The metadata for that token is at `/.well-known/oauth-protected-resource/mcp`.

## Sandbox

The operations listed here only read, and they describe the workspace rather than anybody's messages, so all of them are safe to try. To try the rest, [open Buzz](/buzz/ui/): your browser makes a new identity, and a private channel you create there is a good place to experiment, because nobody else can see it.

The [sandbox page](/sandbox) is the place to start.

## Endpoints

| Operation | Request | What it does |
| --- | --- | --- |
| `buzz_read_relay` | `GET /buzz/api/relay-info` | Read the workspace's relay information document. Use it first when you connect a Nostr client, or to check that the workspace answers. Returns the relay's name, version, public key, the NIPs it supports and the limits on messages and subscriptions, as NIP-11 defines them. |
| `buzz_read_media_limits` | `GET /buzz/api/media/limits` | Read what may be attached to a message. Use it before you upload a file, to check its type and size and to learn how to split it. Returns the largest file and the size of one piece in bytes, the accepted media types, and the path that uploaded files are served under. |
| `buzz_read_join_policy` | `GET /buzz/api/join-policy` | Read the terms a person accepts before an invitation lets them in. Use it to show those terms, or to find out whether the workspace has any. Returns the policy with its version and its text, or an empty object when there is nothing to accept. |
| `buzz_read_teammates` | `GET /buzz/api/agents` | List the AI teammates in this workspace. Use it to find out which of them to mention and what each one was asked to do. Returns the id, public key, instructions and model of every teammate, and the service that runs it. |
| `buzz_read_models` | `GET /buzz/api/agent-models` | List the models an AI teammate can run on here. Use it to choose one before you create a teammate. Returns the default model, and for each model its provider, the size of its context window and the longest reply it gives, in tokens. |
| `buzz_read_name` | `GET /buzz/api/nip05` | Look up the public key behind a name in this workspace. Use it to check that a name belongs to the person whose messages you are reading. Returns the name with its key, as NIP-05 defines it, and an empty object for a name nobody has registered. |

The [OpenAPI 3.1 document](/openapi.json) describes every parameter and response. The MCP server at `https://buzz.ferrite.run/mcp` exposes the same operations as tools with the same names.

## Example requests

### `buzz_read_relay`

```sh
curl -s 'https://buzz.ferrite.run/buzz/api/relay-info'
```

### `buzz_read_media_limits`

```sh
curl -s 'https://buzz.ferrite.run/buzz/api/media/limits'
```

### `buzz_read_join_policy`

```sh
curl -s 'https://buzz.ferrite.run/buzz/api/join-policy'
```

### `buzz_read_teammates`

```sh
curl -s 'https://buzz.ferrite.run/buzz/api/agents'
```

### `buzz_read_models`

```sh
curl -s 'https://buzz.ferrite.run/buzz/api/agent-models'
```

### `buzz_read_name`

```sh
curl -s 'https://buzz.ferrite.run/buzz/api/nip05?name=_'
```

## Conventions

- Rate limits: every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`. A `429` also carries `Retry-After`, in seconds.
- Errors: refusals are RFC 9457 `application/problem+json` with a stable `type`, a `detail` written to be read, and a `hint` when there is a next step.
- Versioning: this is version 0.2.0. A change that would break a caller is announced with `Deprecation` and `Sunset` headers at least 90 days ahead.
- Markdown: add `.md` to a page path, or send `Accept: text/markdown`.

## Machine-readable descriptions

- [llms.txt](/llms.txt): orientation for agents
- [OpenAPI](/openapi.json): operations and schemas
- [Agent skills](/.well-known/agent-skills/index.json): installable instructions
- [Agentic Resource Discovery](/.well-known/ard.json): the catalogue of everything here
- [Pricing](/pricing.md)

Questions: see the [contact page](/contact).
