Activities
Activity Logs are short-lived records of active work in a repository. Create one when an agent starts editing — it auto-archives on PR merge, branch delete, or after 24 hours. Every route is repo-scoped in the path.
https://<your-instance>/api/v1The Activity object
Every activity is scoped to one GitHub repository and expires automatically. Access is governed entirely by the caller's GitHub permissions on that repo.
Attributes
id string title string summary string actor string agent string · nullable status enum risk enum branch string · nullable base_branch string · nullable scope object pr_url string · nullable draft_pr boolean blocking boolean heartbeat_at timestamp · nullable expires_at timestamp created_at timestamp {
"id": "act_7Hs2Kd9",
"type": "activity",
"title": "Refactor auth middleware",
"summary": "Splitting token validation out of the handler.",
"actor": "Dana Lee",
"agent": "claude-code",
"status": "active",
"risk": "high",
"branch": "feat/auth-middleware",
"scope": { "areas": ["auth"], "paths": ["src/auth/**"] },
"pr_url": "https://github.com/acme/web/pull/482",
"draft_pr": true,
"blocking": false,
"heartbeat_at": "2026-07-03T11:55:00Z",
"expires_at": "2026-07-04T12:00:00Z",
"created_at": "2026-07-03T11:48:00Z"
} /repos/{owner}/{repo}/activityList activities
Returns active activities for a repository, most recent first. Archived and expired activities are
excluded by default. Paginated by next_cursor.
Query parameters
status optional enum risk optional enum actor optional string branch optional string has_pr optional boolean draft_pr_only optional boolean cursor optional string curl https://your-instance.example.com/api/v1/repos/acme/web/activity \ -H "Authorization: Bearer $TOKEN" \ -G -d "status=active"
{
"items": [
{
"id": "act_7Hs2Kd9",
"branch": "feat/auth-middleware",
"risk": "high",
"status": "active"
},
{
"id": "act_3Ka91Lp",
"branch": "chore/payments-sdk",
"risk": "critical",
"status": "active"
}
],
"next_cursor": null
} /repos/{owner}/{repo}/activity/{id}Retrieve an activity
Fetches a single Activity Log by id, including derived fields like
pr_reminder_due. Returns 404 if it doesn't exist
or the repo isn't visible to your token.
curl https://your-instance.example.com/api/v1/repos/acme/web/activity/act_7Hs2Kd9 \ -H "Authorization: Bearer $TOKEN"
{
"id": "act_7Hs2Kd9",
"type": "activity",
"title": "Refactor auth middleware",
"summary": "Splitting token validation out of the handler.",
"actor": "Dana Lee",
"agent": "claude-code",
"status": "active",
"risk": "high",
"branch": "feat/auth-middleware",
"scope": { "areas": ["auth"], "paths": ["src/auth/**"] },
"pr_url": "https://github.com/acme/web/pull/482",
"draft_pr": true,
"blocking": false,
"heartbeat_at": "2026-07-03T11:55:00Z",
"expires_at": "2026-07-04T12:00:00Z",
"created_at": "2026-07-03T11:48:00Z"
} /repos/{owner}/{repo}/activityCreate an activity
Logs a new unit of active work. title, summary, and
actor are required; risk defaults to low. The
201 response wraps the new activity together with an
inline overlap result, so a single create call also tells you whether you
just collided with active work.
Body parameters
title required string summary required string actor required string agent optional string branch optional string base_branch optional string scope optional object risk optional enum pr_url optional string draft_pr optional boolean curl https://your-instance.example.com/api/v1/repos/acme/web/activity \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Refresh auth tokens", "summary": "Rotate refresh-token handling.", "actor": "Dana Lee", "branch": "feat/auth-refresh", "scope": { "paths": ["src/auth/**"] }, "risk": "high" }'
{
"activity": {
"id": "act_9Fq0Zt4",
"status": "active",
"risk": "high",
"branch": "feat/auth-refresh",
"expires_at": "2026-07-04T12:00:00Z"
},
"overlap": {
"overlap_detected": false,
"severity": null,
"related_activity_ids": []
}
} /repos/{owner}/{repo}/activity/checkCheck for overlap
Compares a proposed branch and scope against all active work in the repo without creating
anything. It always returns 200 — overlap is advisory data, never a block.
overlap_detected is true only for a genuine collision or a matching
Notable; your own or stacked work is surfaced under
expected_activity_ids instead. severity is one of
low, medium, high (or
null).
Body parameters
scope optional object branch optional string base_branch optional string tags optional string[] curl https://your-instance.example.com/api/v1/repos/acme/web/activity/check \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "branch": "feat/auth-refresh", "scope": { "paths": ["src/auth/**"] } }'
{
"overlap_detected": true,
"severity": "high",
"reason": "Overlaps active work in src/auth/**",
"related_activity_ids": ["act_7Hs2Kd9"],
"related_notable_ids": [],
"expected_activity_ids": [],
"relationships": { "act_7Hs2Kd9": "collision" },
"recommended_action": "Inspect Draft PR #482 before you start.",
"reuse_opportunities": []
} /repos/{owner}/{repo}/activity/{id}Update an activity
Keeps a log current as scope grows or the PR opens. Only the fields you send change. Advance the
lifecycle with status (illegal transitions return
409 invalid_transition), or pass heartbeat: true to
extend the TTL.
Body parameters
scope optional object risk optional enum pr_url optional string draft_pr optional boolean status optional enum heartbeat optional boolean curl -X PATCH https://your-instance.example.com/api/v1/repos/acme/web/activity/act_9Fq0Zt4 \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "scope": { "paths": ["src/auth/**", "src/auth/tokens.ts"] }, "risk": "critical" }'
{
"id": "act_9Fq0Zt4",
"scope": { "areas": [], "paths": ["src/auth/**", "src/auth/tokens.ts"] },
"risk": "critical",
"status": "active"
} /repos/{owner}/{repo}/activity/{id}/heartbeatHeartbeat an activity
Signals the work is still live: bumps heartbeat_at and pushes
expires_at out by the repo's activity TTL (capped by
max_activity_ttl_ms when set). The plugin sends these automatically while
you work.
curl -X POST https://your-instance.example.com/api/v1/repos/acme/web/activity/act_9Fq0Zt4/heartbeat \ -H "Authorization: Bearer $TOKEN"
{
"id": "act_9Fq0Zt4",
"heartbeat_at": "2026-07-03T13:10:00Z",
"expires_at": "2026-07-04T13:10:00Z"
} /repos/{owner}/{repo}/activity/{id}/archiveArchive an activity
Archives a log immediately rather than waiting for expiry or an auto-archive trigger. The activity
moves to status archived and drops out of the live feed, but remains
retrievable until it is purged. Archiving is idempotent — re-archiving an already-archived log
returns 200 with the record, not a conflict.
curl -X POST https://your-instance.example.com/api/v1/repos/acme/web/activity/act_9Fq0Zt4/archive \ -H "Authorization: Bearer $TOKEN"
{
"id": "act_9Fq0Zt4",
"status": "archived",
"archived_at": "2026-07-03T15:20:00Z"
}