BotCurrent
← Back to examples

Build & debugFrom the makerActs with your OK

Build an AI answer feature with usage billing

Usage counts and bills can drift apart. Your AI plans the feature so each answer is counted once and billed right.

What happened

Perplexity's blog post shows Computer building an answer API and opening a pull request on GitHub. The post says the agent then deploys it and tracks usage, speed and billing with Datadog and Stripe. The user reviews and merges the pull request.

Source: Perplexity · perplexity.ai · Tool: Perplexity Computer

Copy this prompt

Paste it into ChatGPT, Claude or Gemini, fill in the [brackets] and add your files. It only drafts. You decide what to send or change.

Use it often? Save it as a skill

Add this job to Claude or Codex once, and your agent knows how to do it without you pasting the prompt each time. Text only, no code.

Download for Claude (.zip)View the skill file

How to add it
Claude app or claude.ai
Download the .zip. In Settings, find Skills, choose Upload skill and pick the file. Code execution has to be turned on.
Claude Code
Run this in your terminal:mkdir -p ~/.claude/skills/build-an-ai-answer-feature-with-usage-billing && curl -fsSL https://botcurrent.com/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md -o ~/.claude/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md
Codex
Run this in your terminal:mkdir -p ~/.agents/skills/build-an-ai-answer-feature-with-usage-billing && curl -fsSL https://botcurrent.com/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md -o ~/.agents/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md

More about skills, and open-source skills we checked

Security scanClear13 of 13 checks passed

We check every skill file before we offer it. This one is the prompt above in skill form.

  • Passed Skill file is well formed
  • Passed Runs its own code or programs
  • Passed Connects to the internet from code
  • Passed Touches passwords, keys or private files
  • Passed Deletes or overwrites things in bulk
  • Passed Hidden or scrambled code
  • Passed Tries to override your instructions
  • Passed Invisible characters in the text
  • Passed Sends your data somewhere else
  • Passed Can pay or buy without asking you
  • Passed Downloads or installs other software
  • Passed Has a password or key written into it
  • Passed Asks for admin (sudo) rights

Files scanned: SKILL.md. Links to: botcurrent.com, www.perplexity.ai. Fingerprint: 902f28736c39. What we check

What you'll get

A plan and a patch for the answer feature, with usage logging, billing checks and tests.

You'll need

  • What the feature should answer, and for whom
  • Your pricing rule, such as per answer or per month
  • The code that handles accounts and billing, with keys removed

Before you switch it on

Acts with your OK

If you give this job to an agent that works in your accounts:

Access it needs
Your code repository, deploy tools and billing dashboards
Keep on “ask me first”
Sending or posting anything, paying or buying, sharing your address or ID, deleting anything

Heads up: Billing code needs a second person's review. Check usage counts against your billing tool in test mode before real customers pay.

More details: full instructions, sources and safeguards

Before you begin

Keep provider cost, usage and customer charges distinct. No credentials, paid services, live payment events, changed billing rules or deployment. Missing contracts block affected branches; user reviews every later repository or production action.

Use this in your own AI tool

  1. Copy the starter, then open your own AI tool.
  2. Paste it with only the permitted inputs. Check privacy settings and tool compatibility first.
  3. Review the draft and held questions. Any later action needs separate approval.

What you need

Authorized repository snapshot, interfaces and dependency constraints

Approved answer, entitlement, billing-unit, cancellation and error contracts

Mock provider/payment examples, event schema and explicit execution/review boundaries

Start here

  1. Map completed answer delivery to the owner-approved billable event; hold unclear entitlement, cancellation or error rules.
  2. Write the scoped candidate implementation using mocked providers/payment events and explicit duplicate-event handling.
  3. Return complete files or an unapplied patch with latency/usage/billing checks labelled unrun and a reviewer handoff.
Advanced prompt availability

Advanced prompt

No accepted companion is available for this record. The original material below retains its original status.

Technical setup & run design — optional
Starter
Separate short starter version composed-v1. Untested.
Advanced prompt
No accepted advanced companion is available. Legacy material remains in the original notes with its status.
Compatibility
Unknown; check the actual tool, account and permissions.
Run design
No reviewed run design. No runtime or schedule is activated by BotCurrent.
Setup and access

Proposed inputs

  1. Name

    Feature contract

    Owner

    Product owner

    Minimum scope

    Answer behaviour, limits, entitlement rules and user-visible errors

    Quality check

    Define what constitutes a completed and billable request.

  2. Name

    Repository and measurement design

    Owner

    Engineering owner

    Minimum scope

    Approved interfaces, test accounts and event schema

    Quality check

    Keep provider cost, customer usage and billing amounts distinct.

Access and setup — proposed or unknown

Proposed minimum
  1. Work in an authorized development copy with mocked providers and payment events.

Compatibility unknowns
  1. Unknown: API access, framework versions, billing integration and deployment compatibility.

External actions requiring approval
  1. Creating credentials, changing billing rules, deploying or sending live payment events.

Source evidence, attribution & limitations

Full source evidence

Official recipe · Coding orchestration

Original task title: Build a metered AI-answer feature

Editorial candidate. This is source-backed reporting or a documented workflow. BotCurrent has not independently tested this task. A proposed Canadian adaptation is not evidence of a Canadian deployment or compliance certification.

Original source

https://www.perplexity.ai/en-GB/hub/blog/computer-for-builders

Attributed to: Perplexity

