Element Catalog
Browse every element of the Imperal SDK in one place — UI components, decorators, SDL roles, ctx methods and data types, each with a copy-pasteable example.
Every public element of the Imperal SDK, structured by category and searchable on one page. This catalog is generated from the canonical SDK reference, so when the SDK gains an element it appears here automatically. For a per-symbol deep dive, follow each element's anchor or its dedicated reference page.
286 elements across 6 categories
Declarative panel primitives — compose surfaces with `ui.*`.
The previews below are live — rendered by @imperal/ui-kit, the same declarative renderer the Imperal Panel uses, from a sample of each component. The canonical contract (props, types, enums) is the signature shown on each element, sourced from the SDK reference.
ui.Accordion(
sections=[
{
"title": "Section one",
"content": ui.Text(content="Body one"),
},
{
"title": "Section two",
"content": ui.Text(content="Body two"),
},
],
)ui.Alert(
type="info",
title="Heads up",
message="This is an alert message.",
)ui.Audio(
src="https://www.w3schools.com/html/horse.mp3",
title="Sample audio",
controls=True,
)ui.Badge(label="New", color="blue")(label, variant?, on_click?, disabled?, size?, full_width?, icon?, icon_left?, icon_right?, loading?, loading_label?, type?) → UINode#ui.Button(label="Click me", variant="primary")ui.Card(
title="Card title",
subtitle="Subtitle",
content=ui.Text(content="Card body content."),
)(data, type?, x_key?, height?, colors?, y2_keys?, title?, description?, show_legend?, show_data_table?) → UINode#ui.Chart(
type="line",
x_key="label",
data=[
{
"label": "Mon",
"value": 3,
},
{
"label": "Tue",
"value": 7,
},
{
"label": "Wed",
"value": 5,
},
],
)(label?, value?, on_change?, param_name?, description?, error?, required?, disabled?) → UINode#ui.Checkbox(
label="Email me deploy results",
value=True,
description="One message per finished deploy.",
param_name="notify",
)ui.Code(language="python", content="def hello():\n print('hi')")ui.Column(
children=[
ui.Text(content="Row A"),
ui.Text(content="Row B"),
],
direction="column",
)ui.DataColumn(key="last_sync", label="Save", sortable=True, width="width")(columns, rows, on_row_click?, on_cell_edit?, empty_text?, max_height?, sticky_header?) → UINode#ui.DataTable(
columns=[
{
"key": "name",
"label": "Name",
},
{
"key": "role",
"label": "Role",
},
],
rows=[
{
"name": "Ada",
"role": "Admin",
},
{
"name": "Linus",
"role": "Dev",
},
],
)(value?, placeholder?, on_change?, param_name?, label?, description?, error?, required?, disabled?, min?, max?) → UINode#ui.DatePicker(placeholder="Pick a date", value="2026-06-21")ui.Dialog(
title="Confirm action",
content="Are you sure?",
confirm_label="Yes",
cancel_label="No",
)ui.Empty(message="Nothing here yet", icon="Inbox")ui.Error(title="Something went wrong", message="Could not load data.")(accept?, max_size_mb?, multiple?, on_upload?, param_name?, blocked_extensions?, max_total_mb?, max_files?, title?, hint?, variant?, show_previews?) → UINode#defaultfuturisticcompactui.FileUpload(accept="image/*", max_size_mb=5)ui.Form(
submit_label="Save",
action="#",
children=[
ui.Input(
label="Email",
placeholder="you@example.com",
param_name="email",
),
],
)(nodes, edges, layout?, height?, min_node_size?, max_node_size?, edge_label_visible?, color_by?, on_node_click?) → UINode#ui.Graph(
nodes=[
{
"id": "a",
"label": "A",
},
{
"id": "b",
"label": "B",
},
{
"id": "c",
"label": "C",
},
],
edges=[
{
"source": "a",
"target": "b",
},
{
"source": "b",
"target": "c",
},
],
)ui.Grid(
columns=2,
children=[
ui.Card(title="One"),
ui.Card(title="Two"),
],
)ui.Header(text="Section heading", level=2, subtitle="A subtitle")ui.Html(content="<p style='margin:0'>Inline <b>HTML</b> content.</p>")ui.Image(
src="https://placehold.co/200x120",
alt="Sample",
width=200,
height=120,
caption="A caption",
)(placeholder?, on_submit?, value?, param_name?, type?, label?, description?, error?, required?, disabled?, readonly?, variant?) → UINode#textpasswordemailnumberurlui.Input(placeholder="Type here…", value="Hello", param_name="demo")ui.KeyValue(
items=[
{
"key": "Status",
"value": "Active",
},
{
"key": "Plan",
"value": "Pro",
},
],
)ui.Link(label="Imperal docs", href="https://docs.imperal.io")(items, searchable?, grouped_by?, page_size?, on_end_reached?, selectable?, bulk_actions?, total_items?, extra_info?, title?, empty_text?, search_placeholder?, max_height?) → UINode#ui.List(
items=[
{
"id": "1",
"title": "First item",
"subtitle": "A subtitle",
},
{
"id": "2",
"title": "Second item",
},
{
"id": "3",
"title": "Third item",
},
],
)(id, title, subtitle?, meta?, avatar?, badge?, selected?, on_click?, actions?, draggable?, droppable?, on_drop?, icon?, expandable?, expanded_content?) → UINode#ui.ListItem(
id="note_1042",
title="Invoice #1042",
subtitle="subtitle",
meta="meta",
)ui.Markdown(
content="# Title\n\nSome **markdown** with a [link](https://imperal.io) and `code`.",
)ui.Menu(
items=[
{
"label": "Edit",
},
{
"label": "Duplicate",
},
{
"label": "Delete",
},
],
)(title?, content?, confirm_label?, cancel_label?, on_confirm?, subtitle?, size?, max_width?, dismissible?, destructive?, on_close?, open?) → UINode#ui.Modal(
title="Delete project?",
subtitle="This cannot be undone.",
content=ui.Text(content="The project and all of its deployments are removed."),
confirm_label="Delete",
cancel_label="Cancel",
destructive=True,
)(options, values?, placeholder?, param_name?, label?, description?, error?, required?, disabled?) → UINode#ui.MultiSelect(
placeholder="Pick tags",
options=[
{
"label": "Alpha",
"value": "a",
},
{
"label": "Beta",
"value": "b",
},
],
values=[
"a",
],
)ui.Page(
title="Page title",
subtitle="Subtitle",
children=[
ui.Text(content="Page content."),
],
)(placeholder?, on_submit?, value?, param_name?, label?, description?, error?, required?, disabled?, readonly?) → UINode#ui.Password(placeholder="••••••", param_name="pwd", type="password")ui.Progress(value=64, label="Uploading", variant="primary")(options, value?, on_change?, param_name?, label?, description?, error?, required?, disabled?, orientation?) → UINode#ui.RadioGroup(
label="Billing cycle",
value="monthly",
param_name="cycle",
options=[
{
"label": "Monthly",
"value": "monthly",
},
{
"label": "Yearly (2 months free)",
"value": "yearly",
},
],
)(content?, placeholder?, on_save?, on_change?, param_name?, toolbar?, label?, description?, error?, required?) → UINode#ui.RichEditor(
content="<p>Rich <b>text</b> editor.</p>",
placeholder="Write…",
)ui.Row(
children=[
ui.Badge(label="A"),
ui.Badge(label="B"),
],
direction="row",
)ui.Section(
title="Section",
children=[
ui.Text(content="Section content."),
],
)(options, value?, placeholder?, on_change?, param_name?, label?, description?, error?, required?, disabled?) → UINode#ui.Select(
placeholder="Choose one",
value="1",
options=[
{
"label": "One",
"value": "1",
},
{
"label": "Two",
"value": "2",
},
],
)ui.SlideOver(
title="Slide over",
open=True,
children=[
ui.Text(content="Slide-over content."),
],
)ui.Slider(min=0, max=100, value=40, step=1, label="Volume")ui.Stack(
direction="row",
gap=2,
children=[
ui.Badge(label="A"),
ui.Badge(label="B"),
],
)ui.Stat(label="Active users", value="1,284", trend="+12%")ui.Stats(
columns=2,
children=[
ui.Stat(label="Users", value="1.2k"),
ui.Stat(label="Revenue", value="$8.4k"),
],
)ui.Tabs(
tabs=[
{
"label": "Overview",
"content": ui.Text(content="First tab."),
},
{
"label": "Details",
"content": ui.Text(content="Second tab."),
},
],
)(values?, suggestions?, placeholder?, param_name?, on_change?, grouped_by?, delimiters?, validate?, validate_message?, label?, description?, error?, required?) → UINode#ui.TagInput(
placeholder="Add tags…",
values=[
"alpha",
"beta",
],
)ui.Text(content="Example text.", variant="body")(placeholder?, value?, rows?, on_submit?, param_name?, label?, description?, error?, required?, disabled?, readonly?) → UINode#ui.TextArea(
placeholder="Write something…",
value="Multiline\ntext",
rows=3,
)ui.Timeline(
items=[
{
"title": "Created",
"description": "09:00",
},
{
"title": "Updated",
"description": "10:30",
},
],
)ui.Toast(
title="Deploy queued",
message="Building imperal-panel #482.",
variant="success",
)ui.Toggle(label="Enabled", value=True)ui.Tooltip(
content="Tooltip text",
children=[
ui.Button(label="Hover me"),
],
)ui.TrayResponse(badge="badge", panel="panel")ui.Tree(
nodes=[
{
"label": "root",
"children": [
{
"label": "child A",
},
{
"label": "child B",
},
],
},
],
)Declare handlers, schedules, webhooks, skeletons and more.
(name, description, params?, action_type?, event?, chain_callable?, effects?, id_projection?, background?, long_running?, data_model?, ui_builder?)#@chat.function(
name="send_invoice",
description="Send the invoice for one order to the customer.",
params={},
)
async def send_invoice(ctx):
...@ext.cache_model(name="send_invoice")
async def send_invoice(ctx):
...@ext.emits(event_type="order.created", schema_ref="note.v1")
async def emits(ctx):
...@ext.file_sink(tool="upload_report", accepts=[], arg="arg", arg_kind="text")
async def file_sink(ctx):
...@ext.lifecycle
async def lifecycle(ctx):
...@ext.oauth(provider="google", collection="notes")
async def oauth(ctx):
...@ext.on_upgrade(version="1.4.0")
async def on_upgrade(ctx):
...@ext.panel(panel_id="panel_1042", slot="center")
async def panel(ctx):
...(name, description, required?, write_mode?, max_bytes?, rotation_hint_days?, scope?, env_fallback?)#@ext.secret(
name="send_invoice",
description="Send the invoice for one order to the customer.",
required=True,
)
async def send_invoice(ctx):
...@ext.skeleton(section_name="section", alert=True)
async def skeleton(ctx):
...@ext.tool(name="send_invoice", scopes=[])
async def send_invoice(ctx):
...@ext.tray(tray_id="inbox", icon="Circle")
async def tray(ctx):
...@ext.webhook(path="/billing", method="POST")
async def webhook(ctx):
...@ext.widget(widget_id="widget_1042", slot="dashboard.stats")
async def widget(ctx):
...Semantic field facets — type the *meaning* of your entity fields.
AccessLeveledclass Record(sdl.Entity, sdl.AccessLeveled):
"""Gains:
access_visibility,
classification,
clearance_required,
handling_caveats,
"""{ active_calories_kcal?, active_minutes?, activity_distance_m?, floors_climbed?, steps? }#ActivityMetricsclass Record(sdl.Entity, sdl.ActivityMetrics):
"""Gains:
active_calories_kcal,
active_minutes,
activity_distance_m,
floors_climbed,
… 1 more
"""{ actuator_color_hex?, actuator_position?, color_temp_k?, level_pct?, locked?, mode?, on? }#ActuatorStateclass Record(sdl.Entity, sdl.ActuatorState):
"""Gains:
actuator_color_hex,
actuator_position,
color_temp_k,
level_pct,
… 3 more
"""AdminRegionclass Record(sdl.Entity, sdl.AdminRegion):
"""Gains: continent, country_code, county, locality, …"""AdmissionPolicyclass Record(sdl.Entity, sdl.AdmissionPolicy):
"""Gains: doors_open_at, dress_code, min_age, prohibited_items, …"""AgendaSlotclass Record(sdl.Entity, sdl.AgendaSlot):
"""Gains: order_index, parent_event, session_type, speakers, …"""Aggregatedclass Record(sdl.Entity, sdl.Aggregated):
"""Gains: aggregation, fill_policy, granularity, window_end, …"""AIProvenanceclass Record(sdl.Entity, sdl.AIProvenance):
"""Gains: ai_confidence, ai_model, generated_by_ai, prompt_ref, …"""{ alert_severity?, alert_state?, alert_threshold?, fired_at?, resolved_at?, rule_name? }#Alertableclass Record(sdl.Entity, sdl.Alertable):
"""Gains: alert_severity, alert_state, alert_threshold, fired_at, …"""Angleclass Record(sdl.Entity, sdl.Angle):
"""Gains: angle_deg, angle_unit"""ApiEndpointclass Record(sdl.Entity, sdl.ApiEndpoint):
"""Gains: api_path, auth_required, deprecated, method, …"""Approvableclass Record(sdl.Entity, sdl.Approvable):
"""Gains: approval_status, approver, decided_at, decision_note"""{ archive_format?, compression_ratio?, entry_count?, is_encrypted?, uncompressed_size_bytes? }#Archiveclass Record(sdl.Entity, sdl.Archive):
"""Gains:
archive_format,
compression_ratio,
entry_count,
is_encrypted,
… 1 more
"""Areaclass Record(sdl.Entity, sdl.Area):
"""Gains: area_m2, area_unit"""Assignableclass Record(sdl.Entity, sdl.Assignable):
"""Gains: assigned_at, assignee, assignees, delegated_by, …"""Attachedclass Record(sdl.Entity, sdl.Attached):
"""Gains:
attachment_count,
attachments,
has_attachments,
inline_images,
"""Attestedclass Record(sdl.Entity, sdl.Attested):
"""Gains:
attestation_confidence,
attestation_result,
attestation_type,
attested_by,
"""{ audio_codec?, bit_depth?, bitrate_kbps?, channels?, loudness_lufs?, sample_rate_hz? }#AudioTrackclass Record(sdl.Entity, sdl.AudioTrack):
"""Gains: audio_codec, bit_depth, bitrate_kbps, channels, …"""Auditableclass Record(sdl.Entity, sdl.Auditable):
"""Gains: action, actor, audit_target, changes, …"""Authorshipclass Record(sdl.Entity, sdl.Authorship):
"""Gains: author, contributors, creator, editors, …"""{ backup_is_verified?, backup_kind?, backup_size_bytes?, retain_until?, snapshot_id?, source_resource?, taken_at? }#Backupclass Record(sdl.Entity, sdl.Backup):
"""Gains:
backup_is_verified,
backup_kind,
backup_size_bytes,
retain_until,
… 3 more
"""Balancedclass Record(sdl.Entity, sdl.Balanced):
"""Gains:
available_balance,
balance,
balance_currency,
credit_limit,
… 1 more
"""{ biometric_context?, biometric_measured_at?, biometric_type?, biometric_unit?, biometric_value?, reference_high?, reference_low? }#Biometricclass Record(sdl.Entity, sdl.Biometric):
"""Gains:
biometric_context,
biometric_measured_at,
biometric_type,
biometric_unit,
… 3 more
"""Bitrateclass Record(sdl.Entity, sdl.Bitrate):
"""Gains: bitrate_bps, bitrate_unit"""Blockableclass Record(sdl.Entity, sdl.Blockable):
"""Gains: blocked_reason, blocked_since, is_blocked, waiting_on"""Boardedclass Record(sdl.Entity, sdl.Boarded):
"""Gains: board, column, position, swimlane"""Bodiedclass Record(sdl.Entity, sdl.Bodied):
"""Gains: body, body_format, raw_body"""BodyCompositionclass Record(sdl.Entity, sdl.BodyComposition):
"""Gains: bmi, body_fat_pct, body_measured_at, body_weight_kg, …"""Bookedclass Record(sdl.Entity, sdl.Booked):
"""Gains:
booked_at,
cancellation_deadline,
cancelled_at,
check_in_at,
… 1 more
"""BoundingBoxclass Record(sdl.Entity, sdl.BoundingBox):
"""Gains: max_lat, max_lon, min_lat, min_lon"""Brandedclass Record(sdl.Entity, sdl.Branded):
"""Gains: brand, country_of_origin, manufacturer, model_name, …"""Bundleclass Record(sdl.Entity, sdl.Bundle):
"""Gains: bundle_items, bundle_type, is_bundle"""CalendarFeedclass Record(sdl.Entity, sdl.CalendarFeed):
"""Gains: calendar_color, calendar_name, feed_url, ical_uid, …"""Callableclass Record(sdl.Entity, sdl.Callable):
"""Gains: answered, call_direction, call_state, call_type, …"""Cancellationclass Record(sdl.Entity, sdl.Cancellation):
"""Gains: is_cancelled, is_refundable, refund_deadline, refund_policy"""{ capacity_remaining?, capacity_total?, is_sold_out?, registered_count?, waitlist_count? }#Capacityclass Record(sdl.Entity, sdl.Capacity):
"""Gains:
capacity_remaining,
capacity_total,
is_sold_out,
registered_count,
… 1 more
"""{ case_number?, case_resolution?, case_stage?, case_type?, closed_at?, jurisdiction?, opened_at? }#Caseableclass Record(sdl.Entity, sdl.Caseable):
"""Gains: case_number, case_resolution, case_stage, case_type, …"""Categorizedclass Record(sdl.Entity, sdl.Categorized):
"""Gains: categories, keywords, labels, tags, …"""Certificatedclass Record(sdl.Entity, sdl.Certificated):
"""Gains: cert_is_valid, cert_issuer, cert_subject, fingerprint, …"""Checklistclass Record(sdl.Entity, sdl.Checklist):
"""Gains: checked_count, checklist_items, checklist_total"""ColorMaterialclass Record(sdl.Entity, sdl.ColorMaterial):
"""Gains: color, finish, material, material_color_hex, …"""Completableclass Record(sdl.Entity, sdl.Completable):
"""Gains: completed_at, completed_by, is_done, resolution"""Compliantclass Record(sdl.Entity, sdl.Compliant):
"""Gains: assessed_by, compliance_status, control_id, framework, …"""ComputeSpecclass Record(sdl.Entity, sdl.ComputeSpec):
"""Gains: arch, disk_bytes, gpu_count, memory_bytes, …"""{ ci_lower?, ci_upper?, confidence_level?, is_significant?, margin_of_error?, p_value? }#Confidentclass Record(sdl.Entity, sdl.Confident):
"""Gains: ci_lower, ci_upper, confidence_level, is_significant, …"""{ config_key?, config_source?, config_value?, config_value_type?, default_value?, is_secret? }#ConfigSettingclass Record(sdl.Entity, sdl.ConfigSetting):
"""Gains:
config_key,
config_source,
config_value,
config_value_type,
… 2 more
"""{ consent_proof?, consent_purpose?, consent_state?, consent_subject?, granted_at?, legal_basis? }#Consentedclass Record(sdl.Entity, sdl.Consented):
"""Gains:
consent_proof,
consent_purpose,
consent_state,
consent_subject,
… 2 more
"""Consumableclass Record(sdl.Entity, sdl.Consumable):
"""Gains: consumable_type, low, remaining_pct, replace_after_at"""ContactPointsclass Record(sdl.Entity, sdl.ContactPoints):
"""Gains: emails, phones, preferred_channel, social_handles, …"""Containerclass Record(sdl.Entity, sdl.Container):
"""Gains: compose_project, container_id, container_name, image, …"""ContentSafetyclass Record(sdl.Entity, sdl.ContentSafety):
"""Gains: is_nsfw, moderation_labels, scan_state, scanned_at, …"""{ channel_name?, conversation_participant_count?, conversation_ref?, conversation_type?, is_group?, last_message_at?, last_preview? }#Conversationalclass Record(sdl.Entity, sdl.Conversational):
"""Gains:
channel_name,
conversation_participant_count,
conversation_ref,
conversation_type,
… 3 more
"""{ recipient_count?, recipients_bcc?, recipients_cc?, recipients_to?, reply_to?, sender? }#Correspondentsclass Record(sdl.Entity, sdl.Correspondents):
"""Gains:
recipient_count,
recipients_bcc,
recipients_cc,
recipients_to,
… 2 more
"""DataRecordclass Record(sdl.Entity, sdl.DataRecord):
"""Gains: query, row_id, schema_ref, table"""DataSizeclass Record(sdl.Entity, sdl.DataSize):
"""Gains: bytes, data_size_unit"""Dependenciesclass Record(sdl.Entity, sdl.Dependencies):
"""Gains: blocked_by, blocks, related"""DeviceIdentityclass Record(sdl.Entity, sdl.DeviceIdentity):
"""Gains:
device_id,
device_manufacturer,
device_model,
firmware_version,
… 1 more
"""DeviceStateclass Record(sdl.Entity, sdl.DeviceState):
"""Gains: battery_pct, device_last_seen_at, online, signal_strength"""Dimensionedclass Record(sdl.Entity, sdl.Dimensioned):
"""Gains: dimensions"""Dimensions3Dclass Record(sdl.Entity, sdl.Dimensions3D):
"""Gains: dim_depth, dim_height, dim_unit, dim_width"""Discountableclass Record(sdl.Entity, sdl.Discountable):
"""Gains: discount_pct, is_on_sale, sale_price"""Draftableclass Record(sdl.Entity, sdl.Draftable):
"""Gains:
is_auto_generated,
is_draft,
last_saved_at,
scheduled_send_at,
"""Durationclass Record(sdl.Entity, sdl.Duration):
"""Gains: duration_display_unit, duration_s"""Editorialclass Record(sdl.Entity, sdl.Editorial):
"""Gains:
editorial_is_draft,
editorial_state,
first_published_at,
published_at,
"""Entityclass Record(sdl.Entity, sdl.Entity):
"""Gains: description, id, kind, status, …"""Estimableclass Record(sdl.Entity, sdl.Estimable):
"""Gains: estimate_s, remaining_s, spent_s"""Eventfulclass Record(sdl.Entity, sdl.Eventful):
"""Gains: event_host, event_organizer, event_type, venue"""Excerptableclass Record(sdl.Entity, sdl.Excerptable):
"""Gains: excerpt, reading_time_s, summary, word_count"""{ checksum_sha256?, extension?, filename?, media_class?, mime_type?, path?, permissions?, size_bytes? }#FileObjectclass Record(sdl.Entity, sdl.FileObject):
"""Gains: checksum_sha256, extension, filename, media_class, …"""Geofenceclass Record(sdl.Entity, sdl.Geofence):
"""Gains: center_lat, center_lon, dwell_s, radius_m, …"""Geolocatedclass Record(sdl.Entity, sdl.Geolocated):
"""Gains: accuracy_m, altitude_m, geo_speed_mps, heading_deg, …"""HostResourceclass Record(sdl.Entity, sdl.HostResource):
"""Gains: environment, host_region, hostname, resource_id"""Iconifiedclass Record(sdl.Entity, sdl.Iconified):
"""Gains: avatar_url, color_hex, emoji, icon"""ImageMediaclass Record(sdl.Entity, sdl.ImageMedia):
"""Gains: blurhash, color_space, exif, height, …"""{ availability?, backorderable?, in_stock?, is_low_stock?, low_stock_threshold?, preorder? }#Inventoryclass Record(sdl.Entity, sdl.Inventory):
"""Gains: availability, backorderable, in_stock, is_low_stock, …"""Invoicedclass Record(sdl.Entity, sdl.Invoiced):
"""Gains: invoice_due_at, invoice_number, paid_at, payment_status, …"""Lengthclass Record(sdl.Entity, sdl.Length):
"""Gains: length_m, length_unit"""Lifecycleclass Record(sdl.Entity, sdl.Lifecycle):
"""Gains: is_archived, is_deleted, is_favorite, is_pinned, …"""{ available_locales?, language?, languages?, locale?, localized_description?, localized_title?, text_direction? }#Localizedclass Record(sdl.Entity, sdl.Localized):
"""Gains: available_locales, language, languages, locale, …"""{ dimension?, formatted_value?, uncertainty?, unit?, unit_family?, value?, value_type? }#Measuredclass Record(sdl.Entity, sdl.Measured):
"""Gains: dimension, formatted_value, uncertainty, unit, …"""MessageStateclass Record(sdl.Entity, sdl.MessageState):
"""Gains: delivery_state, direction, edited_at, is_from_me, …"""Monetaryclass Record(sdl.Entity, sdl.Monetary):
"""Gains: amount, currency"""NetAssetclass Record(sdl.Entity, sdl.NetAsset):
"""Gains: domain, ip, port, protocol, …"""{ active_now?, admins?, host?, join_state?, members?, organizer?, participant_count?, typing? }#Participantsclass Record(sdl.Entity, sdl.Participants):
"""Gains: active_now, admins, host, join_state, …"""Percentageclass Record(sdl.Entity, sdl.Percentage):
"""Gains: percent"""Permissionedclass Record(sdl.Entity, sdl.Permissioned):
"""Gains: can_delete, can_read, can_share, can_write, …"""Placedclass Record(sdl.Entity, sdl.Placed):
"""Gains: place_name, place_type, plus_code"""PostalAddressclass Record(sdl.Entity, sdl.PostalAddress):
"""Gains: city, country, postal_code, region, …"""Presenceclass Record(sdl.Entity, sdl.Presence):
"""Gains: active_until, last_seen_at, online_status, status_emoji, …"""Pricedclass Record(sdl.Entity, sdl.Priced):
"""Gains:
compare_at_price,
list_price,
price_currency,
price_includes_tax,
… 1 more
"""Prioritizedclass Record(sdl.Entity, sdl.Prioritized):
"""Gains: priority, severity, urgency"""{ age_restriction?, certifications?, hs_code?, requires_prescription?, restricted_regions? }#ProductComplianceclass Record(sdl.Entity, sdl.ProductCompliance):
"""Gains:
age_restriction,
certifications,
hs_code,
requires_prescription,
… 1 more
"""Progressclass Record(sdl.Entity, sdl.Progress):
"""Gains: done_count, progress, total_count"""Rangeclass Record(sdl.Entity, sdl.Range):
"""Gains: max_value, min_value, target"""Ratedclass Record(sdl.Entity, sdl.Rated):
"""Gains: distribution, max_score, rating, rating_count"""Reactableclass Record(sdl.Entity, sdl.Reactable):
"""Gains: my_reactions, reaction_count, reactions"""{ is_recurring_master?, next_occurrence_at?, recurrence_anchor?, recurrence_count?, recurrence_rule?, recurrence_until? }#Recurringclass Record(sdl.Entity, sdl.Recurring):
"""Gains:
is_recurring_master,
next_occurrence_at,
recurrence_anchor,
recurrence_count,
… 2 more
"""Refclass Record(sdl.Entity, sdl.Ref):
"""Gains: id, kind, title"""Retainedclass Record(sdl.Entity, sdl.Retained):
"""Gains: legal_hold, retention_class, sec_retain_until"""Reviewedclass Record(sdl.Entity, sdl.Reviewed):
"""Gains: helpfulness, is_verified, review_body, would_recommend"""RiskScoredclass Record(sdl.Entity, sdl.RiskScored):
"""Gains: risk_factors, risk_level, risk_score"""Routedclass Record(sdl.Entity, sdl.Routed):
"""Gains: destination, distance_m, origin, route_duration_s, …"""RSVPclass Record(sdl.Entity, sdl.RSVP):
"""Gains: check_in_method, checked_in, is_no_show, rsvp_state"""Schedulableclass Record(sdl.Entity, sdl.Schedulable):
"""Gains: all_day, due_at, end_at, start_at, …"""SensorReadingclass Record(sdl.Entity, sdl.SensorReading):
"""Gains: measured_at, quality, sensor_type, sensor_unit, …"""Sentimentclass Record(sdl.Entity, sdl.Sentiment):
"""Gains: magnitude, sentiment, sentiment_score"""ServiceHealthclass Record(sdl.Entity, sdl.ServiceHealth):
"""Gains: health, last_check_at, uptime_s"""Signedclass Record(sdl.Entity, sdl.Signed):
"""Gains: algorithm, signature, signature_is_valid, signed_at, …"""SleepRecordclass Record(sdl.Entity, sdl.SleepRecord):
"""Gains:
awake_at,
in_bed_at,
sleep_duration_s,
sleep_quality_score,
… 1 more
"""Speedclass Record(sdl.Entity, sdl.Speed):
"""Gains: speed_mps, speed_unit"""{ billing_interval?, billing_interval_count?, cancel_at_period_end?, current_period_end?, current_period_start?, recurring_amount?, subscription_status?, trial_end? }#Subscribableclass Record(sdl.Entity, sdl.Subscribable):
"""Gains:
billing_interval,
billing_interval_count,
cancel_at_period_end,
current_period_end,
… 4 more
"""Temperatureclass Record(sdl.Entity, sdl.Temperature):
"""Gains: temp_c, temp_unit"""Threadedclass Record(sdl.Entity, sdl.Threaded):
"""Gains: depth, reply_to_message, root, thread_ref"""Thresholdclass Record(sdl.Entity, sdl.Threshold):
"""Gains: breached, threshold, threshold_target"""Ticketedclass Record(sdl.Entity, sdl.Ticketed):
"""Gains: barcode, seat, ticket_price, ticket_type"""TimeSeriesPointclass Record(sdl.Entity, sdl.TimeSeriesPoint):
"""Gains: ts_timestamp, ts_value"""Timestampedclass Record(sdl.Entity, sdl.Timestamped):
"""Gains: created_at, deleted_at, updated_at"""Transcribableclass Record(sdl.Entity, sdl.Transcribable):
"""Gains: captions_url, transcript, transcript_language"""Trendedclass Record(sdl.Entity, sdl.Trended):
"""Gains: change_pct, delta, trend, trend_period"""{ channel?, content_hash?, is_latest?, released_at?, revision?, revision_of?, semver?, version? }#Versionedclass Record(sdl.Entity, sdl.Versioned):
"""Gains: channel, content_hash, is_latest, released_at, …"""VideoTrackclass Record(sdl.Entity, sdl.VideoTrack):
"""Gains: fps, hdr, video_bitrate_kbps, video_codec, …"""VitalSignclass Record(sdl.Entity, sdl.VitalSign):
"""Gains:
blood_pressure,
body_temp_c,
heart_rate_bpm,
respiratory_rate,
… 1 more
"""Votedclass Record(sdl.Entity, sdl.Voted):
"""Gains: downvotes, my_vote, score, upvotes"""Weightclass Record(sdl.Entity, sdl.Weight):
"""Gains: weight_kg, weight_unit"""WorkflowStateclass Record(sdl.Entity, sdl.WorkflowState):
"""Gains: allowed_transitions, entered_state_at, state"""The `sdl` module surface for composing typed entities.
# sdl.entity — module namespace
class Record(sdl.Entity):
...# sdl.facet_resolve — module namespace
class Record(sdl.Entity):
...# sdl.facets — module namespace
class Record(sdl.Entity):
...sdl.is_valid_role(role="admin")sdl.namespace_of(role="admin")sdl.resolve_facets(names=[])sdl.roles_of(model="claude-sonnet-4")sdl.validate_custom_role(role="admin")Everything Webbee hands your handler via `ctx.<ns>.<method>`.
result = await ctx.ai.complete(
prompt="Summarise this thread in two sentences.",
model="claude-sonnet-4-6",
) # -> CompletionResultresult = await ctx.billing.cancel_subscription(user="imp_u_4Kd2") # -> dictresult = await ctx.billing.change_plan(
plan_id="pro",
period="monthly",
user="imp_u_4Kd2",
) # -> ChangePlanResultresult = await ctx.billing.check_limits(
user="imp_u_4Kd2",
) # -> LimitsResultresult = await ctx.billing.create_billing_portal_session(
user="imp_u_4Kd2",
) # -> strresult = await ctx.billing.create_setup_intent(
user="imp_u_4Kd2",
) # -> SetupIntentResultresult = await ctx.billing.get_auto_topup(
user="imp_u_4Kd2",
) # -> AutoTopupSettingsresult = await ctx.billing.get_balance(user="imp_u_4Kd2") # -> BalanceInforesult = await ctx.billing.get_subscription(
user="imp_u_4Kd2",
) # -> SubscriptionInforesult = await ctx.billing.list_payment_methods(
user="imp_u_4Kd2",
) # -> list[PaymentMethod]result = await ctx.billing.list_payments(
user="imp_u_4Kd2",
limit=20,
) # -> list[PaymentRecord]result = await ctx.billing.list_plans(
user="imp_u_4Kd2",
) # -> list[PlanInfo]result = await ctx.billing.remove_payment_method(
pm_id="pm_1042",
user="imp_u_4Kd2",
) # -> boolresult = await ctx.billing.renew_subscription(user="imp_u_4Kd2") # -> dictresult = await ctx.billing.resume_subscription(user="imp_u_4Kd2") # -> dict(enabled, threshold_pct?, recharge_tokens?, payment_method_id?, user?) → bool#result = await ctx.billing.set_auto_topup(
enabled=True,
threshold_pct=1,
recharge_tokens=1,
) # -> boolresult = await ctx.billing.set_default_payment_method(
pm_id="pm_1042",
user="imp_u_4Kd2",
) # -> boolresult = await ctx.billing.topup(
tokens=1,
price_cents=1,
save_payment_method=True,
off_session=True,
) # -> TopupResultresult = await ctx.billing.track_usage(
meter="tokens",
quantity=1,
user="imp_u_4Kd2",
) # -> boolresult = await ctx.billing.update_billing_profile(
profile={},
user="imp_u_4Kd2",
) # -> boolresult = await ctx.config.all() # -> dictresult = await ctx.config.get(key="last_sync", default="default") # -> Anyresult = await ctx.config.get_section(section="sidebar") # -> dictresult = await ctx.http.delete(
url="https://api.example.com/orders",
timeout=30,
) # -> HTTPResponseresult = await ctx.http.get(
url="https://api.example.com/orders",
timeout=30,
) # -> HTTPResponseresult = await ctx.http.patch(
url="https://api.example.com/orders",
timeout=30,
) # -> HTTPResponseresult = await ctx.http.post(
url="https://api.example.com/orders",
timeout=30,
) # -> HTTPResponseresult = await ctx.http.put(
url="https://api.example.com/orders",
timeout=30,
) # -> HTTPResponseresult = await ctx.notify.for_user(
user_id="imp_u_4Kd2",
) # -> 'NotifyClient'await ctx.notify.send(message="Deploy finished.", channel="in_app")result = await ctx.skeleton.get(section="sidebar") # -> Anyresult = await ctx.storage.delete(path="/billing") # -> boolresult = await ctx.storage.download(path="/billing") # -> bytesresult = await ctx.storage.list(prefix="notes/2026-08") # -> Page[FileInfo]result = await ctx.storage.upload(
path="/billing",
data={"note_id": "note_1042"},
content_type="application/octet-stream",
) # -> FileInforesult = await ctx.store.count(collection="notes", where={}) # -> intresult = await ctx.store.create(
collection="notes",
data={"note_id": "note_1042"},
) # -> Documentresult = await ctx.store.delete(
collection="notes",
doc_id="note_1042",
) # -> boolresult = await ctx.store.for_user(user_id="imp_u_4Kd2") # -> 'StoreClient'result = await ctx.store.get(
collection="notes",
doc_id="note_1042",
) # -> Document | Noneresult = await ctx.store.list(prefix="notes/2026-08") # -> list[Document]result = await ctx.store.list_users(
collection="notes",
page_size=1,
) # -> AsyncIterator[str]result = await ctx.store.query(
collection="notes",
where={},
order_by="-updated_at",
) # -> Page[Document]result = await ctx.store.query_all(
collection="notes",
limit=20,
) # -> list[Document]result = await ctx.store.set(
key="last_sync",
data={"note_id": "note_1042"},
) # -> Documentresult = await ctx.store.update(
collection="notes",
doc_id="note_1042",
data={"note_id": "note_1042"},
if_match="7a05dd3",
) # -> DocumentReturn-type and payload dataclasses you compose and receive.
ActionResult(
status="success",
data={"note_id": "note_1042"},
summary="Saved 3 notes.",
retryable=True,
)BalanceInfo(balance=1, plan="pro", cap=1){ response, handled?, functions_called?, had_successful_action?, message_type?, action_meta?, intercepted?, task_cancelled?, narration_emission? }#ChatResult(
response="Here is the summary you asked for.",
handled=True,
functions_called=[],
had_successful_action=True,
)CompletionResult(
text="Here is the summary you asked for.",
model="claude-sonnet-4",
usage={},
stop_reason="end_turn",
){ id, collection, data, extension_id?, tenant_id?, created_at?, updated_at?, user_id?, etag? }#Document(
id="note_1042",
collection="notes",
data={"note_id": "note_1042"},
extension_id="extension_1042",
tenant_id="default",
created_at="2026-08-16T09:00:00Z",
)Event(
event_type="order.created",
timestamp="2026-08-16T09:00:00Z",
user_id="imp_u_4Kd2",
tenant_id="tenant_1042",
)EventHandlerDef(event_type="order.created", func=handler)ExposedMethod(name="send_invoice", func=handler, action_type="read")FileInfo(
path="/billing",
size=1,
content_type="application/pdf",
created_at="2026-08-16T09:00:00Z",
)FunctionCall(
name="send_invoice",
params={},
action_type="read",
success=True,
result={"ok": True},
intercepted=True,
event="order.created",
)HealthCheckDef(func=handler)HealthStatus(status="success", message="Deploy finished.", details={})HTTPResponse(
status_code=1,
body="The full note body.",
headers={"Accept": "application/json"},
)LifecycleHook(name="send_invoice", func=handler, version="1.4.0")LimitsResult(allowed=True, balance=1, plan="pro")MeteredEvent(
event_id="event_1042",
ts=1,
identity="imp_u_4Kd2",
meter="tokens",
attribution="attribution",
v=1,
dimensions={},
)Page(
data={"note_id": "note_1042"},
cursor="eyJvZmZzZXQiOjIwfQ",
has_more=True,
total=1,
)ScheduleDef(name="send_invoice", func=handler, cron="0 9 * * *"){ plan_id?, plan_name?, status?, period?, current_period_start?, current_period_end? }#SubscriptionInfo(plan_id="pro", plan_name="plan", status="success")ToolDef(
name="send_invoice",
func=handler,
scopes=[],
description="Send the invoice for one order to the customer.",
)TrayDef(
tray_id="inbox",
func=handler,
icon="Circle",
tooltip="Open the inbox",
)WebhookDef(
path="/billing",
func=handler,
method="POST",
secret_header="X-Imperal-Signature",
)WebhookRequest(
method="POST",
headers={"Accept": "application/json"},
body="The full note body.",
query_params={},
)WebhookResponse(
status_code=1,
body="The full note body.",
headers={"Accept": "application/json"},
)Imperal SDK overview
The Imperal SDK — build federal-grade Python extensions for Webbee: manifest schema v3, typed Pydantic params, runtime quality guarantees & federal validators.
Complete API surface
The complete Imperal SDK API on one page — every decorator, ctx attribute, manifest field, federal validator, action type, error code and runtime guarantee.