Activity and workspaces

Workspaces

A workspace spec declares, as data, what axonpush stores for one application and how the dashboard shows it.

axonpush has no business model built in. A workspace belongs to one application, and its spec declares what that application stores: a data dictionary of attributes, the entities you track, the events that update them, and the views, funnels and alerts you want to see. A support desk tracks tickets and customers, a hiring room tracks candidates and offers, an ops team tracks jobs and retries. Same product, different specs.

Most teams never write the spec by hand. A coding agent connected over MCP reads your code, drafts the spec, and you review and activate it in the dashboard.

How a workspace gets set up

  1. Create the workspace. In the dashboard, open Workspace and choose New workspace. Pick Your agent (recommended), Template or Blank. Your agent and Blank create an empty workspace whose draft you fill in; a template is activated straight away. See Templates.
  2. Connect your coding agent. The onboarding flow shows a setup prompt to paste into Claude Code, Codex, Cursor or another MCP client. The agent calls workspaces_describe first: it returns a plain-language summary of the workspace, the setup steps, the spec format, the role list and the catalogue of draft edits.
  3. The agent drafts. It reads your code and edits the shared draft with typed ops. You see the same draft live in the dashboard and can edit it too. See Drafts and revisions.
  4. You review and activate. The draft bar lists the changes in plain language. Activate saves an immutable revision and rebuilds every view from the observations already stored.
  5. The agent connects your app. It calls workspaces_connect, which mints a publish-only key bound to this application and one environment. An agent never sees the key: you open a one-time link to reveal it.
  6. Your app sends observations. The agent adds observe and identify calls, sends a test event and confirms it in workspaces_catalog.

The data dictionary

attributes lists every key your application may send. Each attribute has a key and a type, and optionally a label, role, personal, scope, values and description.

TypeMeaning
textUp to 200 characters, or up to maxLength (at most 1000)
numberAny number
durationMilliseconds
timeAn RFC 3339 timestamp
enumOne of values (up to 100)
refAn opaque id of another entity (entity), or a list of up to 20 with multiple: true
booltrue or false

The server stores only declared keys. Anything else in an observation is dropped and counted, and both the Workspace overview and the Health page offer to declare it.

For an outcome attribute you can also list failure, pending, expected and cancelled values, so the dashboard can tell a real failure from an expected denial or a cancellation.

Personal attributes

Mark names, emails and similar fields personal: true. They are masked for anyone who is not an organisation owner or admin, and for API keys without the profiles:read scope. Non-personal text may not contain email addresses, and every value is scanned for credentials.

Scoping attributes

Mark an attribute scope: true (usually a ref such as a company or team) to let data access grants restrict members and keys to records carrying some of its values.

Roles

A role tells the dashboard what an attribute means, so generic features work for any business without knowing your field names. A feature appears only when the dictionary has the role it needs.

RoleWhat it means and unlocks
stateLifecycle state of an entity: terminal states, the Queue, funnels, KPIs and alerts
outcomeResult of the work: success and failure colouring, failure counts, outcome series
durationHow long the work took, in milliseconds: latency views and span duration
expected_durationHow long the work should take, in seconds; alerts and staleness wait this long
actor_sideWhich side of the business the actor is on: filters and breakdowns
clientWhich software client or agent framework did the work: attribution and breakdowns
client_confidenceHow the client was identified (verified, self-reported, inferred)
wait_reasonWhy an entity is waiting
next_actorWho must act next: the Queue’s Waiting on someone group and wait KPIs
evidenceWhere an observation came from (server observed, agent reported, reconstructed)
display_nameName shown instead of the opaque id; usually a profile attribute and often personal
display_subtitleSecond line under the name, such as company or plan
avatarImage URL for the entity
last_actionThe most recent action an entity took: directory filter and column
connectionOpaque reference to the connection (OAuth grant, API key, session) a request used
noiseMarks likely automated traffic so directories and views can count it apart

Entities and event rules

An entity is a thing you track: a ticket, an order, an agent. It does not declare its own fields; it lists dictionary keys.

  • fields: attributes stored on the entity (up to 60).
  • profile: attributes that identify may set (up to 30).
  • terminal: states that end the entity’s life. Only a newer revision of the same source record reopens it.
  • events: rules for which events update it.
  • staleAfterSeconds and staleStates: when an open state is old enough to read as stale (gone quiet) rather than failed.
  • rollup: linked entity types whose open members are counted on each row.

