Your agent should never see your credentials Polylane detailed an architecture in which its agents never receive the API keys, OAuth tokens or OIDC workload-identity credentials used to reach customer infrastructure: tool code decrypts credentials in a Cloudflare Durable Object thread, sends authenticated requests through dedicated provider Workers such as a Datadog Worker, and returns only data to the model. The company blocks credential-bearing endpoints such as Neon's GET /projects/{id}/connection_uri, which can return a database URI containing the role's password, filters known secret fields like secret_token and password from responses, and sets redirect: "manual" on its PostHog client to stop tokens leaking through redirects. Model-written JavaScript runs in fresh isolates via Cloudflare's Worker Loader with globalOutbound: null, disabling direct network access so the code can only reach tools. Your agent should never see your credentials Explore with AI What happens when a read-only API call returns a password? Neon’s GET /projects/{id}/connection uri can return a database URI that includes the role’s password. The request changes nothing. If we pass that response to the model, we have still handed it a credential. At Polylane https://polylane.com/ , our agents need direct access to thousands of customers’ infrastructure to investigate issues and fix what breaks. That means managing API keys, OAuth tokens and OIDC-based workload identity federation across dozens of providers. We built our systems so agents get the data they need without being able to read the credentials behind it. Our tool code authenticates. The model, and the code it writes, never gets the credentials. This post follows one request through that boundary: where the credential enters, what comes back, what the model’s own code can reach, and what happens when the model asks for something it shouldn’t. The model asks, our tools authenticate Take our Datadog integration. The agent chooses a query and a time range. Our tools attach the credentials, send the request and return the metrics: graph TB M "Model" -- |"Metric query"| T "Polylane tools