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

# fly agent

The Fly agent is a background process that manages wireguard connections started by flyctl.
Commands such as 'fly ssh' and 'fly proxy' use this agent.
Generally, the agent starts and stops automatically. These commands are useful for debugging.

## Usage

```
fly agent [command] [flags]
```

## Available Commands

* [ping](/flyctl/cmd/fly_agent_ping)	 - Ping the Fly agent
* [restart](/flyctl/cmd/fly_agent_restart)	 - Restart the Fly agent
* [run](/flyctl/cmd/fly_agent_run)	 - Run the Fly agent in the foreground
* [start](/flyctl/cmd/fly_agent_start)	 - Start the Fly agent
* [stop](/flyctl/cmd/fly_agent_stop)	 - Stop the Fly agent

## Options

```
  -h, --help   help for agent
```

## Global Options

```
  -t, --access-token string   Fly API Access Token
      --debug                 Print additional logs and traces
      --verbose               Verbose output
```

## See Also

* [fly](/flyctl/cmd/fly_help)	 - The Fly.io command line interface
