Skip to main content

.mini: shorter AI responses, JSON for your application

A company receives complaints and questions. To avoid creating support tickets by hand, its app asks AI to interpret each message and generate a record with a title, category and priority. That record is a ticket; the code needs JSON to store and assign it.

JSON repeats field names in every ticket. The API counts that text in tokens, pieces used to calculate the bill. Fewer response tokens cost less at the same model and rate. TOON also reduces repetition; .mini tailors the rules to your domain through a contract: fields, order and types declared once. The workflow validates the compact response, repairs it when possible and recovers the same JSON objects.

Follow support automation: 20 customer messages become 20 JSON objects, with a recorded run you can inspect without a key.

In this example, the same output takes 443 JSON tokens, 304 TOON tokens and 278 .mini tokens (o200k_base). These are output counts. The .mini prompt has 571 tokens and corrections also cost tokens; measure the full workflow before claiming monetary savings.

Start here

Install it from PyPI:

python -m pip install minifmt
mini setup

The same code is distributed at https://mini-format.pmoluna.com/downloads/ as mini_format-1.3.3-py3-none-any.whl (fingerprint in SHA256SUMS.txt) for offline installs: python -m pip install --no-index mini_format-1.3.3-py3-none-any.whl.

The wizard guides you through:

  1. Spanish or English.
  2. A sample JSON response from your AI, your own fields or the included support example.
  3. Name and directory: create contract.json (rules), prompt.es.md / prompt.en.md (AI instructions) and workflow.py (validation, Repair and JSON conversion).
  4. Integration: select the file that calls AI, search your project or choose I do not have a workflow yet. The resume command is saved in README.md and GUIA.md.
  5. Test: paste try-prompt.md into your AI; it asks for 20 fictional objects. Check the reply before saving real data.

Automatic editing covers a synchronous Python chat completions + json.loads pattern. Other SDKs/languages receive a coding-AI guide with actual paths. Workflow.run accepts any synchronous callback that takes a prompt and returns text; a CLI bridge is available for other languages.

No workflow yet? Keep the toolkit. Once you create your AI call file, run:

mini integrate path/to/app.py --bundle .mini --lang en

Try the workflow without a key

python examples/flujo-soporte/run.py

Replay 20 tickets authored by Muse with deliberately inserted demonstration errors. It executes the actual tools and saves output/soporte/result.json and history.json. No API call is made. For the local form and optional live OpenAI API-key mode: python examples/flujo-soporte/run.py --serve.

Continue when needed

.mini adapts to your data. The 14 families are optional examples. Generated toolkits use Python 3.9+ and the mini-domain/1 profile; the Node/TypeScript library implements base SPEC 1.1. MIT.

Metadata

Release files for minifmt 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for minifmt 1.3.3
File Interpreter ABI Platform Actions
minifmt-1.3.3-py3-none-any.whl Python 3 none any Details for minifmt-1.3.3-py3-none-any.whl

Release files / minifmt-1.3.3-py3-none-any.whl

Download URL minifmt-1.3.3-py3-none-any.whl
Size 108.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
942739cf85a3b55374cb743a2e2146637cde05f2349d1667fbe4d52f2ac85982
BLAKE2b-256 checksum
How to use checksums
2d6eda36109dbbf1f30341250396aad50b7b86727d17dc2c70014ad5a288e984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.0

Security for minifmt 1.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page