Deploying AI Agents for Real Work: Task Suitability, Permissions, and Token Costs
AI agents can now execute multi-step workflows, call tools, and adjust their actions based on results. But whether a task is worth delegating to an agent depends on the task itself, its running costs, and risk control. This article provides a practical framework for knowledge workers and technical leads: first assess task suitability with a decision table, then design least-privilege deployments for always-on agents, and finally measure results with token cost formulas and acceptance metrics such as first-pass rate and cost per unit of output.
AI agents can now execute multiple steps in sequence, call tools, and adjust their actions based on the results. But whether a task is worth handing over to an agent depends on the task itself, as well as on running costs and risk control. This article is written for knowledge workers and technical leads. It provides a ready-to-use approach: first assess the task, then design permissions for always-on operation, and finally measure results using token costs and acceptance metrics.
1. Screening Suitable Work with a Task Assessment Table
To determine whether a piece of work can be delegated to an agent, check it against the four conditions below. Each condition requires evidence—judging by intuition alone tends to overestimate what agents can do.
| Criterion | Assessment question | Evidence | Failure signal |
|---|---|---|---|
| Long task chain | Does producing one result require multiple steps such as reading, editing, computing, and verifying? | Step list, historical operation records | The task is a single step and faster to do manually |
| Describable rules | Can the evaluation criteria be written down as text, checklists, or examples? | Rule documents, templates, input/output samples | Conclusions rely heavily on personal experience and cannot be written down |
| Verifiable results | Can the output be confirmed through tests, reconciliation, validation scripts, or sampling? | Test cases, validation reports | There is no objective way to judge correctness |
| High value per unit of output | Do the saved labor hours cover the agent’s fees and maintenance costs? | Saved-hours statistics, expense bills | Benefits are below costs or cannot be measured |
The fourth condition can be estimated with a simple formula:
Monthly net benefit = monthly labor hours saved × hourly labor cost − monthly token fees − monthly maintenance hours × hourly labor cost
Only when the net benefit is positive and the first three conditions are all met should the work enter a pilot run.
By this standard, code development is a typical fit: the agent reads the context, modifies files, and runs tests, with test results serving directly as acceptance evidence. Weekly report compilation, spreadsheet reconciliation, and page building are also suitable, provided there are clear acceptance criteria. Work that requires ad hoc judgment about client relationships, involves multi-party negotiation, or lacks clear standards is hard to describe as rules and is not yet suitable for direct delegation.
2. Deployment Location and Permissions for Always-On Agents
An always-on agent runs continuously, driven by message channels, scheduled jobs, or event triggers. The deployment location determines cost, privacy, and availability, and should be chosen per task.
| Dimension | Local device | Cloud virtual machine |
|---|---|---|
| Cost | Hardware already owned; low additional expense | Billed by resources; costs accumulate over long uptime |
| Privacy | Data stays on the machine; suitable for sensitive data | Data crosses external networks; compliance must be assessed |
| Availability | Depends on the device being powered on and connected | Can stay online stably for long periods |
| Operational complexity | You handle the environment and updates yourself | You manage accounts, networking, and access control |
| Suitable tasks | Tasks involving personal or internal sensitive files | Scheduled reports, long-running batch jobs |
Whichever location you choose, the following six-item minimal runtime checklist should be enforced:
- Least privilege: only open the directories, APIs, and tools the task requires. Grant read and write permissions separately, and require individual approval for delete operations.
- Human approval: actions such as sending messages, deploying to production, changing permissions, or deleting data must be confirmed by a person before execution.
- Audit logging: record every tool call, its input source, and its output. Never write plaintext secrets to logs.
- Budget caps: set token and cost limits per task; pause and notify the owner when a limit is reached.
- Circuit breaking: automatically stop the task on consecutive failures, repeated calls to the same tool, or abnormally long outputs.
- Secret management: store credentials in environment variables or a secret service—never in code, config files, or prompts.
The pseudocode below builds these requirements into the execution loop. Before running it, you need an event channel, a scheduler, state storage, and a tool allowlist, all configured prior to deployment.
loop:event = wait_for_event(channels, scheduler) # message or scheduled trigger, pre-configuredtask = load_task_state(event.task_id) # load task progress from state storageif task.budget_used >= task.budget_limit:pause_and_notify(task, reason="budget limit reached")continueif task.retry_count >= MAX_RETRY:escalate_to_human(task) # retry limit exceeded, hand off to a humancontinueaction = plan_next_step(task)if action.requires_approval:wait_for_approval(action) # high-risk actions wait for human confirmationresult = call_tool(action, scope=task.allowed_tools) # only allowlisted tools can be calledlog_audit(task.id, action, result) # write audit logif not verify(result, task.acceptance_criteria): # check result against acceptance criteriatask.retry_count += 1save_task_state(task)continuesave_task_state(task.mark_step_done(result))
The key point of this loop is that every step first checks budget and retry counts, then decides whether human involvement is needed, and finally confirms the result against acceptance criteria. When verification fails, the task returns to the retry counter rather than looping indefinitely.
3. Prebuilt Skills and Domain Expert Review
A prebuilt skill packages the rules, tools, and acceptance criteria for a category of work into a reusable unit. The clearer the skill package, the less likely the agent is to make out-of-scope judgments.
Each skill package should specify at least:
- Scope boundaries: what inputs it can handle, what situations it cannot, and how exceptions are escalated to humans;
- Required tools and permissions: only the items necessary to complete the task;
- Acceptance criteria: the checkable conditions the output must satisfy;
- Version number: bump the version when rules change, so issues can be traced to a specific release.
The domain expert’s role is to define rules and review outputs. A common division of responsibilities:
- The domain expert defines business rules, writes acceptance criteria, and reviews sample outputs;
- The technical lead handles permission configuration, budget settings, and log retention;
- The task owner gives final confirmation of deliverables and decides whether to expand usage.
Before a skill package goes live, a four-step rollout is recommended: first run it against a set of historical samples, then have the expert review the outputs item by item, then run it in a limited scope with spot checks, and finally decide whether to scale based on the first-pass rate. When errors occur, first identify whether the cause is the skill version, the rule descriptions, or the permission configuration, and have the corresponding role fix it—rather than simply tweaking the prompt.
4. How to Calculate Token Costs
Token consumption can serve as a reference indicator of an agent task’s maturity, but it should not be used in isolation. A drop in tokens does not necessarily mean the process improved—it could also mean tasks are being aborted early. Token counts must therefore be viewed together with the acceptance pass rate.
The cost of a single task can be calculated as follows:
Total task cost = Σ (input tokens per step × input unit price + output tokens per step × output unit price) + cost of retried executions + external tool call fees
Every step’s input tokens include the context. The longer the context, the more input each step carries, so compressing irrelevant history and keeping only necessary state usually reduces costs directly. Retries must also be counted—failed executions are billed the same way as successful ones.
Here is a hypothetical example. Suppose a weekly-report task has 5 steps, each with 20,000 input tokens and 2,000 output tokens. Assume an input price of 2 per million tokens and an output price of 8 per million tokens. These prices are for illustration only; actual costs depend on your provider’s pricing.
- Per-step cost: 20,000 × 2 ÷ 1,000,000 + 2,000 × 8 ÷ 1,000,000 = 0.04 + 0.016 = 0.056
- The task runs 5 steps plus 2 retries, for 7 executions total: 7 × 0.056 = 0.392
- Tool calls incur no extra charge, so the total task cost is 0.392
Several metrics help judge whether a task is maturing:
- First-pass rate: the share of tasks that pass acceptance without retries;
- Retry rate: the share of executions that are retries;
- Average tokens and average cost per task;
- Number of human interventions per task;
- Cost per unit of output: total cost divided by the number of qualified deliverables.
These metrics should be recorded weekly or monthly and compared against the manual time the same task would take. Only when the cost per unit of output is below the labor cost, and the first-pass rate remains stable, can you conclude the deployment is working.
5. Ongoing Operations Checklist and Stop Conditions
Agents still need regular maintenance after going live. The check frequencies below are a starting point; teams can adjust them based on task risk.
- Daily: review failed tasks and circuit-breaking records; handle items that need human takeover;
- Weekly: compile first-pass rate, retry rate, and cost per unit of output; note abnormal fluctuations;
- Monthly: re-audit the permission list, revoke authorizations no longer needed, and recalculate monthly net benefit.
Stop the task immediately, preserve logs, and notify the owner when any of the following occurs:
- The budget is exhausted;
- Consecutive failures reach the team’s defined threshold;
- Audit logs cannot be written;
- The first-pass rate falls below the team’s defined floor;
- Unauthorized access occurs, or a write operation executes without approval.
The thresholds for stop conditions should be set by each team based on the task’s risk and business requirements—not copied from others.
Conclusion
To decide whether a piece of work is worth delegating to an agent, first check it against the four conditions in the assessment table, then compute the net benefit. Once a pilot is justified, deploy with least privilege and set budgets, approvals, and circuit-breaking rules for every task. Finally, use the token cost formula and acceptance metrics to decide whether to scale. Deployment success should be grounded in verifiable data, not in estimates of agent capability.
