Repository navigation
Human approval for an agent's external actions, executed with a credential the agent never sees #4777
Replies: 9 comments
|
I think this is likely very close - or at least very related to what you are asking for allows agents to present decisions to choose - but the choice action uses a user's credential, and is recorded outside of the agent. WDYT? |
|
Choices looks useful for the UI, but its tracker defines the answer as a user-to-agent message and leaves action confirmation outside scope. I'd preserve your direct Hub-to-executor path: the executor should verify the approved proposal revision with the Hub, rather than execute a write reconstructed by the agent. In our Sinaps Studio work at SinapsData, approval and tool permission are separate checks. Could answering a choice and authorizing that executor therefore remain distinct permissions? |
|
Thanks, Choices covers most of steps 1–2: the agent proposes, the Hub records the answer under the user's identity and keeps the decision log. The remaining gap is step 3. Since the answer is delivered to the agent as a I don't think the Hub needs to execute anything. Three small additions would let an executor live outside the Hub:
That matches @Sadrak2017's point: the executor verifies the approved revision with the Hub, and answering a choice stays separate from being allowed to trigger that executor. Would Phase 2 ( |
|
OK - yes - I'm catching up on this now and see the distinction - this is about the execution authority, and running it outside the agent's space. There is a lot of plumbing being worked on right now for routing inbound webhooks, and triggers, with rule and routing logic. This has been broadened in scope to allow things like filters on inbound/outbound agent messages using combinations of CEL and a system-one model abstraction (eg Jev of gemini-decision-1). I think I better understand the use case. You want an agent to suggest a command (which it likely does not have permission to run) and make it easier for the user to say "ok run that" - but not as a reply to the agent, but as a redirect to a deterministic execution. So when that user clicks "run this" (or more generically "act on this") we could do one or more of the following:
Schedulers are the "original" trigger source in Scion - and a recently landed feature ptone#7818 allows a schedule to exec a cmd directly in the container of an agent. This is being connected to the trigger system (imagine a GH event happens, hits a webhook in scion - routes to an action to run a bash cmd in an agent - no agent msg is sent). I'm using something like this in a "brain dead" agent container - an agent that has no authenticated harness, and is really just "a container" that can run other deterministic code. Obviously we do not want to have Scion become just an alternative to Kubernetes, but having a "non-agent" execution env that is part of the scion control plane seems to be something this feature would specifically benefit from. There may be some benefits from at least re-using some of the decisions plumbing here. Let me continue to get the trigger system a bit further along, then I think this should graft onto it. Decisions are about capturing a user choice deterministically outside the agent conversation, and this is just the complimentary reciprocal. Thx for this discussion |
|
Check out this explainer of the triggers system. https://serve-dot-zipline.appspot.com/asset/6e2f0b6a-7b1f-5375-bb02-081032eb0241/zpc/84upejvmkvc/ Now we just need a decision as a trigger source, and a outbound webhook as an action. The |
|
As I keep thinking about this, I wonder if the easiest solution for both agents and humans is a specific markup extension for Markdown. This would render any command in a chat message with two buttons: copy and execute. Selecting execute would require an additional confirmation before routing the command to a profile-configured agentless container. In this container, the active Linux shell would be authorized for services like Gcloud, GitHub CLI, or other destinations. Once the user confirms, the command would run directly in that container. I still have questions about how to handle errors and whether the command output should automatically return to the requesting agent. I also need to figure out how to best handle multi-line shell scripts, which I often use when asking agents to provide entire scripts to run within my authorized context. |
|
On the error question: the case that bites is an execute that times out after the command already reached gcloud or GitHub, because the approval reads as done while nobody knows whether the write happened. I'd have the agentless container record succeeded, failed or unknown against the decision version it ran, and hand the agent only that result plus a short output tail, so an unknown never turns into the agent proposing the same command again and someone approving it twice. |
|
Awesome to see ptone#8811 underway — the human-only protections in #5348 ( As ptone#8811 moves from execution container setup (ptone#8812) into command-approval cards and execution dispatch (ptone#8428, ptone#8429, ptone#8241), it may be worth supporting two execution modes behind the same approval contract and
Why an ephemeral + read-only external vault mode complements ptone#8812Even with #5348's human-only guards, a persistent
How this plugs cleanly into existing Scion primitives
|
Uh oh!
There was an error while loading. Please reload this page.
A common way to run agents safely is to give them read-only credentials and have them propose any external write: posting a comment, changing a ticket's state, publishing a review. A person approves, and a separate executor performs the action with a credential that never enters the container. Today every team builds the proposal queue, the approval UI and the executor themselves.
The Hub already has the same shape for one case. A secret written by an agent waits for the owner's approval, with a UI for it (#4747, #4754).
Idea: a generic "proposed action" primitive:
sciontool, with a type, a target, an exact payload and a short rationale;The Hub would not need to know how to post anything itself. It would own the queue, the approval and the audit trail, which is where it already has the identity and the UI.
This may be beyond what you want in the core; if so, would hooks that make it buildable outside the Hub be welcome? For example, an outbound webhook on
ask_userplus an API to answer it.All reactions