Concepts

Ad Context

Describe where an ad appears so Koah can match the best creative and format.

Every Koah SDK asks you to describe where an ad is being placed and what the surrounding content is. That description is the ad context.

Koah uses context to select the most relevant creative, determine the optimal format, and adapt the ad copy so it feels natural within your app. There are four context types you can specify, each with its own set of fields.

Context types

Conversation

For AI-powered chat, agent-powered conversational user interfaces.

  • question — the user's most recent message
  • answer — the assistant's response (may be null while streaming, see below)
  • conversation ID — optional. A stable ID for the thread. Koah uses it to link requests from the same conversation. Each SDK names this field in its reference.

Article

For long-form written content.

  • title — the article or page title
  • content — the body text (or an excerpt; send 500–1000 characters of representative text)
  • about — an optional short topic hint

Feed

For social or community streams alongside user posts.

  • text — the post body
  • source — who posted it (author/community)
  • description — optional supporting context

Static

For homepages, landing pages, or any surface with no conversational or article content. Koah serves a contextually-neutral ad sized to your slot.

Streaming: request before the answer is ready

In a chat UI you don't have to wait for the assistant to finish. Request the ad as soon as you have the user's question, leaving answer empty (null/unset) — Koah matches on the question alone, so the ad can be ready before the answer finishes streaming.

Was this helpful?