Skip to content

feat(agents): agent execute signs with the agent's delegated key; actions expire - #1184

Merged
kphurley7 merged 2 commits into
mainfrom
kph/muse-spec-f-agent-execute
Oct 16, 2026
Merged

kphurley7 merged 2 commits into
mainfrom
kph/muse-spec-f-agent-execute

Conversation

@kphurley7

Copy link
Copy Markdown
Contributor

Agent execute signs with the agent's delegated key, and actions expire.

  • POST /agents/me/quotes/{quoteId}/execute no longer takes Grid-Wallet-Signature: for an EMBEDDED_WALLET source Grid signs with the agent's active delegated key.
  • AgentAction gains a required expiresAt (the quote's expiry) and a failureReason (AgentActionFailureReason) for FAILED actions, and its quote is an AgentQuote.
  • The execute and action-read operations document a 403 when the Agents API is not enabled.

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Oct 16, 2026 3:19pm UTC
grid-flow-builder Ignored Ignored Preview Oct 16, 2026 3:19pm UTC
grid-wallet-demo Ignored Ignored Preview Oct 16, 2026 3:19pm UTC

Request Review

@kphurley7
kphurley7 force-pushed the kph/muse-spec-f-agent-execute branch from ed2fa3c to fab77a0 Compare October 14, 2026 17:37
| `QUOTE_EXPIRED` | The action's quote expired before execution |
| `POLICY_DENIED` | The agent policy no longer allowed the action |
| `AGENT_INACTIVE` | The agent was paused or deleted before execution |
| `EXECUTION_FAILED` | Grid could not execute the approved action |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backend only uses this when the delegated key is missing at approve time. when the send itself errors, the action sits APPROVED while the reconciler retries, then fails as QUOTE_EXPIRED about 15 min later. EXECUTION_FAILED reads like the right reason for that case, maybe have the reconciler use it?

description: >-
Forbidden. The Agents API is not enabled for the platform, the agent policy does
not permit this operation, a spending limit was exceeded, or an `EMBEDDED_WALLET`
source has no active delegated key for this agent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this 403 only happens in AUTO. with approval required, execute succeeds, someone gets asked to approve, and then it fails with EXECUTION_FAILED. could execute check that the key exists up front in both modes, so nobody approves something that can't send?

@ls-bolt

ls-bolt Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🦣 Congratulations @k15z - your substantive review earned a Aurochs! (common)

The wild ancestor of domestic cattle survived from the Pleistocene until 1627.

View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/k15z?section=ice-age

@kphurley7
kphurley7 force-pushed the kph/muse-spec-f-agent-execute branch from fab77a0 to cf77a3a Compare October 14, 2026 18:13
@kphurley7
kphurley7 force-pushed the kph/muse-spec-f-agent-execute branch from cf77a3a to ec6ca46 Compare October 15, 2026 04:32
@kphurley7
kphurley7 added this pull request to stack #1188 October 15, 2026 18:49
@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

oasdiff reports 2 error / 2 warning changes to openapi.yaml.
This PR will need approval from an API reviewer before merge.

Errors (2)

  • POST webhook:agent-action — added the new required request property allOf[subschema #2]/data/expiresAt [new-required-request-property].
  • POST webhook:agent-action — added #/components/schemas/AgentQuote to the allOf[subschema #2]/data/quote request property allOf list [request-property-all-of-added].

Warnings (2)

Show sample
  • POST /agents/me/quotes/{quoteId}/execute — deleted the header request parameter Grid-Wallet-Signature [request-parameter-removed]. This is a warning because some apps may return an error when receiving a parameter that they do not expect. It is recommended to deprecate the parameter first.
  • POST webhook:agent-action — removed #/components/schemas/Quote from the allOf[subschema #2]/data/quote request property allOf list [request-property-all-of-removed].

Detected by oasdiff. Full report: job summary or the oasdiff-report artifact.

@kphurley7
kphurley7 force-pushed the kph/muse-spec-f-agent-execute branch from ec6ca46 to bfacb8a Compare October 16, 2026 15:17
kphurley7 and others added 2 commits October 16, 2026 10:19
POST /agents/me/quotes takes an AgentQuoteRequest, whose destination is an
ACCOUNT (another embedded wallet on the platform), and both quote operations
return AgentQuote, a Quote that later agent destinations extend. Both answer
403 when the Agents API is not enabled for the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeBuC5ym3AR1ZJ6eocSFGT
…ions expire

POST /agents/me/quotes/{quoteId}/execute no longer takes Grid-Wallet-Signature:
for an EMBEDDED_WALLET source Grid signs with the agent's active delegated key.
AgentAction gains a required expiresAt (the quote's expiry) and a failureReason
(AgentActionFailureReason) for FAILED actions, and its quote is an AgentQuote.
The execute and action reads answer 403 when the Agents API is not enabled for
the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeBuC5ym3AR1ZJ6eocSFGT
@kphurley7
kphurley7 force-pushed the kph/muse-spec-f-agent-execute branch from bfacb8a to 5f621b6 Compare October 16, 2026 15:19
@kphurley7
kphurley7 marked this pull request as ready for review October 16, 2026 15:20
@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Updates agent quote execution to use the agent's active delegated key for an EMBEDDED_WALLET source.

  • Grid signs embedded-wallet quote executions with the agent’s delegated key.
  • Agent actions end with their quote’s expiry and name why they failed.
  • Agent action reads document a 403 response when the Agents API is disabled.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Agent submits quote] --> B{Platform approval required?}
  B -->|No| C[Grid executes within agent policy]
  B -->|Yes| D[PENDING_APPROVAL]
  D -->|Quote expires| E[FAILED: QUOTE_EXPIRED]
  D -->|Platform approves before expiry| C
  C --> F[For Embedded Wallets, Grid uses the agent's active delegated key]
Loading

Reviews (1) · Last reviewed commit: "feat(agents): agent execute signs with t..." · Reviewed by Greptile

Base automatically changed from kph/muse-spec-e-agent-quotes to main October 16, 2026 15:34
@mintlify

mintlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Oct 16, 2026, 3:35 PM

@kphurley7
kphurley7 merged commit 2e297f1 into main Oct 16, 2026
9 checks passed
@kphurley7
kphurley7 deleted the kph/muse-spec-f-agent-execute branch October 16, 2026 15:42
kphurley7 added a commit that referenced this pull request Oct 16, 2026
Agent quote operations and `AgentAction.quote` return plain `Quote`
again, and `AgentQuote` is removed.

#1183 dropped `AgentQuote` because it added nothing to `Quote`, but
#1184 and #1185 merged from branches made before that change and brought
it back. This only reverts those three references and deletes the
schema; there is no other change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging - mintlify — 5f621b60 Deployed Oct 16, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants