feat(skill): cost-aware batch workflow + agentkey_account in tools table#57
Open
f0rmatting wants to merge 2 commits into
Open
feat(skill): cost-aware batch workflow + agentkey_account in tools table#57f0rmatting wants to merge 2 commits into
f0rmatting wants to merge 2 commits into
Conversation
Adds the Layer 2 reference at skills/agentkey/references/cost-aware.md covering the pre-batch workflow: read cost.credits_per_call from describe_tool, check balance via agentkey_account, present the plan to the user, wait for confirmation. Also covers cheaper-provider picks, input dedup, probe-first to surface failures free-of-charge, and the "balance check failed" recovery path. SKILL.md changes (kept minimal — Layer 1 token budget): - Add agentkey_account to the MCP Tools table with a "Free" callout and a note that older servers may not expose it (don't gate Setup on it). - Step 0.C explicitly marks the 4 core tools as required and account as optional so older deployments don't get stuck in a Setup loop. - New rule under Rules: load references/cost-aware.md when ≥3 calls OR ≥10 estimated credits. The reference owns the workflow detail; the rule entry is one sentence. No bump to version.txt — release-please will pick up the feat: prefix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Teaches the LLM the batch-confirmation workflow that PR chainbase-labs/AgentKey-Server#70 (`describe_tool` cost field) makes possible.
Trigger: `≥3 calls` OR estimated cost `≥10 credits`.
Workflow: `describe_tool` → read `cost.credits_per_call` → multiply by N → `agentkey_account` for balance → present plan + estimate + balance to user → wait for confirmation → execute.
Layer separation
Lazy-loaded — the reference only enters the model's context when the trigger fires.
Backwards compat
Test plan
Release
No `version.txt` bump — release-please will pick up the `feat:` prefix and open the bump PR. Per repo CLAUDE.md, plugin updates trigger on GitHub Release publication, not on commits, so this lands quietly until the next cut.