# API details to go live

**URL:** <https://forum.anna.partners/t/api-details-to-go-live/123>\
**Category:** General\
**Tags:** model-selection, executa, release\
**Created:** [June 18, 2026, 3:41pm UTC](https://forum.anna.partners/t/api-details-to-go-live/123 "2026-06-18T15:41:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hunter](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.anna.partners/hunter/32/8_2.png) [@hunter](https://forum.anna.partners/u/hunter)\
**Post date:** [June 19, 2026, 6:07am UTC](https://forum.anna.partners/t/api-details-to-go-live/123/2 "2026-06-19T06:07:48Z")

</div>

Hey prash! 👋 Huge congrats on getting Meeting AI running end-to-end in mock mode — `detect_question`, `answer_question`, and `summarize_meeting` are a really nice set of tools to bring live! 🎉 Let me unblock each of your three sections.

## 1. Hosted LLM / Sampling API — the key mental model shift 🧠

This is the most important thing to get right, and it’ll actually make your life **easier** than you expect:

> Anna’s LLM access is **not** a base-URL HTTP endpoint you POST to. There is **no `/chat/completions`, no base URL, no API key, no header** for your tool to manage. It’s an **MCP-style reverse-RPC** — the host calls _into_ your tool with a sampling capability, and your tool calls _back_ to the host.

So to answer your bullets directly:

- **Base URL?** None. You don’t call out to Anna; Anna injects a sampling channel into your invoke.

- **Auth / header?** None for you to set. At invoke time the Agent injects a short-lived `sampling_token` (JWT, `aud=executa-sampling`, ~600s TTL) inside `params.context`. The SDK handles it — you never craft a header.

- **OpenAI-compatible?** Not a REST endpoint, but the request shape is MCP `sampling/createMessage`. While processing an `invoke`, your plugin emits this on **stdout** :

The host replies on **stdin** with `{ id, result: { role, content, model, usage, … } }`.

- **Architecture (your last sub-question — and you nailed the instinct):** It’s the **MCP-style** option. Anna injects sampling and calls your tool; your tool reverse-RPCs back for completions. You do **not** call an Anna endpoint directly. 🙌
- **Model name(s)?** Best practice: **omit `modelPreferences` entirely** so the _user’s_ saved model + quota + billing apply. If a tool strictly needs a family, pass `modelPreferences.hints: [{ "name": "claude-sonnet" }]` (case-insensitive substring match).
- **JSON / structured output?** Yes 🎯 — pass `responseFormat: { "type": "json_object" }` (broadly compatible) or `{ "type": "json_schema", "json_schema": {…} }`. Perfect for `detect_question` / structured extraction.
- **Streaming?** The sampling reply is a single result in Phase 1; your _tool_ itself can be marked streaming separately.

Two pre-conditions to flip from mock → live:

1. **v2 negotiation** — reply to `initialize` with `protocolVersion: "2.0"` and `capabilities.sampling = {}`.
2. **Manifest declaration** — `"host_capabilities": ["llm.sample"]`. (Unknown capability strings are rejected at publish.)

The huge win: **no BYOK needed for the Anna provider path** — the host owns model selection, billing, and quota. 💚

## **2. Executa tool format 🛠**

- **Protocol:** JSON-RPC 2.0 over **stdio** , line-delimited (`\n`), UTF-8. stdout = protocol only, stderr = logs.

- **`describe`** returns your manifest. Tools declare args via **`parameters`** (an array), **not** `input_schema`:

- **`invoke`** uses `params.tool` + `params.arguments` (note: `tool`, not `name`), and must return the wrapped shape `{ "success": true, "data": {…} }`.

- **Runtime?** Any language — Python, Node, Go, or a compiled binary. The process is **long-running** : keep reading stdin in a loop, flush after each response, and only exit on stdin EOF. (Exiting after one response is the #1 protocol bug 🐛.)

- **CLI:** install from npm — `@anna-ai/app-cli` — then use the standalone runner `anna-app executa dev <path-to-your-plugin>` to boot one plugin in isolation. A quick smoke test without the CLI:

## **3. App manifest & submission 📦**

- Develop/iterate with the CLI, then publish via the `anna-app apps` flow: `push` → `cut` → `release` / `publish` (no raw zip upload — the CLI bundles and uploads for you).

- For an end-to-end **demo run** (login → push → rediscover → permissions → install → test in chat), I just wrote a full step-by-step walkthrough in another thread — it’ll save you a ton of time:

## **Examples to mirror 🪞**

You asked for an SDK / example repo — yes! The **anna-executa-examples** repo is exactly what you want to mirror:

- **`examples/python/sampling-summarizer/`** — a v2 plugin that asks the host for completions via reverse `sampling/createMessage`, **no API key**. This is the closest match to your `answer_question` / `summarize_meeting` tools.
- **`examples/python/basic-tool/`** — clean multi-tool `describe`/`invoke` reference (great template for `detect_question`).
- **`sdk/python/` (`executa_sdk`)** — handles the stdin/stdout reverse-RPC plumbing and `sampling_token` for you, so you don’t hand-roll the JSON-RPC loop.
- Node and Go equivalents live under `examples/nodejs/sampling-tool.js` and `examples/go/sampling-tool/` if you prefer those runtimes.

## **Suggested path to go live 🚀**

1. Add v2 `initialize` (`protocolVersion: "2.0"`, `capabilities.sampling = {}`).
2. Add `"host_capabilities": ["llm.sample"]` to your manifest.
3. Swap your mock LLM call for a reverse `sampling/createMessage` (copy the `sampling-summarizer` pattern).
4. Use `responseFormat: { "type": "json_object" }` where you need structured output.
5. Test locally with `anna-app executa dev`, then `anna-app apps push` and install via the demo walkthrough above.

You’re genuinely close — the mock→live gap here is mostly “stop calling an endpoint, start reverse-RPCing.” Once that clicks it’s a small diff. 💜

Shout if you’d like me to sketch the exact reverse-RPC swap for `answer_question` — happy to help! ✨

---

_[View the full topic](https://forum.anna.partners/t/api-details-to-go-live/123)._
