GitHub takes any push
GitHub takes a push to any repository the engineer can write to.
Formal Endpoint adds what agent egress needs to your secure web gateway: per-process network rules, TLS inspection and Rego policies that tell an agent's requests from its engineer's, on macOS and Linux machines, Kubernetes pods and ECS tasks.
# rule codex-desktop-egress: process tree contains com.openai.codex ALLOW llm prompt from Codex Desktop ALLOW mcp web-search-mcp (named MCP resource) BLOCK http chatgpt.com/backend-api/codex/alpha/search BLOCK http browser spawned by Codex, unapproved host # your own browser has no Codex ancestor: not intercepted
The problem
On a developer laptop, a coding agent and the engineer who started it share one user, one device and one IP address. A secure web gateway (SWG) that decides by user and URL sees one client. To allowlist what the agent reaches without locking out the engineer, egress control has to know which process opened each connection and what the request says. Formal Endpoint does that on the device, like an agent-based SWG, with rules written for AI agents and the processes they start.
Coding agents run shell commands, call model APIs, talk to MCP servers and push code, often through processes they started a few seconds earlier, and every one of those connections carries the engineer's identity.
A policy keyed on user and destination can't tell the agent's request from the engineer's: same user, same device, same IP.
Agents also run in places an SWG client was never installed: cloud agent VMs, Kubernetes jobs and ECS tasks.
# Keyed on user and URL, all three go through.
Definition
secure web gateway (SWG)noun
A secure web gateway (SWG) is a proxy between your users and the internet that applies security policy to outbound traffic: which sites and services can be reached, what can be sent, and what gets logged.
Secure web gateway services ship as cloud services, on-premises appliances or endpoint agents, and are often sold inside a SASE or SSE platform.
Most secure web gateway solutions combine TLS inspection, URL filtering by category, malware scanning, threat intelligence feeds and data loss prevention for web traffic. That model still works for employees.
A forward proxy on the machine itself that knows which process is talking, which is the job of Formal Endpoint.
How it works
Step 1 of 4
Turn on Transparent Mode on macOS or Linux, or add the Endpoint as a sidecar to Kubernetes Pods and ECS tasks. Existing clients don't change.
Step 2 of 4
A CEL rule decides which TCP connections Formal intercepts. Flows that match no rule pass through untouched and aren't logged.
Step 3 of 4
Formal terminates TLS for the selected flows and classifies the wire protocol: HTTP, MCP, LLM, SSH, cloud APIs or databases.
Step 4 of 4
Rego policies allow, block or rewrite each request. A Formal block message carries the policy ID, and every intercepted request is logged.
Agents
An agent doesn’t browse. It runs shell commands, calls model APIs, talks to MCP servers, pulls packages and pushes code. A destination allowlist helps, but every allowed domain still accepts uploads, so the control has to look inside the request: the method, the path, the MCP tool call, the git command. AI DLP policies cover the secrets in prompts.
GitHub takes a push to any repository the engineer can write to.
A model API takes a prompt with an API key pasted in.
“Going from 0.0.0.0/0 to an allowlist felt like progress, until we realized every allowed domain is still an exfiltration channel.”
# A destination allowlist lets all three through.
TLS inspection
Formal Endpoint does the break and inspect (TLS interception) on the machine that opens the connection, and only for the flows you select. Transparent Mode intercepts outbound traffic without changes to client applications, and network rules written in CEL choose which TCP connections to intercept, in up to three stages.
Sees the connecting process, its ancestors and the destination port.
macOS onlySees the destination hostname and port, the process tree, its command line and the user, plus the code signature on macOS. If any pre_tls condition matches a TLS flow, Formal terminates TLS with a certificate from the Formal local CA.
Sees the protocol once TLS is off, one of http, mcp, llm, aws, gcp, postgres, mysql, mariadb, mongodb or ssh.
Intercepted traffic is evaluated against your Rego policies, which can allow, block or rewrite a request (headers, path or body for HTTP, LLM and MCP traffic). A block with block_with_formal_message returns the policy ID plus the session and request IDs, so the person or agent who hit it can hand those to the security team.
A connection that no rule selects passes through untouched and stays out of Logs. So an allowlist starts by selecting everything a given agent sends, then blocking what the policy doesn’t allow, as the Codex Desktop example below does.
Passes throughformal ca trust adds the Formal CA to the OS trust store, which browsers and Go programs read. Node.js and most Python HTTP clients ship their own roots and ignore it. On macOS, runtime_ca_env = "all" sets NODE_EXTRA_CA_CERTS, SSL_CERT_FILE and the other runtime variables in your login session, and Claude Code gets the first three in its settings unless you turn that off (Runtime TLS trust). The general model (default deny vs default permit, layer 3/4 vs layer 7 rules) is in our guide to egress filtering, and our TLS inspection guide explains which other clients break and how to scope interception.
Capabilities
Network rules select flows by hostname, port, user and groups, process name, command line and parent processes, plus code signature on macOS. Formal recognizes 22 AI agents and coding tools by name, including Claude Code, Codex, Cursor and Devin, and every process they spawn, so a rule can target the agent and leave the engineer alone.
A network rule intercepts Codex Desktop and every process it launches. A request-stage policy allows LLM traffic and named MCP resources, and blocks direct web search and browsers that Codex spawns. Your own browser has no Codex ancestor, so it stays off this path.
Git reaches GitHub over SSH, SSH on port 443 and HTTPS, so one network rule selects git traffic from known agents and their children on all three transports, and one policy blocks git-receive-pack for the repositories you list. Clones keep working.
Agents increasingly run where no desktop client is installed: cloud agent VMs, Kubernetes jobs, ECS tasks. The headless Linux package, the Kubernetes native sidecar and the ECS sidecar run the same Endpoint, so one set of policies covers the laptop and the sandbox.
Scope network rules to agents and the processes they spawn, and they don’t collide with the SWG your employees browse through. Dry-run triggers appear in Logs with their policy status, so you see what a rule would block before it blocks anything.
block_with_formal_message returns the policy, session and request IDs to whoever hit itPlatforms
How traffic reaches the Endpoint depends on the platform.
Transparent Mode through a network extension. Agent and browser identity from code signatures; the pre_tcp stage is available.
Transparent Mode, enabled in ~/.formal/config.toml. Agents matched by process name; explicit proxy mode where NET_ADMIN isn’t allowed.
A native sidecar in each Pod. Needs Kubernetes 1.29+, NET_ADMIN and the Privileged Pod Security Standard.
A sidecar container in each task. EC2 and Managed Instances intercept all TCP; Fargate proxies HTTP and HTTPS.
Sidecar containerThe headless Debian package runs in Cursor Cloud Agent and Devin environments and signs in with the platform’s short-lived OIDC token.
OIDCNot intercepted: Transparent Mode and network rules aren’t available on Windows yet. It connects to Formal resources through local listeners with formal connect; there’s no Arm64 package (Windows docs).
Sandboxes and pods
On Kubernetes, the Endpoint runs as a native sidecar next to the application container, not on the host, and acts as the egress proxy for that Pod. It authenticates as a Formal machine user with an API key you store in a Kubernetes Secret, and the Helm chart injects it, along with the Formal CA, into Pods with this label.
metadata:
labels:
formal.ai/kubernetes-egress-inject: "true"Next to your SWG
Keep your secure web gateway for employee browsing. Scope Formal’s network rules to agents and the processes they spawn, and the two don’t collide: in the Codex Desktop example, a developer’s own browser never matches the rule. Policies, identities and audit logs live on the shared Formal platform, alongside the Connector that protects databases and internal services. SASE and secure web gateways compared and Formal vs Cloudflare show where each tool sits.
| Your secure web gateway | Formal Endpoint | |
|---|---|---|
| Traffic | Employee browsing | AI agents and the processes they spawn |
| Selects by | User and URL | Process tree, command line, user and groups, and code signature on macOS |
| Runs on | Devices with its client, or a tunnel to its cloud | macOS and Linux machines, Kubernetes pods, ECS tasks and cloud agent VMs |
| Decides on | The web request | Rego policies on the classified protocol: HTTP, MCP, LLM, SSH, cloud APIs or databases |
| URL categories, malware scanning, remote browser isolation, threat intelligence | Stay with your SWG | Not something Formal does |
How it fits
Everything Formal does for agent egress is on this page. The Endpoint that enforces it also classifies the protocols agents use most, so the same deployment also covers the pages below. The Control Plane holds network rules, policies and logs for the Endpoint and for the Connector that protects databases and internal services.
Prompts and responses to LLM providers, with policies on the AI gateway.
The redaction rules on AI DLP.
MCP requests to approved and unknown servers.
Discovering AI tools, MCP servers and skills nobody approved.
Rules per agent, keys held at the proxy and cloud agents tied to their owner.
npm, PyPI and other registry traffic can be routed through a Socket Registry Firewall, which scans packages while Formal applies access policy.
Works with
Existing clients don’t change: the Endpoint intercepts their connections and applies your rules where the traffic starts.
Splunk
PantherArchitecture
Deployment
Transparent Mode on macOS and Linux; roll it out to Macs with your MDM. Existing clients keep working without a base URL change (Endpoint docs).
A native sidecar in Kubernetes Pods, injected by label with the Helm chart, and a sidecar container in Amazon ECS tasks (Kubernetes egress).
The headless Debian package runs in Cursor Cloud Agent and Devin environments and signs in with the platform’s short-lived OIDC token (cloud agents guide).
People sign in with SSO, and SCIM keeps users and groups in sync. Policies use the groups you already manage.
Log integrations forward Formal logs to AWS S3, Google Cloud Storage, Azure Blob Storage, Datadog, Splunk or Panther.
Policies are written in Rego. Manage Formal with Terraform, Pulumi or the Kubernetes Operator.
Formal holds SOC 2 Type II and ISO/IEC 27001. The reports are on security.formal.ai.
Customer proof
“Without Formal, we couldn't have agents with access to sensitive data. With Formal, because we are able to inspect all traffic and enforce controls, we are able to provide a safe environment for the agents to get the job done.”

