---
title: "Access and telemetry: run AI agents for a whole team"
description: How do you control who can use an AI agent’s sensitive tools and see what it is doing? Learn how Hubzoid manages named access and records activity, workflow runs, usage and estimated cost.
canonical_url: https://hubzoid.com/academy/inside-ai-agents/09-access-and-telemetry
last_updated: 2026-10-14
---

# Access and telemetry: run AI agents for a whole team

Grant one restricted tool and trace its use in Activity.

Lesson 9 of 9. Video length 3:04.

[Watch the video on YouTube](https://www.youtube.com/watch?v=_E9Kryvdc-c)

## Before you start

- A deployed hub, sign-in, named people and Console administrator access.

## Grant a restricted tool

In the Console: Agents › Wren & Page › Access, then Edit access on Maya's row. Open Restricted tools, tick Check Invoice, then Review changes and Save change. Or from a terminal on the server, in the folder that holds `wren-page`:

```bash title="Terminal"
hubzoid grant maya@wrenandpage.example check_invoice wren-page
```

```text title="What you should see (abridged)"
Access store: sqlite:///…/gateway-data/hubzoid-operational.db
granted maya@wrenandpage.example · check_invoice in wren-page
```

Granting a tool also grants "Use this agent". To take it back:

```bash title="Terminal"
hubzoid revoke maya@wrenandpage.example check_invoice wren-page
```

## What the invoice check returns

With the sample data, invoice HP-2231 returns:

```json title="check_invoice('HP-2231')"
{
  "invoice": "HP-2231",
  "order": "4471",
  "publisher": "Harbour Press",
  "lines_checked": 3,
  "differences": [
    {
      "title": "Paper Moons",
      "copies": 20,
      "ordered_copies": 20,
      "invoiced_list_price": "12.99",
      "ordered_list_price": "12.99",
      "invoiced_discount": "30%",
      "agreed_discount": "35%",
      "difference": 12.99
    }
  ],
  "over_by": 12.99
}
```

## Checked in code, and recorded

Every restricted call is checked before it runs, and the decision is recorded. By default, restricted tools work in the web chat, API and MCP, not in Slack, WhatsApp or Telegram.

```bash title="wren-page/.env (optional)"
# The complete list of surfaces that may reach restricted tools.
HUBZOID_RESTRICTED_SURFACES=owui,web,api,mcp
```

In the Console, Activity has two tabs:

| Tab | Shows |
| --- | --- |
| Tool decisions | Every restricted tool call and whether it was allowed, such as "Maya used check\_invoice in Wren & Page via mcp" |
| Access changes | Who changed access, for whom, and to what, such as "Nora allowed Maya to Check Invoice in Wren & Page" |

## Usage and cost

The Console's Agents page totals the last 24 hours, 7 days or 30 days: messages, users, tokens used, workflow runs and an approximate model cost. Your provider's bill has the exact figure.

## Your data, on your server

| What | Where |
| --- | --- |
| Accounts, conversations, access grants, tool decisions and usage | `gateway-data/hubzoid-operational.db` |
| Workflow runs and their saved steps | `wren-page/.hubzoid/dbos.db` |
| All of it on PostgreSQL instead | install `hubzoid[postgres]` and set `DATABASE_URL` before starting the gateway |

Back up while the hub keeps serving. One variable keeps the backup and the restore on the same file:

```bash title="Terminal, on the shop's server"
mkdir -p /var/backups/hubzoid
BACKUP=/var/backups/hubzoid/hubzoid-$(date +%F).tar.gz
hubzoid backup ./wren-page --out "$BACKUP"
hubzoid restore "$BACKUP" --dry-run
```

`--dry-run` only shows where each file would go. Stop the gateway before a real restore. The archive leaves out `.env` files, encryption and signing keys, and database passwords, so keep protected copies of those elsewhere.

> **Warning: PostgreSQL is backed up separately**
>
> `hubzoid backup` does not include PostgreSQL database contents. Dump them with `pg_dump`, as in [Backup and restore](https://hubzoid.com/docs/deploy/backup-and-restore#postgresql).

## Traces in Langfuse, if you want them

Off by default. One setting sends OpenTelemetry traces to Langfuse or a similar backend.

```bash title="wren-page/.env"
HUBZOID_OTEL_ENDPOINT=https://langfuse.example.com/api/public/otel
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Basic <base64 of public_key:secret_key>
# With claude-local, add this so tokens and cost show up in Langfuse
HUBZOID_OTEL_NORMALIZE=1
```

## Try it

1. **Put one sensitive tool in `restricted/`,** named for the permission it needs.
2. **Grant it to yourself** in the Console, or with `hubzoid grant`.
3. **Use it once,** from the web chat or your connected assistant.
4. **Find the call in Activity,** under Tool decisions. Then remove the grant, and see the change under Access changes.

## If you're stuck

### I granted the tool, but it doesn't show up

The check changes at once, but an open chat or assistant session may keep its old tool list. Start a new chat or reconnect.

### It works in the web chat, but not in Slack

Restricted tools are off there by default, because those channels don't verify each person. See `HUBZOID_RESTRICTED_SURFACES` above.

### hubzoid grant says refused

A grant to `*`, everyone signed in, is refused. Grant named people by email.

### The cost shows an asterisk, or a dash

Calls to a model without a known price are left out of the estimate and marked with `*`. A dash means no priced calls in that period. In Langfuse, cost with `claude-local` needs `HUBZOID_OTEL_NORMALIZE=1`.

## Where to go from here

- [Restrict tools](https://hubzoid.com/docs/guides/restrict-tools): Permissions, labels and what the Console shows.
- [People and Activity](https://hubzoid.com/docs/console/people-and-activity): Accounts, grants and every recorded decision.
- [Observability](https://hubzoid.com/docs/deploy/observability): OpenTelemetry and Langfuse, step by step.
- [Backup and restore](https://hubzoid.com/docs/deploy/backup-and-restore): Protect grants, runs and history.
- [Security model](https://hubzoid.com/docs/deploy/security-model): How a hub keeps secrets and access in code.
- [Templates](https://hubzoid.com/docs/getting-started/templates): Start your next hub from a working example.

## Transcript

### Intro (0:00)

Welcome back to Inside AI Agents. Last time, Maya brought the brain into Claude Cowork. This time, in the last video, we run the brain for the whole team.

### The whole shop is using it (0:12)

The whole shop uses the brain now. Sam in chat. Nora's report, every morning. Maya, in Claude Cowork. Two things matter now. The invoice check should open for the people in purchasing. And Nora wants to see how the brain is used, and what it costs.

### Grant the invoice check (0:29)

Nora opens the Admin Console, goes to the agent's access page, and edits Maya's access. Under restricted tools, she ticks Check Invoice, reviews the change, and saves. There's a command for it too. Hubzoid grant, Maya's email, check invoice. Access goes to named people, one person at a time.

### It's there, right away (0:50)

The change is immediate. In Claude Cowork, the invoice check now shows up in Maya's tools. She asks it to check invoice HP-2231, from Harbour Press. One line is off. A thirty percent discount, where they agreed thirty-five. For Sam, nothing changes.

### Checked and recorded (1:09)

Every call to a restricted tool is checked in code, before it runs, and written down. In the Console, Activity shows each decision. Maya used check invoice, through MCP. Allowed. And access changes show who gave what, to whom.

### Usage and cost (1:26)

Nora opens the Agents page. For the last seven days: messages, people, tokens used, workflow runs, and the approximate cost. It's estimated from the model's prices. The provider's bill has the exact figure.

### Runs, and your own data (1:41)

Runs and schedules shows every run of Nora's report, with each step, and its result. All of this lives in the shop's own databases, on the shop's own server. And if the team already uses a tracing tool, like Langfuse, one setting sends traces there too.

### Access and telemetry (2:00)

So that's access and telemetry. Sensitive tools open for named people, checked in code, and recorded. And a clear view of usage, runs and cost.

### Try it (2:11)

Try this. Put one sensitive tool in restricted. Grant it to yourself, use it, and find your call in Activity. Every file from the course is on the website, linked in the description.

### The whole course (2:24)

And that's Inside AI Agents. Let's pull it together. An agent is a model in a harness, running a loop. Its brain is what it knows, and what it can do. Knowledge, skills and tools.

Build that brain once, and use it three ways. Sam asks in chat. Nora's report runs on its own. Maya brings it into her own assistant. And for the whole team, sensitive tools open for the right people, and you can see what it all costs.

### Close (2:54)

That's everything you need to build your own. One brain for your internal agents. Thanks for watching.

## What the video shows

- The invoice tool is restricted until a named person receives a grant.
- The Console Activity view shows allowed or denied calls, and usage numbers include estimates.

## Files and further reading

- [Download Invoice checking tool](https://hubzoid.com/academy/examples/wren-page/restricted/check_invoice.py)
- [Download Invoice skill](https://hubzoid.com/academy/examples/wren-page/skills/check-invoice.md)
- [Download Complete example ZIP](https://hubzoid.com/academy/examples/wren-page-complete.zip)
- [Access administration](https://hubzoid.com/docs/deploy/access-administration)
- [Console activity](https://hubzoid.com/docs/console/people-and-activity)
