---
title: "AI function run receipts: sources, actions, and cost"
description: "Record what each AI function read, produced, changed, and cost, with clear statuses, source versions, approval evidence, and limits on sensitive log data."
canonical: "https://scalewithsearch.com/articles/ai-function-run-receipts-cost-control"
---
## Site navigation

- [Scale With Search](https://scalewithsearch.com/)
- Services
  - Services
    - [AI systems](https://scalewithsearch.com/ai-systems)
    - [Site build](https://scalewithsearch.com/work#site-build)
    - [Whole website fix](https://scalewithsearch.com/work#whole-website-fix)
    - [Content library with SEO](https://scalewithsearch.com/work#content-library)
    - [Working session](https://scalewithsearch.com/audit)
  - Start here
    - [Send your brief](https://scalewithsearch.com/work#send-your-brief)
    - [Example scope](https://scalewithsearch.com/work#review-the-example-scope)
  - [Prices and terms](https://scalewithsearch.com/work#prices-and-terms)
- Industries
  - Real estate
    - [Real estate agents and teams](https://scalewithsearch.com/for/real-estate)
    - [Platforms, ownership, and IDX](https://scalewithsearch.com/for/real-estate/real-estate-website-platforms-ownership-idx)
    - [Search, content, and AI](https://scalewithsearch.com/for/real-estate/real-estate-search-content-ai)
    - [Inquiries, campaigns, and handoffs](https://scalewithsearch.com/for/real-estate/real-estate-website-inquiries-campaigns-handoffs)
    - [Buyer, seller, and local pages](https://scalewithsearch.com/for/real-estate/real-estate-buyer-seller-local-resources)
    - [Rules, privacy, and trust](https://scalewithsearch.com/for/real-estate/real-estate-website-rules-privacy-trust)
  - Browse by business
    - [Trades and home services](https://scalewithsearch.com/for/#group-trades)
    - [Health, wellness, and animal care](https://scalewithsearch.com/for/#group-practices)
    - [Law, finance, and IT](https://scalewithsearch.com/for/#group-professional)
    - [Marketing and SEO agencies](https://scalewithsearch.com/for/#group-agencies)
    - [Shops and manufacturers](https://scalewithsearch.com/for/#group-manufacturing)
    - [Restaurants, shops, studios, and nonprofits](https://scalewithsearch.com/for/#group-local-services)
  - Chiropractic practices
    - [Chiropractic and wellness practices](https://scalewithsearch.com/for/chiropractic-and-wellness-practices)
    - [Chiropractic and physical therapy clinics](https://scalewithsearch.com/for/chiropractic-and-physical-therapy-clinics)
  - [All industries](https://scalewithsearch.com/for/)
- Resources
  - Free tools
    - [AI readiness check](https://scalewithsearch.com/check)
    - [Free tools](https://scalewithsearch.com/tools/)
    - [Free Starter Kit](https://scalewithsearch.com/kit/business-memory-starter-kit.zip)
  - Guides
    - [AI-native library](https://scalewithsearch.com/ai-native)
    - [Industry intelligence](https://scalewithsearch.com/intelligence)
    - [Office job guides](https://scalewithsearch.com/guides/)
    - [Business memory](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [Agent governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [Migration and ownership](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - Articles
    - [All articles](https://scalewithsearch.com/articles/)
    - [What changed](https://scalewithsearch.com/changes/)
- About
  - Evidence
    - [Proof](https://scalewithsearch.com/proof)
  - Scale With Search
    - [About](https://scalewithsearch.com/about)
    - [How it works](https://scalewithsearch.com/how-it-works)

# What should an AI function record in its run receipt?

Record the job, input versions, checks, output, approval state, action evidence, model used, and cost. Add an explicit status for completed, blocked, failed, uncertain, or no-work runs. Keep the receipt with records the business controls.

For an owner, the receipt should answer a practical question: what happened during this run, and what needs a decision now? It should also support checking the function's usage against its agreed spend limit.

The [AI agent run receipt template](/articles/ai-agent-run-receipt-template) provides a general field structure. This guide focuses on operating one business function and reviewing its costs without reading a full conversation history.

## Give every run a stable identity

Assign a run identifier before preparation begins. Record the function identifier, version, start time, reporting time zone, and input item reference.

Keep the business object distinct from the attempt. A weekly report is one business object. Its original run and a later correction are separate attempts that should point to each other.

Use stable internal references instead of putting customer names into every filename. Make it possible for an authorized reviewer to open the original record through the reference.

For a hypothetical intake function, the receipt might connect an inquiry identifier to one prepared reply. A duplicate submission should point to the earlier result. A revised reply should identify the version it replaces.

## Record what the function read

List the material sources that governed the output. Include the source identifier and the version information available, such as a revision, export time, or content fingerprint.

Distinguish records selected for the job from records successfully read. If a required source could not be opened, record the failure and mark the result accordingly. Do not list an attempted read as verified input.

A proposal receipt should identify the price sheet and scope-rule versions. A report receipt should identify the reporting period, source exports, and calculation version. An intake receipt should identify the service rules and inquiry record.

Keep the source contents in their controlled location. The receipt needs enough information to find and review them. It does not need to duplicate the full customer conversation.

## Separate preparation from external action

Record the draft location and version independently from any send or update. A prepared reply can be complete as a preparation task while still awaiting approval.

If an external action is part of the function, record its type, destination reference, reviewed version, approval reference, and observed result. Keep those fields empty or explicitly not attempted when the run stops at a draft.

Do not write sent when the function only saved a file. Do not write delivered when the available evidence only confirms an accepted send request. Use a state that matches what the connected system reports.

The principle that [the receipt is part of the output](/articles/receipt-is-part-of-the-output) keeps these distinctions available after the original operator leaves the task.

## Use statuses with written meanings

Choose a small vocabulary and keep its definitions in the runbook. The following meanings fit the general template linked above.

| Status | Meaning for this function |
|---|---|
| Completed | Assigned preparation or execution reached its defined stopping point |
| No work | Successful inspection found no eligible item |
| Blocked | A required source, decision, identity, or approval is missing |
| Failed | A component or validation prevented completion |
| Uncertain | Evidence cannot establish the resulting external state |

Record the stopping reason alongside the status. For a draft awaiting approval, completed preparation should still show that sending was not attempted.

A failed source connection is not no work. An unresolved send is not a completed send. Preserve these differences in both the receipt and the owner's queue.

## Put a cost line in every receipt

Record the model actually used, available usage measurements, cost currency, cost basis, and whether the amount is measured, estimated, or pending. Keep the pricing reference used for an estimate.

A missing usage response should produce a pending cost, not a zero charge. Define when the function revisits that pending entry and who owns reconciliation.

Include failed attempts and retries in the function's cost review. Keep attempt-level usage separate from the business object's total so the owner can see why repeated work changed the spend.

Do not hard-code a claimed universal cost per reply or report. Use the function's own recorded usage and the applicable pricing record. State which charges belong in this view and which sit elsewhere.

## Connect receipts to the spend limit

The [AI systems method](/ai-systems) calls for a monthly AI spend limit, an alert owner, and cost visibility for each function. Write those terms into the operating record.

Define the limit period, time zone, covered charges, and alert behavior. Name the person who decides what to do when the limit is reached. Decide which preparation should stop and which fixed checks may continue.

Use recorded and estimated spend consistently. For a conservative policy, include pending usage through an owner-approved estimate until it is reconciled. Label that treatment in the summary.

Ask the builder to demonstrate the boundary using test data. The function should preserve an explicit stopped result and alert rather than continuing without a stated spending decision.

## Keep private material out of the receipt

OWASP's Logging guidance recommends excluding or protecting credentials, access tokens, sensitive personal information, and commercially sensitive data. It also recommends restricting access to logs. [OWASP: Logging Cheat Sheet, checked 2026.10.26](https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html)

Apply that guidance by recording credential references rather than secret values. Use a controlled customer reference instead of copying a full message into the general run index.

Separate the receipt summary from restricted diagnostic material. Define who may open each location. A person reviewing cost should not automatically receive access to every customer's source documents.

Set a retention rule for receipts and related evidence. Include the owner, permitted access, and deletion process. Check applicable business requirements before choosing the period.

## Make the receipt dependable

Write the receipt through the function's execution code using observed events. Avoid asking the model to invent a retrospective account of its own behavior.

OWASP recommends recording event attributes such as time, actor, action, result, and reason. It also calls for testing logging failures and protecting stored events from unauthorized modification. [OWASP: Logging Cheat Sheet, checked 2026.10.26](https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html)

Test unavailable storage, missing permissions, malformed input, and interrupted runs. Define the recovery procedure when the receipt cannot be finalized.

For consequential external actions, require a durable action record before execution and preserve an uncertain state after interruption. Recovery should check the destination before attempting the effect again. Do not let a missing final receipt trigger a blind repeat.

## Review the function through its receipts

Give the owner a compact period summary: runs by status, unresolved approvals, pending cost entries, repeated failures, and spend against the defined limit. Link each exception to its underlying receipt.

Keep counts and amounts tied to their definitions. Distinguish completed drafts from completed sends. Keep estimated cost separate from reconciled cost even when both contribute to an operating limit.

When a failure repeats, assign a correction to the responsible source or function owner. Preserve the original receipt and link the correction. Do not overwrite the historical result to make the summary appear clean.

Use [the build acceptance list guide](/articles/what-a-build-acceptance-list-contains) to test receipt completeness across normal, blocked, failed, uncertain, and no-work cases. Include cost reconciliation and access controls in the handoff.

## Keep the record when the model changes

Store the receipt format and business rules outside the model configuration. Record a model change as a new function version with the acceptance evidence attached.

Rerun the same source, status, approval, and cost checks. Confirm that the replacement records its actual identity and usage. Keep the earlier receipts readable under their original schema version.

To scope a function with this operating record, [send your brief](/work#send-your-brief). Include the job, its sources, the review decision, and the spend boundary you want the team to inspect.


## Related: Agent Governance

- [AI Agent Run Receipt Template](/articles/ai-agent-run-receipt-template)
- [The Receipt Is Part of the Output](/articles/receipt-is-part-of-the-output)
- [What a Build Acceptance List Contains](/articles/what-a-build-acceptance-list-contains)

----

```text
                  .|########||.                                       .|########||.                                       .|########||.
               |##||.      .||##|.                                 |##||.      .||##|.                                 |##||.      .||##|.
             |#|.              .|#|.                             |#|.              .|#|.                             |#|.              .|#|.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
        .#.                          .#|                    .#.                          .#|                    .#.                          .#|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
      |#             ......             #|                |#             ......             #|                |#             ......             #|
     .#           ||#########|           #|              .#           ||#########|           #|              .#           ||#########|           #|
    .#.         |######||######|.        .#.            .#.         |######||######|.        .#.            .#.         |######||######|.        .#.
    #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#
   ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||
   #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #
 ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||
 #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#
 #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.
.|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||
||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||
#.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#
#    .||####|###########################|.     #    #    .||####|###########################|.     #    #    .||####|###########################|.     #
#      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #
#      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #
#      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #
#      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #
#   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #
#. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#
|| |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||
|| ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||
.# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.
 #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#
 ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||
  #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.
   ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||
    #.        .######|#|#########|        .#            #.        .######|#|#########|        .#            #.        .######|#|#########|        .#
    .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.
     |#           ||########||           #.              |#           ||########||           #.              |#           ||########||           #.
      |#             ......             #|                |#             ......             #|                |#             ......             #|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
        |#.                          .#.                    |#.                          .#.                    |#.                          .#.
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
            .|#|.              .|#|.                            .|#|.              .|#|.                            .|#|.              .|#|.
               |##||.      .||##|                                  |##||.      .||##|                                  |##||.      .||##|
                 .||########||.                                      .||########||.                                      .||########||.

Scale With Search  2026  [scalewithsearch.com](https://scalewithsearch.com)
```
