Flows have seven AI blocks. They use the models and vector fields you set up in AI and run on the server, so no key or rule has to reach the browser.

Ask a model

1

Trigger

An HTTP trigger receives a support message.
2

Ask a model

prompt: Classify this message as billing, bug or other. Reply as JSON {"category": "..."}: {{ input.message }}, with JSON on.
3

Update record

data: { "category": "{{ steps.classify.output.json.category }}" }.

Answer from my data

The block most apps want: ask a question, get an answer grounded in your own records. It returns the answer and the records it used (sources), so you can show where it came from.
Flows run with the developer’s authority: they can read any record. If a person’s question must only see that person’s data, pass filters that restrict it (for example { "owner_id": "{{ auth.user_id }}" }), or search with pawabase.from("…").similar(…) from the app, where the table’s access rule applies.

Search by meaning

ai.search takes resource and either text or vector, plus field, limit (default 5), metric, max_distance and filters. Vector fields are left out of the records it returns.

Errors

A model that is off, missing or of the wrong kind, or a provider that fails, fails the step with code ai_error and the provider’s reason. Add an on error branch to handle it, or give the model a fallback in AI → Models.

Run an agent

If the agent needs a person’s approval, its status is waiting and pending lists what it is waiting on. See Approvals and limits.

Search and add to a knowledge base

ai.knowledge.search takes the knowledge base (base), a query and a limit (default 5), and outputs results, each with text, title, source and score. ai.knowledge.add takes the base, the text, and optionally a title, a source that identifies the document, and an owner_id that keeps it private to one person. Every block and every setting is listed in the AI block reference.