Ad Computer Docs

Agent setup

Use adcom from Codex, Claude Code, SSH sessions, and other remote or headless environments.

This guide is for agent-driven setup.

Use it when adcom is running on a remote VM, container, CI worker, OpenClaw instance, or any environment where the browser is not on the same machine as the CLI process.

Canonical command

adcom setup --json --no-open --print-url

This is the recommended bootstrap command for Codex, Claude Code, and other automation.

What the agent does

The agent can complete these steps on its own:

  • install adcom
  • start CLI authentication
  • wait for browser approval
  • wait for Meta to be connected in the app
  • select a default account when needed
  • create and validate .adcom/context.yaml
  • verify hosted MCP readiness

What the user does

The user only needs to:

  • open the URL from the login_url event
  • sign in and approve CLI access
  • finish Meta authentication at the app integrations page if prompted

Event stream

adcom setup --json emits newline-delimited JSON events.

Example sequence:

{"event":"login_url","authorize_url":"https://app.ad.computer/cli/authorize?request_id=..."}
{"event":"login_complete","workspace_id":"user_123"}
{"event":"provider_action_required","provider":"meta","action":"connect","url":"https://app.ad.computer/integrations","timeout_ms":600000}
{"event":"provider_default_account_selected","provider":"meta","default_account_id":"act_123"}
{"event":"context_initialized","path":"/workspace/.adcom/context.yaml"}
{"event":"setup_complete","report":{"ready":true}}

One-shot readiness

Use this when you want the current state without re-running setup:

adcom status --json

It returns overall readiness, detailed checks, and blocking remediation.

SSH and headless notes

  • No localhost callback is required.
  • The browser can run on a different machine from the CLI process.
  • --no-open --print-url is the safest default for remote agents.
  • The command keeps running until approval and Meta connection complete, or until the timeout is reached.

Recovery

If setup times out:

  • rerun adcom setup --json --no-open --print-url
  • reuse the new login_url
  • then verify the final state with adcom status --json

Local bridge

If the client needs stdio MCP after setup:

adcom mcp serve

Once the bridge is running, the canonical first tool call is:

review_default_account_performance

That keeps the first operational read aligned with the configured default Meta account and the local workspace context.

On this page