# Samples and next steps

## Sample

<figure><img src="https://435547813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcfB81SirqQZbLYjoxuW%2Fuploads%2Fgit-blob-7eb6db55f43ecad1e281a5846dedf919af000ee2%2Fimage%20(12).png?alt=media" alt=""><figcaption></figcaption></figure>

Suppose we’re having the above conversation over Poe with a bot server running at `https://ai.example.com/llm`.

For the Poe conversation above, the Poe server sends a POST request to `https://ai.example.com/llm` with the following JSON in the body:

```json
{
    "version": "1.0",
    "type": "query",
    "query": [
        {
            "role": "user",
            "content": "What is the capital of Nepal?",
            "content_type": "text/markdown",
            "timestamp": 1678299819427621,
        }
    ],
    "user": "u-1234abcd5678efgh",
    "conversation": "c-jklm9012nopq3456",
}
```

The bot server responds with an HTTP 200 response code, then sends the following server-sent events:

```json
event: meta
data: {"content_type": "text/markdown", "linkify": true}

event: text
data: {"text": "The"}

event: text
data: {"text": " capital of Nepal is"}

event: text
data: {"text": " Kathmandu."}

event: done
data: {}
```

The text may also be split into more or fewer individual events as desired. Sending more events means that users will see partial responses from the bot server faster.

## Next steps

* Check out our [quick start](https://github.com/poe-platform/server-bot-quick-start) to promptly get a bot running.
* Tools:
  * [fastapi-poe](https://github.com/poe-platform/poe-protocol/blob/main/fastapi_poe), a library for building Poe bots using the FastAPI framework. We recommend using this library if you are building your own bot.
  * [Poe Simulator](https://github.com/poe-platform/poe-protocol/blob/main/simulator_poe), a simulated Poe server for testing your bots.
* Example bots:
  * [HerokuCat](https://poe.com/HerokuCat), a demo bot to demonstrate the features of the protocol.
    * See the [documentation](https://github.com/poe-platform/server-bot-quick-start/blob/main/catbot/catbot.md) for a full list of commands supported.
    * The source code for this bot is available in the [tutorial](https://github.com/poe-platform/server-bot-quick-start/blob/main/catbot/__init__.py).
  * [llama-poe](https://github.com/poe-platform/poe-protocol/blob/main/llama_poe), a knowledge-augmented Poe bot powered by [LlamaIndex](https://gpt-index.readthedocs.io/en/latest/) and FastAPI.