Each event rule has a match: an exact event name, or a prefix ending in *. When several rules match, the most specific wins. A rule can also have:

  • set: literal values to write, such as {"status": "solved"}.
  • only: restrict which fields the event updates from its attributes.
  • passive: true: update the entity without counting as activity.
  • erase: true: erase the entity, everything linked to it and its profile.
  • label: the plain-language title shown for this event in timelines.

An observation updates each entity type that appears in its refs and has a matching rule. It writes the entity’s fields present in attributes (or only the only list), then the rule’s set values. State changes are recorded as milestones for funnels.

{
  "name": "Support desk",
  "attributes": [
    { "key": "status", "label": "Status", "type": "enum", "values": ["open", "pending", "solved"], "role": "state" },
    { "key": "priority", "label": "Priority", "type": "enum", "values": ["low", "normal", "high"] },
    { "key": "handleMs", "label": "Handle time", "type": "duration", "role": "duration" },
    { "key": "team", "label": "Team", "type": "ref", "entity": "team", "scope": true },
    { "key": "name", "label": "Name", "type": "text", "role": "display_name", "personal": true },
    { "key": "plan", "label": "Plan", "type": "enum", "values": ["free", "team", "enterprise"], "role": "display_subtitle" }
  ],
  "entities": [
    {
      "type": "ticket",
      "label": "Tickets",
      "fields": ["status", "priority", "handleMs", "team"],
      "terminal": ["solved"],
      "events": [
        { "match": "ticket.opened", "set": { "status": "open" } },
        { "match": "ticket.solved", "set": { "status": "solved" }, "label": "Solved the ticket" },
        { "match": "ticket.*" }
      ]
    },
    {
      "type": "customer",
      "label": "Customers",
      "fields": ["plan"],
      "profile": ["name", "plan"],
      "events": [{ "match": "customer.*" }, { "match": "customer.deleted", "erase": true }]
    }
  ]
}

The spec can also set heartbeat: an event name your source emits as a liveness signal. Its attributes appear as the source report on the Health page.

Limits the server enforces: 200 attributes, 20 entities, 200 event rules per entity, 20 funnels, 40 views and 20 alerts. The full JSON Schema is at GET /workspaces/schema.

Views, funnels and alerts

  • Views are what Insights shows. Each has an id, a type, a title, an entity, and optionally a role or key to group or measure by, a state filter, open: true for non-terminal entities, filter and exclude, and a window (15m, 1h, 24h, 7d or 30d).
  • Funnels follow an entity through ordered stages of its state, with an optional failure state, splitBy, errorKey, linkedTo and an activation window.
  • Alerts open an incident when entities stay in a state (or match a filter, such as a wait reason) for longer than afterSeconds (60 seconds to 30 days). minCount, windowSeconds, cooldownSeconds (default 3600) and silent tune them. Alerts notify owners, admins and alert webhooks; they never act on your business.
View typeShows
kpiOne number, such as open tickets
timeseriesDaily counts, optionally split by one role or key
breakdownCounts grouped by a role or key
funnelA declared funnel, optionally split by up to three roles or keys
latencyPercentiles of a duration
directoryA searchable list of entities
healthSource and pipeline health
rateSuccess over terminal outcomes, with expected failures reported apart
intervalp50 and p95 time between two events on one entity (from, to)
graphEntities and their links
{
  "funnels": [{ "name": "Resolution", "entity": "ticket", "stages": ["open", "pending", "solved"] }],
  "views": [
    { "id": "open_tickets", "type": "kpi", "title": "Open tickets", "entity": "ticket", "open": true },
    { "id": "by_priority", "type": "breakdown", "title": "By priority", "entity": "ticket", "key": "priority", "open": true },
    { "id": "handle_time", "type": "latency", "title": "Handle time", "entity": "ticket", "role": "duration", "window": "24h" }
  ],
  "alerts": [{ "name": "Tickets waiting a day", "entity": "ticket", "state": "open", "afterSeconds": 86400 }]
}

