Skip to main content

attune-forms

Dynamic forms library for AI-agent <-> user communication: a declarative, surface-agnostic FormSchema artifact, renderers for every surface the agent might be on, and template-driven intake generation.

Extracted from attune-ai's elicitation subsystem (the elicitation-form-surface and workflow-intake-forms specs); attune-ai consumes this package.

What it does

  • One artifactFormSchema / FormQuestion built from plain data via form_from_dict, with build-time validation.
  • Question types — text, single/multi select, boolean, number, date, textarea, plus the communication-grammar constructs: decision (recommended option + rationale + per-option tradeoffs), pushback (structured disagreement), progress (status report with a blocked-item picker).
  • Renderersform_to_widget_html (self-contained interactive widget with postback), form_to_askuserquestion (batched payloads), form_to_elicitation_schema (native MCP elicitation).
  • Surface routingselect_form_surface picks widget vs fallback; keyboard-mode opt-out persisted per project.
  • Validationcollect_form_response validates answers (required + option membership) and never silently accepts malformed input.
  • Intake templatesFormTemplate + FieldSlot generate a workflow's intake form at ask-time from named candidate providers (PROVIDERS); build-time boundary rules reject invalid templates.
  • Telemetry — local-only surface-decision log (form_events), disabled via DO_NOT_TRACK or ATTUNE_FORM_TELEMETRY=0.

Install

pip install attune-forms

Quick start

from attune_forms import form_from_dict, select_form_surface, form_to_widget_html

form = form_from_dict({
    "title": "Security audit scope",
    "fields": [
        {"id": "path", "type": "text_input", "label": "Which path?"},
        {"id": "depth", "type": "single_select", "label": "How deep?",
         "options": ["quick", "standard", "thorough"]},
    ],
})
if select_form_surface(form) == "widget":
    html = form_to_widget_html(form)  # render on your widget surface

Host integration seams

Workflow-bound intake templates need two host hooks:

import attune_forms.intake_template as it

it.WORKFLOW_SCHEMA_RESOLVER = my_schema_resolver   # name -> input schema
it.TEMPLATE_LOADERS.append(my_registration_loader)  # imports template modules

License

Apache 2.0. Copyright 2026 Smart AI Memory.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attune_forms-0.1.0.tar.gz (82.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

attune_forms-0.1.0-py3-none-any.whl (51.9 kB view details)

Uploaded Python 3

File details

Details for the file attune_forms-0.1.0.tar.gz.

File metadata

  • Download URL: attune_forms-0.1.0.tar.gz
  • Upload date:
  • Size: 82.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for attune_forms-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dec2893503997c3d9bc7d1eebe1e94aed3bf262fff845f108a51345ac8fd746d
MD5 819605baf18f753acd734b8ac964fa0a
BLAKE2b-256 45a0bdeca40bc7e626eb2ec499fcf58c97f287e1e02875ad03261e7cc8953062

See more details on using hashes here.

Provenance

The following attestation bundles were made for attune_forms-0.1.0.tar.gz:

Publisher: publish.yml on Smart-AI-Memory/attune-forms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file attune_forms-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: attune_forms-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for attune_forms-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 feada33981e9303701db33d905514a5d066784d8791a587eb2f27dd54f9f62f6
MD5 84e5e236368daf66142c59a24984ebe1
BLAKE2b-256 8ca5c0b3676179d397f8263e2ee5b88b9c28a5161de9b98f6f70b1d2718c5a5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for attune_forms-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Smart-AI-Memory/attune-forms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page