Procedures
All procedures are in the app's main schema. Call them as
wire_native_app.main.<procedure>, substituting your app's name.
Running agents
Requires wire_user.
Validating your objects
Requires wire_user.
| Procedure |
Purpose |
validate_view(p_view_fqn) |
Check an input view against the input view contract. Returns PASS or FAIL: <violations>. |
validate_table(p_table_fqn, p_agent_type => 'standard') |
Check an output table. Pass 'triage' to also check the override columns. |
Configuration
Requires wire_admin.
| Procedure |
Purpose |
upsert_use_case(p_use_case, p_description, p_active_ind) |
Create or update a use case. |
delete_use_case(p_use_case) |
Delete a use case. |
upsert_class_category(p_use_case, p_class_name, p_class_version, p_label, p_active_ind, p_priority_order, p_description, p_examples, p_actions) |
Create or update a category. p_examples and p_actions are JSON strings. |
delete_class_category(p_id) |
Delete a category by ID. |
upsert_agent_config(...) |
Create or update an agent. See Configuring agents. |
delete_agent_config(p_agent_name, p_use_case, p_version) |
Delete an agent version. |
dry_run_agent(p_use_case, p_agent_name, p_version) |
Test an agent on one row before activating it. |
review_agent_prompt(p_use_case, p_agent_name, p_version) |
Ask AI to review an agent's prompt and suggest improvements. |
Samples
| Procedure |
Role |
Purpose |
list_samples() |
wire_user |
List the samples and whether each is deployed. |
deploy_sample(p_use_case, p_warehouse) |
wire_admin |
Deploy a sample. The app needs USAGE on the warehouse. |
drop_sample(p_use_case) |
wire_admin |
Remove a deployed sample. |
Setup
| Procedure |
Role |
Purpose |
cortex_status() |
wire_user |
Report whether Cortex AI access and the agent functions are in place. |
enable_cortex_features() |
wire_admin |
Create the agent functions after CORTEX_USER was granted post-install. |