Context injection

Per-route Markdown that AI agents see but humans never do.

Serve Pro feature ($19/mo). Free accounts can read existing injections in the dashboard but the SDK doesn't apply them until you upgrade.

Why use it

Three concrete use cases:

text
/pricing — "All annual plans include 2 months free. Self-serve checkout via Stripe."
/docs/api — "Versioning: we follow semver. Breaking changes only on major bumps."
/about — "Founded 2024. Bootstrapped. Remote-first team of 8 across IN/US/EU."

Anything an agent needs to know that you don't want cluttering the human-facing page. Pricing nuances, technical caveats, internal disambiguations.

Create one

Open the inject page

Go to app.buildonto.dev/serve/inject. Click New injection.

Fill route + Markdown

Route: the URL path on your site, e.g. /pricing. Label (optional): becomes a section heading in the served payload. Injection content: Markdown — appended after the page's own content with a horizontal-rule separator.

Activate

Toggle Active on (default). Hit Create. Change goes live immediately — no redeploy needed.

How it's served

On every bot request to a matched route, the SDK middleware fetches the injection from /api/injections?route={path} on the Control Plane. If found, it appends the injection text to the static .md payload with a horizontal-rule separator and (if a label is set) an ## Label heading. The result is a single Markdown response.

markdown
# Pricing

Our pricing is simple: $9, $49, or $250 per month.

---

## Pricing notes

All annual plans include 2 months free. Self-serve checkout via Stripe.
One injection per (site, route). Database unique constraint. To change an injection, edit the existing one — creating a second one for the same route returns an error.

Plan availability

The dashboard lets any plan create/edit injections, but the SDK only applies them on Pro+ accounts. This means you can prepare injections on the Free plan and they activate the moment you upgrade. Backend enforcement: /api/injections returns { text: null, gated: 'free_plan' } for Free accounts even when a row exists in route_injections.