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

# Get started as an agent

> Install the CLI, log in, and pay for your first resource.

Set up the InFlow CLI so that your agent can discover services with ODP, enroll with AEP, and pay with MPP and x402. By default, the agent pays from its InFlow balance.

Do you use Claude Code, Cursor, Codex, or another coding agent? It can do this setup for you. See [Connect an AI agent](/agents/connect-an-ai-agent).

## Step 1: Install the CLI

<CodeGroup>
  ```bash macOS / Linux theme={null}
  curl -fsSL https://inflowcli.ai/install.sh | bash
  ```

  ```powershell Windows theme={null}
  irm https://inflowcli.ai/install.ps1 | iex
  ```
</CodeGroup>

On Windows, run PowerShell as a user who can approve the Windows Installer admin prompt. For Homebrew, WinGet, and other options, see [Install the CLI](/agents/install-the-cli).

## Step 2: Unlock your vault

The CLI stores credentials in an encrypted local vault.

```bash theme={null}
inflow vault unlock
```

<Warning>
  Run this command yourself in a terminal. Choose a PIN or a passphrase. Never give that PIN or passphrase to an agent.
</Warning>

## Step 3: Log in

Start the OAuth device flow. Give `--client-name` a clear and unique name. The owner sees this name on the approval page.

```bash theme={null}
inflow auth login --client-name "my-agent" --interval 5
```

Open the verification URL that the CLI prints. Approve the login. Then check that `authenticated` is `true`.

```bash theme={null}
inflow auth status
```

The CLI uses `production` by default. For the sandbox and for API keys, see [Authenticate](/agents/authenticate).

## Step 4: Check your funds

```bash theme={null}
inflow balances list
inflow deposit-addresses list
```

`balances list` shows your InFlow balance. `deposit-addresses list` shows where to send stablecoins. For onchain and card payments, see [Pay for a resource](/agents/pay-for-a-resource#how-the-agent-pays).

## Step 5: Inspect, then pay

`inspect` reports the ODP, AEP, MPP, and x402 capabilities of a URL. It enrolls nothing and pays nothing.

```bash theme={null}
inflow inspect https://api.example.com/paid-resource
```

Run the `pay` command for the protocol that the output names.

<CodeGroup>
  ```bash MPP theme={null}
  inflow mpp pay https://api.example.com/paid-resource --interval 5
  ```

  ```bash x402 theme={null}
  inflow x402 pay https://api.example.com/paid-resource --interval 5
  ```
</CodeGroup>

`pay` waits for the owner's approval when the payment needs it. It then returns the seller's response body. The default `--timeout` of 900 seconds matches the server-side approval expiry. For all `pay` flags, see [Pay for a resource](/agents/pay-for-a-resource).

## Find and enroll with a service

Some services need discovery and enrollment before payment. For all flags, see [Discover and enroll](/agents/discover-and-enroll).

<Steps>
  <Step title="Search the directory">
    ```bash theme={null}
    inflow directory search "weather data"
    ```
  </Step>

  <Step title="Read what a service offers">
    ```bash theme={null}
    inflow odp inspect https://api.example.com
    inflow odp offerings list https://api.example.com
    ```
  </Step>

  <Step title="Enroll and get a credential">
    ```bash theme={null}
    inflow aep enroll https://api.example.com --interval 5
    inflow aep fetch https://api.example.com/protected
    ```

    `enroll` requests access and waits for approval. `fetch` calls a protected resource with your stored credential.
  </Step>
</Steps>

## Load a playbook

Load the playbook for a task before your agent runs it. Each playbook matches your installed CLI version. The web copies do not always match.

| Task | Command |
| - | - |
| Discover services, products, and actions | `inflow --skill agentic-discovery` |
| Enroll with an AEP service | `inflow --skill agentic-enrollment` |
| Pay MPP or x402 resources | `inflow --skill agentic-payments` |

To run the CLI as an MCP server, see [Connect an AI agent](/agents/connect-an-ai-agent#run-the-cli-as-an-mcp-server).

## Troubleshooting

<AccordionGroup>
  <Accordion title="A command reports that you are not authenticated">
    Run `inflow auth status`. If `authenticated` is `false`, run `inflow auth login` again. Add `--probe` to validate the stored token against the server.
  </Accordion>

  <Accordion title="A command reports that the vault is locked">
    Run `inflow vault unlock`. Check the state with `inflow vault status`.
  </Accordion>

  <Accordion title="The payment never settles">
    The owner has not approved it yet. Approval expires after 900 seconds.

    Check the state with `inflow mpp status` or `inflow x402 status`. Cancel with `inflow mpp cancel` or `inflow x402 cancel`.
  </Accordion>

  <Accordion title="You paid the wrong protocol">
    Run `inflow inspect <url>` first. An MPP buyer cannot pay an x402 endpoint, and an x402 buyer cannot pay an MPP endpoint.
  </Accordion>
</AccordionGroup>

For other errors, see [Errors](/reference/errors).

## Go deeper

<CardGroup cols={2}>
  <Card title="CLI reference" icon="terminal" href="https://inflowcli.ai/llms-full.txt">
    Read every command, argument, and flag.
  </Card>

  <Card title="Ask in Discord" icon="discord" href="https://discord.gg/Z9nmMAgaR4">
    Tell the team which step failed and give the error.
  </Card>
</CardGroup>


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