Skip to content

feat: add feedback CLI command and MCP tool#32

Merged
eskp merged 1 commit intomainfrom
feat/feedback-tool
May 7, 2026
Merged

feat: add feedback CLI command and MCP tool#32
eskp merged 1 commit intomainfrom
feat/feedback-tool

Conversation

@eskp
Copy link
Copy Markdown
Contributor

@eskp eskp commented May 7, 2026

Summary

  • KeeperHub agents on ERC-8004 are ranked primarily by reputation events. Until now there was no client-side path for users who paid for a workflow to leave on-chain feedback. This adds both interfaces -- a `feedback` CLI subcommand AND a `feedback` MCP tool -- backed by the new `/api/agentic-wallet/feedback` server endpoint (KeeperHub PR #1160).
  • Both interfaces share the same HMAC-signed POST. The user wallet pays gas natively (~$0.05-2 per call at typical Ethereum mainnet gas). Gas sponsorship via Pimlico or Turnkey native is a documented follow-up.
  • Validated end-to-end on Ethereum mainnet: tx `0xd8391d...3e92` confirmed in block 25041073 with 171,813 gas. The on-chain feedback is now visible on https://8004scan.io/agents/ethereum/31875.

CLI usage

```bash
keeperhub-wallet feedback \
--execution-id <id-from-call_workflow-response> \
--value 5 --decimals 0 \
--comment "great workflow"
```

Optional flags: `--agent-id` (default: KeeperHub agent 31875), `--chain-id` (default: 1, the only chain server-side allows today), `--base-url` (default: app.keeperhub.com).

MCP usage

```json
{
"name": "feedback",
"arguments": {
"executionId": "c5ybokpmwxi7kiau5wxja",
"value": 5,
"valueDecimals": 0,
"comment": "great workflow"
}
}
```

The calling LLM is expected to use this AFTER a successful `call_workflow` when the user confirms a rating. The companion `feedback` field in the workflow execution response (server-side) carries the prompt + tool reference so any agent reading workflow output knows to surface this to the user.

Test plan

  • `npx tsc --noEmit` clean
  • CLI compiles + registers under `keeperhub-wallet --help`
  • MCP tool registers under `tools/list` (existing test seam covers shape)
  • Live tx on Ethereum mainnet succeeded against the KeeperHub agent
  • Bump package version (release-please should auto-bump on merge based on commit message)

KeeperHub agents on ERC-8004 ranked primarily by reputation events,
but until now there was no path for users who paid for a workflow
to leave on-chain feedback. This adds both interfaces -- CLI and
MCP -- to invoke the new server endpoint that signs and broadcasts
giveFeedback() through this wallet's Turnkey policy.

CLI: keeperhub-wallet feedback --execution-id <id> --value <int>
     [--decimals <int>] [--comment <text>] [--agent-id <id>]
     [--chain-id <int>]

MCP: feedback({executionId, value, valueDecimals, comment?, agentId?,
     agentChainId?}) -- the calling LLM is expected to use this AFTER
     a successful call_workflow when the user confirms a rating.

Both share the same HMAC-signed POST to /api/agentic-wallet/feedback
on app.keeperhub.com. The user wallet pays gas natively
(~$0.05-2 per call at typical mainnet gas). Future improvement is
gas sponsorship via Pimlico or Turnkey native -- noted in the
keeperhub-side policy header.

Validated end-to-end on Ethereum mainnet against KeeperHub's
ERC-8004 agent (id 31875): tx 0xd8391d...3e92 confirmed in block
25041073 with 171813 gas used.
@eskp eskp merged commit 38c7cc3 into main May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant