> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Formal Endpoint

> The egress proxy that runs on laptops, VMs, and sandboxes to log and control what people and AI agents send out

## Overview

The Formal Endpoint is a protocol-aware egress proxy that runs on the host.
It sees traffic from apps, CLI tools, and AI agents before that traffic leaves the machine.

With [Transparent Mode](https://docs.formal.ai/docs/guides/client-apps/transparent-mode.md), the Endpoint captures traffic without any change to your apps. Your [network rules](https://docs.formal.ai/docs/guides/network-rules.md) select the flows, and the Endpoint routes each one:

* **Traffic for resources behind a Connector.** The Endpoint opens a mutual TLS (mTLS) tunnel to the [Connector](https://docs.formal.ai/docs/glossary/index.md#connector) and forwards the traffic through it. The Connector evaluates your [policies](https://docs.formal.ai/docs/glossary/index.md#policy) and reaches the [resource](https://docs.formal.ai/docs/glossary/index.md#resource).
* **All other traffic.** The Endpoint terminates TLS, evaluates your policies, logs the request to the [Control Plane](https://docs.formal.ai/docs/glossary/index.md#control-plane), and sends it directly to the internet.

```mermaid theme={"languages":{"custom":["/languages/cel.json","/languages/rego.json"]}}
flowchart LR
    App[Apps, CLI tools, AI agents] --> Endpoint[Formal Endpoint]
    Endpoint -->|mTLS tunnel| Connector[Formal Connector]
    Connector --> Resource[Your resources]
    Endpoint -->|Inspected, then sent directly| Internet[Internet]
```

The Endpoint runs the same policy engine and protocol parsers as the Connector.
See [Architecture](https://docs.formal.ai/docs/guides/getting-started/architecture.md) for how the two fit together.

## Install the Endpoint

> [card] [macOS](https://docs.formal.ai/docs/guides/client-apps/macos.md)
>
> Install the app, or deploy it with MDM

> [card] [Windows](https://docs.formal.ai/docs/guides/client-apps/windows.md)
>
> Install the MSI and sign in

> [card] [Linux](https://docs.formal.ai/docs/guides/client-apps/linux.md)
>
> Debian and Ubuntu desktops and servers

> [card] [MDM rollout](https://docs.formal.ai/docs/guides/integrations/mdm.md#endpoint-rollout)
>
> Silent install, trusted CA, and automatic sign-in

> [card] [Kubernetes](https://docs.formal.ai/docs/guides/client-apps/kubernetes-egress.md)
>
> Native sidecar for Pod traffic

> [card] [Amazon ECS](https://docs.formal.ai/docs/guides/client-apps/ecs-egress.md)
>
> Sidecar for EC2 and Fargate tasks

> [card] [Cursor Cloud Agents](https://docs.formal.ai/docs/guides/client-apps/cursor-cloud-agents.md)
>
> Install in the environment and sign in with OIDC

> [card] [Devin](https://docs.formal.ai/docs/guides/client-apps/devin.md)
>
> Install once in the environment blueprint

> [card] [Modal](https://docs.formal.ai/docs/guides/example-use-cases/sandbox-credential-injection/modal.md)
>
> Sidecar with Modal OIDC

> [card] [Daytona](https://docs.formal.ai/docs/guides/example-use-cases/sandbox-credential-injection/daytona.md)
>
> Linked sandbox that runs the Endpoint

> [card] [E2B](https://docs.formal.ai/docs/guides/example-use-cases/sandbox-credential-injection/e2b.md)
>
> Endpoint inside the E2B sandbox

> [card] [Grok Bot](https://docs.formal.ai/docs/guides/example-use-cases/formal-endpoint-grok-bot.md)
>
> Install on Grok Bot computers

To install manually, open the [Control Plane](https://app.formal.ai) and click **Download Endpoint** at the bottom of the sidebar.
Then choose your operating system.

> [!NOTE]
>
> The Endpoint runs a background process, started with `formal agent`, that
> the CLI talks to. Endpoint guides call it "the agent". It is unrelated to
> [Formal Agent](https://docs.formal.ai/docs/guides/getting-started/formal-agent.md), the AI assistant
> in the Control Plane.

## Authenticate machines

CI jobs, VMs, and agent sandboxes have no user to sign in.
They log in with an OIDC token or an API key instead.
See [Log In with OIDC](https://docs.formal.ai/docs/guides/client-apps/oidc.md).

## How the Endpoint picks a Connector

When the Endpoint sends a resource's traffic to a Connector, it picks the
Connector from [listener](https://docs.formal.ai/docs/guides/core-concepts/connectors/listeners.md)
configuration. This covers `formal connect`, Transparent Mode, and network
rules with `forward_to_connector`.

A Connector is a candidate for a resource when:

* It has a hostname. With several hostnames, the Endpoint uses the alphabetically first one.
* It is in the same [Space](https://docs.formal.ai/docs/guides/core-concepts/spaces.md) as the resource, or neither has a Space.
* One of its listeners has a rule that matches the resource.

A **Resource** rule wins over a **Technology** rule. The Endpoint connects on that rule's listener port.

## What you can do with the Endpoint

> [card] [Block agent Git pushes](https://docs.formal.ai/docs/guides/example-use-cases/block-agent-git-pushes.md)
>
> Stop coding agents from pushing to sensitive repositories

> [card] [Block malicious packages](https://docs.formal.ai/docs/guides/example-use-cases/block-malicious-package-downloads.md)
>
> Block npm, PyPI, and other packages that Socket flags

> [card] [Seal Claude Code OAuth tokens](https://docs.formal.ai/docs/guides/example-use-cases/seal-claude-code-oauth-tokens.md)
>
> Keep tokens encrypted on the device

> [card] [Govern AI Harnesses](https://docs.formal.ai/docs/guides/ai-governance/overview.md)
>
> Discover, approve, and monitor MCP servers, skills, and AI harnesses

## Best Practices

> [accordion] Keep the Endpoint running
>
> CLI commands need the Endpoint running. Enable **Launch at startup** in
> preferences.

> [accordion] Use tab completion
>
> With `formal connect`, press Tab to complete resource names.

> [accordion] Browse resources with the TUI
>
> Run `formal ls` to explore and connect to resources without memorizing
> names.

> [accordion] Disconnect when done
>
> Disconnect from resources when you finish to free local ports.

## Next Steps

> [card] [Write Network Rules](https://docs.formal.ai/docs/guides/network-rules.md)
>
> Select the traffic the Endpoint intercepts

> [card] [Configure the Endpoint](https://docs.formal.ai/docs/guides/client-apps/configuration.md)
>
> Set startup behavior in `~/.formal/config.toml`

> [card] [Troubleshoot the Endpoint](https://docs.formal.ai/docs/guides/client-apps/endpoint-troubleshooting.md)
>
> Diagnose Transparent Mode, login, and reporting issues

> [card] [CLI Reference](https://docs.formal.ai/docs/guides/client-apps/cli.md)
>
> Authenticate, list resources, and connect


## Related topics

- [Formal Endpoint](https://docs.formal.ai/docs/changelog/endpoint.md)
- [Formal Endpoint for Kubernetes](https://docs.formal.ai/docs/guides/client-apps/kubernetes-egress.md)
- [Install Formal Endpoint on Windows](https://docs.formal.ai/docs/guides/client-apps/windows.md)
- [Install Formal Endpoint on Linux](https://docs.formal.ai/docs/guides/client-apps/linux.md)
- [Formal Endpoint for Amazon ECS](https://docs.formal.ai/docs/guides/client-apps/ecs-egress.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.