Documentation

Observe AI work across teams with workflows, activity events, and usage dashboards. Track tokens, cost, model, and who participated — human, agent, or both — for each step.

Getting Started

Go from zero to visible usage in a few steps on the dashboard.

  • Create a team and invite members
  • Register actors on that team
  • Create a team API key
  • Model a workflow with node activities
  • Push events and view them on Home

Workflows & Activities

Model your process on the canvas and attach activities to nodes.

  • Design workflows per team
  • Add activities with actor modes (human, agent, or both)
  • Optionally link actors to activities
  • Use Push metrics in the editor for ready-made samples

Pushing Metrics

Pipelines report usage with a team API key or a personal access token — no per-agent keys.

  • Authenticate with X-Api-Key (ah_tm_ team key or ah_pat_ PAT)
  • Prefer node-scoped ingest when you know the node
  • Include actors and optional dimensions (tokens, cost, model)
  • Activity names are normalized and auto-mapped onto nodes

Viewing Usage

See rollups and individual events on the team surface.

  • Home → Overview for totals and trends
  • Home → Workflow analytics for the event list
  • Filter by activity, actor, and time range
  • Attribute usage to members and actors

Self-Guided Quick Start

Follow this path to model a workflow and see your first activity events on the team dashboard. Setup is in the console; use the sample below when your pipeline is ready to report usage.

  1. 1. Set up team, actors & API key

    Everything is team-scoped: actors, keys, workflows, and usage all belong to a team.

    Create a team

    Open Teams, create a team, and invite members by email or from existing users. Admins can manage keys and membership.

    Register actors

    Under Actors, register each participant (user-linked or non-user) and assign it to the team (required). Actors appear in activity linking and usage attribution.

    Create an API key or PAT

    In Teams → API keys, create a team key for shared pipelines, or in Settings create a personal access token. Copy the plaintext once and send it as X-Api-Key on push requests.

    Security: Never commit API keys to version control or share them publicly. Revoke keys you no longer need.

  2. 2. Model a workflow

    Use the workflow editor to describe process steps and the activities that produce usage.

    Create a workflow

    From the team's workflows list, create a workflow and open the editor. Add nodes for each step in your process.

    Add node activities

    On a node, add activities with an actor mode: human, agent, or human+agent. Optionally link team actors. Save the workflow so nodes get stable ids for ingest.

  3. 3. Push metrics & view usage

    Report activity events from your pipeline, then open the team dashboard.

    Recommended: node + node-activity id

    Push to POST /metrics/nodes/{nodeId}/node-activities/{nodeActivityId}/events for a saved activity, or POST /metrics/nodes/{nodeId}/events with an activity name (maps to an existing placement or creates one). Expand Push metrics in the node panel for a live curl/fetch sample.

    curl -X POST http://localhost:5000/metrics/nodes/7/node-activities/12/events \
      -H "Content-Type: application/json" \
      -H "X-Api-Key: YOUR_TEAM_API_KEY_OR_PAT" \
      -d '[
        {
          "correlationId": "550e8400-e29b-41d4-a716-446655440000",
          "actors": [
            { "id": "alice@example.com" },
            { "id": "PR Review Agent" }
          ],
          "dimensions": {
            "tokens": 1200,
            "costUsd": 0.024,
            "model": "gpt-4.1",
            "status": "success"
          }
        }
      ]'

    Expected response: HTTP 202 Accepted

    View on Teams

    Open Home → Overview for totals and trends, or Workflow analytics for the filterable event list. Usage appears shortly after a successful push.

How Metrics Are Pushed

All ingest endpoints use an X-Api-Key header: a team API key (ah_tm_) or a personal access token (ah_pat_ from Settings). With a PAT, team is inferred from the workflow node and you must be a member of that team.

Events share a common shape: a correlation id for the usage instance, actors who participated, and optional dimensions for tokens, cost, model, and status.

EndpointWhen to use
POST /metrics/nodes/{nodeId}/node-activities/{id}/eventsRecommended when you have a saved workflow node activity id. Activity, node, and workflow are resolved from the URL — payload omits activity.
POST /metrics/nodes/{nodeId}/eventsWhen your pipeline knows the node and activity name. Hub maps the name to an existing activity on the node, or creates the catalog entry and placement then maps the event.

Payload essentials

  • correlationId — one usage instance / step within a larger task
  • actors — list of { id } (email, git handle, or agent name). Server infers user vs agent; no type or timestamp on ingest
  • dimensions — optional map (e.g. tokens, costUsd, model, status)

Architecture Overview

Metrics flow from your pipeline into team-scoped storage, then into the Teams UI. The hub does not run your agents — it records and displays how work was done.

Your pipeline → Team key or PAT ingest → Resolve activity, node & actors → Store events → Home Overview & Workflow analytics

Push

Pipelines POST activity events with a team or personal X-Api-Key, usually to a node-scoped endpoint with correlation id, actors, and dimensions.

Resolve & store

The API maps activity names onto the team catalog and workflow nodes, validates actors (team members / team agents), and persists MetricActivityEvent rows with relational actors.

Display

Home → Overview shows usage rollups and trends. Workflow analytics lists individual events so you can filter and inspect who did what on which activity.

Core Concepts

Teams

The ownership boundary for actors, workflows, API keys, activity catalogs, and usage. Members collaborate; admins manage keys and membership.

Actors

Team-scoped participants — optionally linked to a Hub user, or representing non-user systems. They can be linked to workflow activities and appear on events for attribution.

Workflows & Node Activities

Workflows model process on a canvas. Each node can define activities with an actor mode (human, agent, or both). Ingest can create or map activities onto nodes by name.

Events & Actors

Each push creates activity events keyed by correlation id. Actors record who participated — a user, an agent-type actor, or both — so dashboards can roll up usage by member and by actor.

Frequently Asked Questions

Do I have to use the AI Hub for all my AI projects?

No. Participation is voluntary. Use it when you want team-scoped visibility into workflows and usage.

What should I send in each event?

Always send a correlationId and actors. Include an activity name (or use a node-activity URL). Add dimensions such as tokens, cost, and model when you have them.

Which ingest endpoint should I use?

Prefer POST /metrics/nodes/{nodeId}/node-activities/{id}/events when you have a saved activity id. Use POST /metrics/nodes/{nodeId}/events with an activity name to map to an existing placement or create one.

Where do I see pushed metrics?

Open Home → Overview for rollups and Workflow analytics for the event list. Events only appear for the team that owns the API key used to push.

How do team API keys relate to signing in?

You sign in to the dashboard as a user. Pipelines push metrics with a team API key — they do not need a user session. Create and revoke keys under Teams → API keys.