FAQ
Buying and fit
Traffic from a device reaches the gateway through a local agent, a proxy setting or a tunnel. The gateway terminates TLS with a certificate the device trusts, inspects the request, applies policy (allow, block, rewrite) and logs the decision. Formal Endpoint does the same on the machine or in the Pod, with a network rule choosing which flows it inspects.
Not in the classic sense. A network firewall filters by IP address, port and protocol. An SWG works at the application layer: it reads the HTTP request (host, path, method, body) and decides on that. Formal Endpoint sits closer to the SWG side: it selects TCP flows, then evaluates policy on the classified protocol, such as HTTP, MCP, LLM or SSH.
A secure web gateway controls outbound web traffic as it leaves the user. A cloud access security broker (CASB) governs how people use SaaS applications and the data stored in them, often through the SaaS vendor’s APIs. Many vendors sell both inside one SASE or SSE platform. Formal sits on the SWG side and controls traffic in flight from machines and agents.
No, it runs next to it. Keep your SWG for employee browsing, URL categories and malware scanning, which Formal doesn’t do. Formal adds per-process egress control for agents and the processes they spawn, in pods and sandboxes as well as laptops, with policies managed on the Formal platform. If you run Zscaler today, Formal vs Zscaler maps what each one covers.
Formal Endpoint inspects traffic on the machine, VM or Pod that sends it and evaluates policy there, where a cloud secure web gateway inspects traffic in the provider’s points of presence. A network rule can also forward HTTP, MCP and LLM traffic to a Formal Connector that you run, which then evaluates it. You manage both from one Control Plane.
AI agents
In SWG buying, “agent-based” means software on the device, as opposed to a cloud proxy the device reaches through a tunnel or a PAC file. Formal Endpoint is agent-based in that sense, and it’s built for AI agents. Running on the device is what lets it see the process behind each connection: code signature on macOS, process name on Linux, plus the parent chain, so process.has_agent_ancestor matches an agent and everything it spawns. The known agent identities table lists each one.
Product
Formal Endpoint installs on 64-bit Windows on x86-64 (there’s no Arm64 package) and connects you to Formal resources through local listeners with formal connect. Transparent Mode and network rules aren’t available on Windows yet, so it doesn’t inspect a Windows machine’s egress. Use macOS or Linux machines, or the Kubernetes and ECS sidecars, for the egress rules on this page.
Keep exploring
Per-process egress rules, TLS inspection and request-level policy for agents, next to the SWG you already run.