Skip to content

track every agent request by the task it was made for - #119

Merged
hkonsti merged 9 commits into
mainfrom
hkonsti/agent-task-id-tracking
Oct 21, 2026
Merged

hkonsti merged 9 commits into
mainfrom
hkonsti/agent-task-id-tracking

Conversation

@hkonsti

@hkonsti hkonsti commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Before an agent does anything with Personal Agent Proxy it now starts a task, with a title and a goal summarizing what the person asked for, gives the task's id with every call it makes, and finishes the task when it is done. Over MCP that is two new tools, start_task and finish_task, with task required on list_connections, list_tools, read and run; the agent web pages carry the task in their address, /agent/<task>/<connection>/<collection>/<record>: /agent lists the tasks to open or start, a task bar under the header names the one the pages are on, and every run is sent for it. An agent can have any number of tasks under way at once, each tab on its own. A task never finished is taken as abandoned a day after it started, and refused from then on.

Every activity log entry keeps the task it was made for, so the person can see which request was in pursuit of which task. The activity page shows each row's task, the entry dialog shows the task's title and goal, and a task filter shows one task's requests with its status and timing.

Storage: a new AgentTask table and a nullable taskId on audit entries and feedback (migration v021_add_agent_tasks); entries from before tasks and the proxy's own actions have none. The seed groups the demo activity into tasks and takes SEED_EMAIL to fill another user's workspace, such as the dev user's. The screen map's crawl starts a task for its agent, and the MCP docs describe the seven tools and the task flow.


Open workspace in Conductor

Agents start a task with a title and a goal before anything else, give its id with every call, and finish it when done, over MCP (start_task and finish_task) and through the agent pages. The activity log keeps each request's task and shows it, with a view of one task's requests. The seed fills a workspace with tasks, for any user given by SEED_EMAIL.
Replaces the heatmap with a lane per agent and its tasks as bars along the time up to now: blue with a shimmer while a task runs, gray once done, orange where a request was refused, each with the services it used and its title where it fits. The window is chosen above the lanes or zoomed with the wheel, its end staying at now. A new lanes endpoint answers the tasks under way since a time with what was done for each, and the day-count summary goes with the heatmap. The seed gives each active agent several tasks at once.
…rom refused tasks, drop the day filter

- a task open a day after it started is abandoned: off the lanes and the task page, and refused
- a refused task (unknown, finished or abandoned) sends the agent pages to /agent/task
- the task bar follows a switch made in another tab; bad JSON in storage is no task
- feedback keeps the task id as given instead of refusing it
- the lanes' zoom listens whenever the timeline is there
- the agent, task and connection reads run at once
- drop the activity log's ?day= filter and the from/to it used, and the graph's leftovers
…-tracking

# Conflicts:
#	packages/api/src/mcp/route.test.ts
#	packages/docs/content/agents/mcp.mdx
#	packages/utils/package.json
#	packages/web/src/components/activity-graph.tsx
#	packages/web/src/components/agent-shell.tsx
#	packages/web/src/lib/activity-graph.test.ts
#	packages/web/src/pages/home-page.tsx
The task the agent pages are on is now the first part of their path,
/agent/<task>/<connection>/<collection>/<record>, instead of kept in local
storage. /agent lists the tasks to open or start, a task's pages read it once
from GET /api/agent/tasks/:taskId, and a task the api refuses sends the agent
back to /agent saying which. Each tab is on its own task, and back, reload and
links keep it.
@hkonsti
hkonsti merged commit 7429315 into main Oct 21, 2026
2 checks passed
@hkonsti
hkonsti deleted the hkonsti/agent-task-id-tracking branch October 21, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant