It seems the only sound solution is to have a sidecar attached to the agent and have the sidecar authenticate with the gateway using mTLS. The sidecar manages its own TLS key - the agent never has access to it.
What I find more interesting is the host-scoping approach hardsnow mentioned upthread. Even without mTLS, if the proxy only injects credentials for requests matching specific host+path patterns, you've at least bounded the blast radius. A prompt-injected agent can abuse the credentials it has access to, sure, but it can't exfiltrate them to arbitrary endpoints. That's not perfect security but it's a meaningful improvement over "agent has raw Stripe key in an env var."
The real gap nobody's addressing yet is request-level authorization. Credential injection solves "who are you" but not "should you be doing this." An agent with scoped GitHub access can still force-push to main.