Official recipe
Original action type
coding_agent_orchestration
What the source reports
Implement an answer API through PR and deployment; monitor usage, latency and billing.
Source outcome limits
This official recipe describes a procedure; it does not prove successful execution or independently reproduced results.
Evidence attribution caveat
This official recipe describes a procedure; it does not prove successful execution or independently reproduced results.
Source approval description
PR review and merge are assigned to the user.
Named tools
Computer; Perplexity Agent API; GitHub; Next.js; Supabase; Vercel; Datadog; Stripe
Model or version
Unknown
Publication date
2026-08-06
Source last checked
2026-10-14
Demonstrated in Canada
Unknown
Canadian availability
unknown; not inferred from general product availability
Proposed Canadian adaptation
Proposed: Confirm Canadian service access, applicable privacy requirements, and English/French needs before any pilot.
Recommended approval boundaries
Approve API data handling, budget, security review, billing semantics and production deployment.
Technical specification & detailed checks
Detailed steps and output format

At a glance

Suggested result
An answer-feature pull request and usage, latency and billing observations.Suggested; untested.
Tool
Perplexity ComputerSource-named; check current access.
Suggested inputs
Feature contract; Repository and measurement designProposed; access notes below.
Human review
Approve API data handling, budget, security review, billing semantics and production deployment.Suggested boundaries; source approvals below.
Setup notes
Work in an authorized development copy with mocked providers and payment events.Guide notes; proposed setup untested.
Cost
Workflow cost not established. Check current tool pricing, setup and human review costs before trying it.No measured cost or time added.
Content depth
Source-linked example · suggestions untestedDepth does not establish successful execution.
Check source evidence and limits ↓

Function and scope

Software engineering, Operations · Single task

Editorial classification; no execution or compatibility test is implied.

No tool mapping reviewed for this task.

Source-backed example. Practical decision guidance is proposed and untested; this is not a full implementation guide.

The problem

An AI-answer feature needs implementation, usage tracking and billing visibility before a team can evaluate its behavior in production.

Suggested task

Implement an answer API through a pull request and user-controlled deployment, then monitor usage, latency and billing.

What you could produce

An answer-feature pull request and usage, latency and billing observations.

Where these suggestions come from
  • Core problem: Our interpretation of the task
  • Agent job: Our interpretation of the task
  • Expected output: Our interpretation of the task
  • Relevant job roles: Our interpretation of the task
  • Benefit type: Our interpretation of the task
Suggestions and their limits

Describes the task’s purpose and intended output; measured benefit, safe unsupervised operation and successful delivery are not established by this framing.

Editorial synthesis based on the linked source. This framing does not add evidence of successful delivery or results.

Before you try it · suggestions untested

Case-specific decision guidance and first checks are original proposals. The linked source supports the attributed task; this added guidance has not been executed.

Read the attributed source evidence and original caveats below ↓

Why use this

  1. An AI-answer endpoint can work in a demo while its usage meter misses retries, streaming failures or requests that never reach billing. If product and payment records disagree, users may be charged incorrectly or the team may misunderstand operating costs.

  2. This job could make implementation, metering and observability reviewable together. A clear event model would help engineers distinguish answer delivery, chargeable usage and provider cost before a user-controlled release.

Why an agent / simpler alternative

Useful judgment

Connect API behaviour with usage events and propose tests for retries and partial failures.

Simpler alternative

Use a fixed internal prototype without billing when the team only needs to evaluate answer quality.

Unsuitable when

The feature requires live charges, credential creation or production deployment without explicit authorization.

Expected deliverable and review checks

Proposed artifact

Reviewable implementation proposal with metering model, failure tests and staged observability checks.

Critical checks
  1. A retried request cannot create duplicate chargeable usage.

  2. Failed or cancelled answers follow the agreed billing rule and remain diagnosable.

Missing output evidence

No new run or output inspection in this editorial layer; see linked source-specific limits.

First check — proposed, unexecuted

Status

proposed_unexecuted

Synthetic fixture

Synthetic events include one successful answer, its repeated delivery event and a cancelled stream.

Acceptance checks
  1. The success consumes entitlement once.

  2. The cancelled stream follows an explicit rule rather than an accidental default.

Stop conditions
  1. Live credentials, real charges or production deployment is needed.

Tasks: Build & debug

Useful for: Software developerProduct manager

Editorial relevance from the title and source-supported actions; not evidence of the operator’s occupation.
Perplexity ComputerIndependent testing: No
Failure handling, costs and limits

Failure signals and proposed responses

  1. Signal

    A network retry records usage twice.

    Why it matters

    The customer could be overcharged even though only one answer arrived.

    Proposed response

    Use a stable request identity and reconcile duplicate events in the proposed design.

  2. Signal

    Provider usage is confused with customer entitlement consumption.

    Why it matters

    Costs and invoices may drift in different directions.

    Proposed response

    Maintain separate ledgers and an explicit reconciliation bridge.

Effort and cost — unknown

Setup work
  1. Define event semantics and isolated test fixtures.

Ongoing review
  1. Review reconciliation alerts, latency outliers and billing discrepancies after approved release.

Unknowns
  1. Unknown: provider pricing, infrastructure charges and operational support effort.

Limits

  1. A metering design is not verified billing accuracy; release and payment behaviour need separately authorized testing.

Original task overview & interpretation

Official recipe

Build a metered AI-answer feature

Usage and billing can disagree.

Suggested result

An answer-feature pull request and usage, latency and billing observations.

What you need: Supply an authorized repository and billing rules. Reported tools: Computer; Perplexity Agent API; GitHub; Next.js; Supabase; Vercel; Datadog; Stripe. Proposed setup: confirm current access, versions and costs before using live services.

  1. Implement an answer API through a pull request and user-controlled deployment, then monitor usage, latency and billing.
  2. Proposed check: repeat a successful mock delivery event and count it once; check a cancelled stream separately against the agreed billing rule.

PR review and merge are assigned to the user. Proposed safeguard: approve credential setup, payment commitments and production release separately.

Official recipe. BotCurrent has not tested this workflow.