Skip to content
AI GovernanceMarkdown

Get started with AI Governance

Have a user approve their enrolled device, then read the AI tools, MCP servers, skills and local models on it from your realm's AI fleet.

AvailableAPI

In this guide you see the AI tools on one of your devices. Maya approves her enrolled laptop, maya-laptop, for AI governance, and you read from your realm’s AI fleet which AI tools are installed on it, the MCP servers and skills each one has, and the models a running Ollama holds. It takes about ten minutes.

  • An enrolled device, here maya-laptop, running Linux (amd64 or arm64, with glibc 2.31 or later, such as Debian 11 or Ubuntu 20.04 and later) or macOS. Windows isn’t supported. If you have none yet, Get started with Endpoint Management enrolls one. Every Linux and macOS device client package carries the AI tools agent, the part of the device client that finds AI tools.
  • A user of your realm to approve the device, here Maya, who can sign in to the realm as she always does. Approving needs no administrator privilege.
  • A shell on the laptop with sudo, to print the approval code.
  • A privilege that reads your realm’s configuration, such as RealmViewer or RealmOwner, in foobar or a realm above it, and your session in $CVYUH_SESSION. Call the API shows how to get one. The fleet is read through the API; the dashboard has no fleet screens yet.

There’s nothing to turn on in the realm: every realm gets its AI governance sign-in when it’s created. The AI tools agent’s command is cvyuh-aig on a standard install, beside the device client under /var/cvyuh on Linux and /Library/Cvyuh on macOS.

  1. Print the waiting sign-in on the laptop:

    Terminal window
    sudo /var/cvyuh/bin/cvyuh-aig --socket /var/cvyuh/var/run/aig.sock enrollment
    awaitingAuthentication
    Sign in at: <sign-in address>
    Code: <code>
  2. Maya approves the laptop. She opens the address in any browser, on any device, signs in to foobar as she always does, and approves the code within its lifetime (10 minutes by default). Run the same command again: it prints enrolled. The laptop has joined your realm’s AI fleet as Maya’s, and Maya is added to the laptop’s device record (see Device records).

  3. Check the fleet sees it. Signed in as yourself, ask for the fleet’s overview:

    Terminal window
    curl https://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/overview \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    total_devices counts the laptop, and online_devices too while it’s connected. The fleet’s fields are spelled in snake_case.

  4. List the devices and their tools:

    Terminal window
    curl https://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devices \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    Each device carries its hostname, os, who approved it (enrolled_by_subject), and installed_tools. Keep the id of maya-laptop: the fleet device id, the fleet’s own id for it.

  5. Read the laptop in full:

    Terminal window
    curl https://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devices/<fleet device id> \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    discoveries lists each tool with its kind, version and path, and the mcp_servers and skills it has; model_runtimes lists a running Ollama and its models. Fleet records describes every field:

    {
    "id": "<fleet device id>",
    "hostname": "maya-laptop",
    "os": "linux",
    "enrolled_by_subject": "<Maya's user id>",
    "installed_tools": ["claude-code"],
    "discoveries": [
    {
    "kind": "claude-code",
    "version": "<version>",
    "path": "<path>",
    "mcp_servers": [
    {
    "name": "github",
    "transport": "http",
    "url": "<server address>",
    "enabled": true,
    "source": "<settings file>"
    }
    ],
    "skills": []
    }
    ],
    "model_runtimes": [{ "kind": "ollama", "models": [{ "name": "<model>" }] }]
    }

On the laptop, add an MCP server to one of its tools, or install a supported tool. The AI tools agent looks again soon after a tool’s settings file changes, and every 15 minutes regardless; read the laptop again and the change is there. To see what the agent finds locally, run the command from step 1 with discover in place of enrollment.

If the command prints a state other than awaitingAuthentication or enrolled, or the laptop doesn’t appear in the fleet, see the troubleshooting on AI governance sign-in and Fleet records.