AI agents — planning & execution
AI agents — planning & execution
FastLinkIt's project management ships with an AI agent layer that can:
- Plan — turn a goal ("Add Stripe checkout to the shop") into a tree of work items
- Execute — pick up an assigned work item and write the response (text-mode) directly into the audit trail
The system is provider-agnostic — adapters exist for Anthropic Claude (Sonnet, Opus, Haiku) and a built-in Mock agent for local testing. Each adapter is a separate package; hosts register the ones they want.
Plan with AI
Click the stars button in the project detail header to open the Plan with AI dialog.
Step 1 — compose
Pick an agent from the dropdown (Mock by default; Claude models when configured), then describe the goal in plain English:
"Build out the donation widget for the homepage. Should include: amount picker (5/10/25/custom), Stripe checkout button, success page redirect, donor list with pagination."
Click Generate plan.
Step 2 — review
The dialog renders the proposed plan as a flat list with hierarchy (parent → child indentation):
- One checkbox per item
- Inline-editable titles (click to edit)
- Type icon + initial status
Uncheck items you don't want. Click titles to refine wording. The plan is just a draft — you're the editor.
Step 3 — materialise
Click Create N items. The kept items are created in topological order:
- Parents before children
- Predecessors before dependents
- Mapping built on the fly so dependency edges land correctly
Items whose parent was unchecked become root items in the project. Dependency edges between unchecked items are silently dropped. The dialog shows a summary toast when done.
Agent execution
Once an item is assigned to an AI agent (set the Assignee to a registered agent ID), the agent orchestrator picks it up:
- Polls every 30 seconds for items in the project's first column assigned to a registered agent
- Inserts a Pending run row, moves the item to the in-progress column
- Calls the agent's execute method with the work item's structured fields (title / description / acceptance criteria / repro steps / related items)
- Records the response on the run row, moves the item to the appropriate column based on result status:
- Completed → review-style column
- Blocked / Failed → blocked column (with reason)
- Cancelled → leave alone for retry
The AI activity preview
Open the work-item editor or click the row in the preview pane on /projects/{id} to see the AI activity section:
- Latest run with status pill (Completed / Running / Blocked / Failed)
- Agent ID, timestamp, duration, cost (USD)
- Block reason for failures
- Full narrative rendered through Markdown
- Older runs collapse under a
<details>summary; expand to read history
Status colours
- Completed (green) — the agent returned a usable response
- Running (blue, pulsing) — pickup in progress
- Blocked (amber) — agent reported a blocker (e.g. "needs human approval")
- Failed (red) — provider error or validation failure
Configuring credentials
Agents need API keys. Three layers, resolved per call:
- Per-user keys — set yours at
/Account/Manage/AiKeys. Encrypted at rest with a versioned data-protection purpose. - Org keys — Owner / Admin can set shared keys at
/organization(when the project belongs to an org). Members fall back to these when they have no personal key. - System fallback —
Projects:Agents:{provider}:ApiKeyinappsettings.json. Admin-only — non-admins get an error prompting them to set up their own key.
Background services (the orchestrator running without a user context) skip the user/org/role checks and go straight to the system fallback.
Mock agent
The package ships a Mock agent registered by default — works without any API key. Generates a deterministic 4-step canned plan and a successful empty-diff execution result, so you can drive the planning UI locally without provider configuration.
To remove from the picker: hosts can drop the registration before adding their real adapters, or filter the picker on Provider != "mock".
Cost tracking
Every agent run records:
- Input / output token counts — provider-reported usage
- USD cost — computed from the model's published per-token rate
Surfaced in the work-item AI activity panel. A future enhancement will roll cost up at the project + workspace level.
Related
- Working with work items — assignee picker
- Organization Management