Package ai.confiqure
Annotation Type Confiqure
Marks a class as a confiqure.ai configuration target. The confiqure CLI
scans source files for this annotation and uploads them; the confiqure
backend AI parses the annotated class and generates the chat playbook.
@Confiqure(
end = "/notifications",
type = Confiqure.Type.SINGLE,
scope = Confiqure.Scope.LIMITED,
dataScope = Confiqure.DataScope.ORG,
tools = {"SEND_TEST_NOTIFICATION"}
)
public class Notifications { ... }
Tools come in two kinds, both declared once as a Confiqure.Tool-annotated
method and referenced by name in tools():
- Server-side (
serverSide=true, the default) — a real controller method confiqure invokes over HTTP. Returns data or performs a backend action; no UI. - Frontend (
serverSide=false) — a contract-stub method (body never runs on the backend) whose handler runs in the host's browser via the embed SDK. Use for anything needing a UI (OAuth, a picker, rendering a view). The method signature still carries the I/O contract: its@RequestBodyDTO is the input, its return type the output. Example:@Confiqure.Tool(name = "show_report", serverSide = false) public String showReport(@RequestBody StockFilterData filter) { return null; }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceVerbatim, auditable consent capture on a Boolean field.static enumOwnership of a saved configuration: shared across an organization, or private to each end user.static @interfaceMarks a controller method as the workspace's default callback hook.static @interfaceDeclarative flow gate on a single field: the confiqure conversation may only WRITE this field when theConfiqure.Gate.requires()predicate istrueover the root instance's current values.static @interfaceOpts atype = MULTIconfiguration class OUT of chat deletion.static enumstatic @interfaceClassifies a String field as a secret (password, API token, TOTP seed, …).static enumThe kinds of secret aConfiqure.Secretfield can hold.static @interfaceDeclarative flow gate on a whole nested section: ANY write at or under this field's path is only permitted while theConfiqure.SectionGate.requires()predicate istrueover the root instance's current values.static @interfaceMarks a field as engine- or tool-populated ONLY: every conversation-proposed write to it (or to any field beneath it) is rejected.static @interfaceMarks a method as a tool the chat agent can invoke during a session.static @interfaceDeclarative flow gate on a host tool, declared on the endpoint (root) class: the named tool is only dispatchable while theConfiqure.ToolGate.requires()predicate istrueover the bound instance's current values.static @interfaceContainer for repeatedConfiqure.ToolGatedeclarations on one endpoint class.static enum -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionONLY meaningful withtype =Confiqure.Type.FACTS: the relative path of theGETendpoint in YOUR application that returns the current facts for one end user.Who a saved configuration belongs to.Chat endpoint segment.Chat context scope: LIMITED (this endpoint only) or UNLIMITED (can navigate all endpoints).String[]Names of @Confiqure.Tool methods this endpoint can invoke during chat.What this class is: SINGLE (one configuration record per user), MULTI (a table of records), orConfiqure.Type.FACTS— not a configuration at all, but the read-only user-facts contract your application serves back to confiqure (seecallback()).
-
Element Details
-
end
String endChat endpoint segment. Defaults to snake_case of the class name when blank.- Default:
""
-
type
Confiqure.Type typeWhat this class is: SINGLE (one configuration record per user), MULTI (a table of records), orConfiqure.Type.FACTS— not a configuration at all, but the read-only user-facts contract your application serves back to confiqure (seecallback()).- Default:
SINGLE
-
callback
String callbackONLY meaningful withtype =Confiqure.Type.FACTS: the relative path of theGETendpoint in YOUR application that returns the current facts for one end user. confiqure callshostBaseUrl + callbackwith the user's handle and binds the JSON response into this class.@Confiqure(type = Confiqure.Type.FACTS, callback = "/api/confiqure/user-facts") public class SellerFacts { // The product categories this seller actually sells in. private List<String> sellingCategories; // How many of their listings are currently stranded. private Integer strandedCount; }Comment every field — the comment is what tells the model what the fact MEANS. Ignored on SINGLE/MULTI classes (lifecycle callbacks stay workspace-level via
Confiqure.DefaultCallbackHook).- Default:
""
-
scope
Confiqure.Scope scopeChat context scope: LIMITED (this endpoint only) or UNLIMITED (can navigate all endpoints).- Default:
LIMITED
-
tools
String[] toolsNames of @Confiqure.Tool methods this endpoint can invoke during chat.- Default:
{}
-
dataScope
Confiqure.DataScope dataScopeWho a saved configuration belongs to.ORG(default) — the record is shared across everyone in the end user's organization: when the host mints an embed token carrying anorganizationId, all members of that org see and edit ONE shared instance (suppliers, business model, repricer settings — anything org-wide).USERopts a genuinely personal endpoint out, so each end user gets their own private record even within an org (personal credentials, individual preferences).Org sharing activates only when the host's token mint sends
organizationId; an org-less host, or a token without one, behaves exactly as a per-user endpoint. Declared, never inferred — liketype()/scope(), this is read straight from the annotation.- Default:
ORG
-