Send observations and profiles

Observations are facts your application reports. Nothing is sent unless your code calls the SDK or the API.

{
  "schema_version": 1,
  "source_event_id": "evt_123",
  "event": "ticket.solved",
  "occurred_at": "2026-10-03T12:00:00Z",
  "environment": "production",
  "refs": { "ticket": "t_42", "customer": "c_9" },
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "source": { "ref": "tickets:t_42", "revision": 12 },
  "attributes": { "priority": "high", "handleMs": 5400 }
}
  • refs maps entity types to opaque ids.
  • source_event_id is the idempotency key. Keep it stable when retrying the same fact.
  • source.revision lets a late update lose to a newer one.
  • snapshot: true marks reconstructed state. It updates state without counting as activity, and funnels never count it.
  • trace_id and span_id link the observation to a trace.

Batches of up to 100 go to POST /workspaces/{workspaceId}/observations with the events:publish scope. The response has a receipt per observation and lists undeclared keys that were dropped (dropped, dropCount). Check one observation’s storage and projection separately with GET /workspaces/{workspaceId}/observations/{sourceEventId}.

identify attaches profile traits, such as a display name or plan, to an entity (POST /workspaces/{workspaceId}/identify). Traits must be keys in that entity’s profile. They merge with what is stored, and null deletes a trait. group is the same call, named for organisation-like entities such as company or team.

The observe, identify and group helpers ship in the next SDK release. The current packages (Python 0.0.19, TypeScript 0.0.12) don’t include them yet, so use the HTTP call until then.

curl -X POST "$AXONPUSH_BASE_URL/workspaces/$AXONPUSH_WORKSPACE_ID/observations" \
-H "X-API-Key: $AXONPUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "observations": [{
    "schema_version": 1,
    "source_event_id": "evt_123",
    "event": "ticket.solved",
    "occurred_at": "2026-10-03T12:00:00Z",
    "refs": { "ticket": "t_42" },
    "attributes": { "priority": "high" }
  }]
}'

The Python and TypeScript SDKs fill in schema_version, a UUID source_event_id and the current time when you leave them out, and attach the bound trace id when there is one. TypeScript observe accepts an array; Python has observe_many. Both send batches of 100. While fail-open is on (the default), a network failure returns null or None instead of throwing; authentication and validation errors still surface. The .NET SDK exposes the same operations as generated methods (Observations.AcceptAsync, Activity.IdentifyAsync) without the convenience defaults. See Python, TypeScript and .NET.

Call them after the business change has committed, outside the transaction. For important transitions, an outbox and a background worker give you retries without slowing the request path.

Privacy and erasure

  • Only declared keys are stored. Your agent proposes the dictionary and a person approves it on activation.
  • Personal fields are masked unless the reader is an owner or admin, or a key holds profiles:read.
  • Values are scanned for credentials, and non-personal text may not contain email addresses.
  • Do not send content. Prompts, messages, documents, full URLs and raw exception text do not belong in attributes. Client-side redaction is a second layer, not a replacement for choosing what to send.
  • Erasure. DELETE /workspaces/{workspaceId}/entities/{entityType}/{entityId}?environment=... (or an event rule with erase: true) removes an entity, everything linked to it through ref attributes and its profile, and installs a tombstone so replays do not bring it back. The environment query parameter is required.

Identifiable activity records are kept for 30 days and de-identified daily rollups for 90 days (reported by GET /capabilities under controls.dataAccess).

Scopes

UseScope
Sending observations and identify, reading receiptsevents:publish
Reading activity, the catalog, revisions and describeobserve:read
Reading and editing the draft, activating, erasure, connect, access grantsworkspaces:manage
Seeing personal fields with an API keyprofiles:read
Publishing a templatetemplates:publish

Dashboard sessions need the owner or admin role wherever a row says workspaces:manage or templates:publish; members can read activity but not the draft. Keep the key your application sends with separate from the credential your agent uses to edit the workspace. workspaces_connect does this for you. See Authentication for every scope and MCP tools for the tool list.

The Nova Hiring Room and Support templates are larger worked examples of this format. Treat them as examples, not defaults. See Templates.