Skip to main content

Get Workspace Context

Get a live workspace snapshot for AI agents: document stats, schemas, active extraction runs, field registry maturity, and recent activity in one API call.

The workspace context endpoint returns a comprehensive, machine-readable snapshot of your Talonic workspace: document statistics, schemas, active extraction runs, field registry maturity, and recent activity. It is the same context the embedded AI assistant uses to ground its reasoning, exposed over the API so external agents and dashboards can consume it.

Use the workspace context to build external dashboards, feed situational awareness into custom AI integrations, or monitor workspace health. Pair it with the tools endpoint, which lists every action the agent can take, to give an external agent both state and capabilities. The response includes document processing stats, schema summaries, active extraction runs, the field registry maturity distribution, and up to 15 recent activity events.

  • Document stats — total count, completed this week/24h, currently processing
  • Schemas — user-defined schemas with field counts and versions
  • Active runs — in-flight extraction runs with status and document counts
  • Field registry — total fields and distribution across the maturity levels Canonical, Established, and Provisional
  • Recent activity — up to 15 events with type, message, timestamp, and actor
GET/v1/agent/context

curl

The context is computed from live data on every request, with no caching. The response always reflects the current workspace state, so it is safe to fetch immediately before each agent turn.

Response

Response fields

organizationNamestring | nullName of the authenticated organization.
documents.totalintegerTotal number of documents in the workspace.
documents.completedThisWeekintegerDocuments that completed extraction this week.
documents.completedLast24hintegerDocuments that completed extraction in the last 24 hours.
documents.processingintegerDocuments currently being processed.
documentTypesarrayArray of document type summaries with id, name, and documentCount.
schemasarrayArray of user-defined schema summaries with id, name, fieldCount, and version.
activeRunsarrayArray of active extraction runs with id, name, status, and documentCount.
fieldRegistry.totalFieldsintegerTotal fields in the registry.
fieldRegistry.tier1integerNumber of Canonical registry fields. The payload keeps the numeric tier names: tier1 = Canonical, tier2 = Established, tier3 = Provisional.
fieldRegistry.tier2integerNumber of Established registry fields.
fieldRegistry.tier3integerNumber of Provisional registry fields.
recentActivityarrayUp to 15 recent workspace activity events with type, message, timestamp, and actor.

Response

{
  "organizationName": "Phoenix",
  "documents": {
    "total": 810,
    "completedThisWeek": 155,
    "completedLast24h": 42,
    "processing": 3
  },
  "documentTypes": [
    { "id": "uuid", "name": "Invoice", "documentCount": 320 }
  ],
  "schemas": [
    { "id": "uuid", "name": "Invoice Header", "fieldCount": 12, "version": 3 }
  ],
  "activeRuns": [
    { "id": "uuid", "name": "Schema_V13", "status": "extraction", "documentCount": 142 }
  ],
  "fieldRegistry": {
    "totalFields": 245,
    "tier1": 80,
    "tier2": 120,
    "tier3": 45
  },
  "recentActivity": [
    {
      "type": "user_uploaded",
      "message": "42 documents uploaded",
      "timestamp": "2026-04-25T09:30:00Z",
      "actor": "Avi"
    }
  ]
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.