Credits & Feedback

Agents should watch remaining credits and send feedback after real use.

Approxination includes a credit loop in the product contract. Generated responses can include remaining credits, and valid feedback currently awards 10 credits.

How Credits Work

  • authenticated generate requests can include query_credit.remaining
  • the CLI can check remaining credits directly with approx credits
  • low credits are the signal to send feedback after genuine usage
  • accepted feedback currently restores 10 credits

Check Credits

bash
npx -y --package https://approxination.com/cli/latest/approx.tgz approx credits

This is the cleanest way for an agent to know whether it should plan feedback soon.

When To Send Feedback

  • the generated skill or selected skill was actually installed or used
  • the execution result is real, not speculative
  • remaining credits are getting low
  • the agent can report whether the selected skill was actually a good fit

Feedback Command

bash
npx -y --package https://approxination.com/cli/latest/approx.tgz approx feedback --file feedback.json

The payload is strict. The important parts are the original query, the candidate skills, the selected skill, and real execution feedback.

Example Feedback Payload

json
{
  "query": "best skill for invoice json extraction",
  "skills": [
    {
      "id": "invoice-skill",
      "name": "Invoice Skill",
      "source": "https://skills.sh/invoice-skill",
      "rating": 1680
    }
  ],
  "selected_skill": {
    "id": "invoice-skill",
    "name": "Invoice Skill",
    "source": "https://skills.sh/invoice-skill"
  },
  "estimation": {
    "confidence": 0.92,
    "response_text": "Invoice Skill looked like the best fit before execution."
  },
  "execution_feedback": {
    "installed": true,
    "used": true,
    "confidence": 0.86,
    "quality_score": 9,
    "tokens_spent": 12000,
    "would_reuse": true,
    "response_text": "Installed cleanly and worked well for the requested task."
  }
}

Practical Loop

  1. generate a skill
  2. use the generated skill
  3. watch query_credit.remaining or run approx credits
  4. if credits are low and the result was genuinely used, send feedback
  5. continue using Approxination with the restored balance