vi. Civic Tech & Tools

CUSTOM GPTS ECOSYSTEM

Cross-platform Reach

The lab shipped into somebody else's marketplace: a small metered service behind a published action schema, so a hosted assistant can call it and still be quota-gated and revocable.

Deployed, security reviewed Python FastAPI OpenAPI 3.1 Fly.io

What it does

A hosted assistant marketplace is a distribution channel the lab does not control. The pattern here is to publish a narrow action schema, keep the actual work on a server the lab does run, and put a quota check in front of it.

The published surface is deliberately small: check whether the caller has quota left, and process a Notion export into clean chunked text. The processing is the product; the assistant is the storefront.

Quota before work

The gate endpoint exists so the assistant can ask whether a call is allowed before making it, and get back an upgrade link rather than an error if it is not. That keeps the failure mode a conversation rather than a stack trace, and keeps the expensive path behind an authorization the caller cannot skip.

In the code

The published action schema, gate first
paths:
  /v1/gate:
    get:
      operationId: checkQuota
      summary: Check if user has remaining quota
      security:
        - ApiKeyAuth: []
      responses:
        '200':
          description: Quota check result
          content:
            application/json:
              schema:
                type: object
                properties:
                  allowed:
                    type: boolean
                  upgrade_url:
                    type: string

A schema is the whole contract when the caller is a hosted assistant you do not control, and this one makes two choices worth copying. The quota check is a separate cheap endpoint rather than an error returned from the expensive one, so the assistant can ask before it uploads a file and can say something useful when the answer is no. And the response carries an upgrade link rather than a bare boolean, which means the remediation travels with the refusal instead of living in documentation the assistant never read. Every operation carries an API key requirement, so marketplace distribution never implies open access.

How this differs from the ordinary version

Distribution without surrendering the work

The marketplace gets a schema and a URL. The processing, the quota accounting and the data stay on infrastructure the lab controls, which means the channel can be switched off or replaced without rebuilding the product.

The refusal carries its own fix

A quota response that returns an upgrade link instead of an error code turns the limit into a step in the conversation rather than a dead end the assistant has to improvise around.

In the field

Reaching people who will never see the lab

Most of the audience for a narrow document processing tool is not going to find a research lab in El Paso. Publishing into an existing marketplace is the cheapest way to be discovered, and doing it behind a key is the way to make that discovery meterable.

Questions

Does the marketplace get access to the implementation?
No. It gets a published action schema and a URL. Every operation requires a key, and the work happens on lab infrastructure.
What happens when a caller is out of quota?
The gate endpoint returns allowed false with an upgrade link, so the assistant can say something useful rather than failing on the expensive call.