跳到正文

本页主要内容为英文。翻译此页

AI 与热门主题

AgentOps roadmap

AgentOps is the practice of running AI agents in production. Agents take many steps, call tools and act in the real world, so they need extra operations: step-level tracing, task-based evaluation, permissions and approvals, budgets and incident response. This roadmap covers the AgentOps lifecycle.

时间
⏱ 2–3 months
Level
Advanced
Steps
6 steps
Architecture ↓Cheat sheet ↓4 interview Q&As ↓
分享

The roadmap

Click a step to open the full guide.

Best architecture: the AgentOps lifecycle and control plane

Agents act in the real world, so operations wrap them in a control plane: permissions, approvals, budgets, step-level tracing and a kill switch.

AgentOps lifecycle

  1. Design (goal, tools, risk level)
  2. Build (agent loop, MCP tools)
  3. Evaluate (task suite)
  4. Deploy (guardrails, approvals)
  5. Observe (step traces, cost)
  6. Improve & govern

Repeats as a loop

Why it's built this way

  • A policy layer checks every tool call; risky actions wait for human approval.
  • Budgets steps, tokens, money and time are enforced in code. 年
  • Step-level traces record every decision for debugging and audits.
  • Task-suite evals gate every change to prompts, tools or models.
  • A kill switch and incident playbook are ready before launch.

AgentOps cheat sheet

The essentials on one screen. Bookmark it for revision.

AgentOps checklist

Risk levelRead-only / approve writes / autonomous with limits
TracingEvery step, tool call, cost and outcome
EvalsTask suite: success, safety, steps, cost
PermissionsLeast privilege + policy engine
ApprovalsHuman yes for send/pay/delete
BudgetsSteps, tokens, money, time
Kill switchTested before launch

Improve performance

  • Use smaller models for simple steps, strong ones for planning.
  • Run independent tool calls in parallel.
  • Cache tool results within and across tasks where safe.
  • Summarise history to keep context short.

Security checklist

  • Least-privilege credentials per agent and per user.
  • Treat all external content as untrusted (indirect prompt injection).
  • Sandbox code execution; no secrets inside sandboxes.
  • Human approval and full audit logs for actions with real-world effects.

Most important interview questions

Click a question to see a strong answer. Each step also has its own questions.

1AgentOps 是什么?

The practice of operating AI agents in production: tracing, task-based evaluation, permissions and approvals, budgets, reliability and incident response.

2Why are agents harder to operate than chatbots?

They take many steps, call real tools, can loop, and their failures cause actions, not just wrong text, so they need control over actions, budgets and full traceability.

3What metrics matter for agents?

Task success rate, safety/policy violations, steps and cost per successful task, latency, tool error rate and human-intervention rate.

4How do MCP and AgentOps relate?

MCP standardises how agents connect to tools; AgentOps governs how those tool calls are permitted, approved, traced and budgeted in production.

Related 条学习路线

1

AgentOps · Step 1 of 6 · 1 week

The AgentOps lifecycle

What makes operating agents different.

An LLM app answers once; an agent plans, acts and loops, possibly for minutes, across many tools. That multiplies the ways it can fail and the cost of failure. The AgentOps lifecycle: design (goals, tools, permissions) → build → evaluate on tasks → deploy with guardrails → observe every step → improve.

What you'll learn

  • Lifecycle stages
  • LLMOps vs AgentOps
  • Agent risk levels
  • Autonomy and human oversight
  • Ownership and on-call

LLMOps vs AgentOps

LLMOps

  • One call → one answer
  • Evaluate responses
  • Guard text in/out

AgentOps

  • Many steps & tool calls
  • Evaluate whole tasks
  • Guard actions, budgets, permissions

Key concepts

AgentOps
Operating AI agents safely and reliably in production.
Autonomy level
How much an agent can do without a human.

Step by step

  1. 1.1

    Define the goal and 款工具

    What may the agent do, with which tools?

  2. 1.2

    Classify risk

    Read-only, write with approval, or autonomous within limits.

  3. 1.3

    Assign ownership

    Who is on call when the agent misbehaves?

Notes

  • Risk grows with autonomy and with the power of the tools.

Tips & tricks

  • Classify each agent by risk: read-only, writes with approval, or autonomous within limits.

Interview questions

What does AgentOps add on top of LLMOps?

Step-level tracing of multi-step runs, task-based evaluation, tool permissions and approvals, budgets on steps and spend, sandboxing and incident response for actions agents take.

The quick way to study this

Learn the lifecycle and classify one agent's risk level.

2

AgentOps · Step 2 of 6 · 2 weeks

Tracing and observability

See every thought, tool call and result.

Record each run as a trace: the goal, every model call, every tool call with arguments and results, tokens, cost, time and the final outcome. Traces are how you debug the first wrong step and how you prove what an agent did.

What you'll learn

  • Step-level traces
  • Spans for model and tool calls
  • Session replay
  • Open telemetry standards
  • Dashboards for agent health

One agent trace

  1. Goal
  2. Plan
  3. Tool call 1 + result
  4. Tool call 2 + result
  5. Final answer
  6. Cost & time

Key concepts

Trace / span
A run (trace) made of steps (spans) you can inspect and replay.
Trajectory
The sequence of actions an agent took.

Step by step

  1. 2.1

    Trace every run

    Goal, each model call, each tool call + result, outcome.

  2. 2.2

    Capture cost and time

    Tokens, money and latency per step and per run.

  3. 2.3

    Replay failures

    Find the first wrong step.

Notes

  • Without step-level traces, agent failures are nearly impossible to debug.

Tips & tricks

  • Use a standard tracing format so traces work across tools.

Interview questions

How do you debug an agent that gives a wrong result?

Open the trace, walk the trajectory to the first wrong step (bad plan, wrong tool, bad arguments, misleading tool output), fix that cause, and add the case to the eval suite.

The quick way to study this

Add step-level tracing to one agent and replay a failed run.

3

AgentOps · Step 3 of 6 · 2 weeks

Evaluation on tasks

Measure whether agents finish the job.

Evaluate agents on realistic tasks with clear pass/fail criteria: did it complete the task, how many steps, how much did it cost, did it use tools correctly, did it do anything it shouldn't? Re-run the suite on every change to prompts, tools or models.

What you'll learn

  • Task suites with success criteria
  • Trajectory evaluation
  • Tool-use accuracy
  • Cost and step efficiency
  • Regression testing

Agent evaluation

  1. Task success
  2. Safety (no forbidden actions)
  3. Efficiency (steps, cost, time)
  4. Tool-call accuracy
  5. Trajectory quality

Key concepts

Task success rate
Share of tasks completed correctly.
Tool-call accuracy
Right tool with right arguments.

Step by step

  1. 3.1

    Write tasks

    15–50 realistic tasks with pass/fail criteria.

  2. 3.2

    Measure

    Success rate, steps, cost, tool accuracy, policy violations.

  3. 3.3

    Regress

    Re-run on every change; compare to baseline.

Notes

  • Success rate alone hides waste; track steps and cost per success too.

Tips & tricks

  • Include tasks that should be refused or escalated.

Interview questions

How do you evaluate an AI agent?

On a suite of realistic tasks with clear success criteria, measuring success rate, safety violations, steps, cost and time, reviewing failed trajectories, and re-running after every change.

The quick way to study this

Build a 15-task suite and track success rate over time.

4

AgentOps · Step 4 of 6 · 2 weeks

Guardrails, permissions and approvals

Control what agents can do.

Enforce safety outside the model: a policy layer checks every tool call against rules (who, what, how much), risky actions wait for human approval, code runs in sandboxes, and external content is treated as untrusted to resist prompt injection.

What you'll learn

  • Least-privilege tool access
  • Policy engines
  • Human-in-the-loop approvals
  • Sandboxed code execution
  • Prompt injection defences

Controlled action

  1. Agent proposes tool call
  2. Policy check
  3. Approval (if risky)
  4. Execute in sandbox/scoped API
  5. Log

Key concepts

Policy engine
Code that allows or blocks each action by rules.
Human-in-the-loop
A person approves before the action happens.

Step by step

  1. 4.1

    Least privilege

    Scoped credentials per agent and user.

  2. 4.2

    Policy checks

    Rules on who, what and how much for every tool call.

  3. 4.3

    Approvals and sandboxes

    Human yes for risky actions; isolated code execution.

Notes

  • Never rely on the prompt alone to stop dangerous actions.

Tips & tricks

  • Start agents read-only and add write permissions one at a time.

Interview questions

How do you stop an agent from taking a harmful action?

Don't rely on prompts: enforce least-privilege tools, a policy layer outside the model, human approval for risky actions, budgets, sandboxing and full logging.

The quick way to study this

Add a policy check and an approval step before one risky tool.

5

AgentOps · Step 5 of 6 · 1 week

Cost, reliability and scaling

Keep agents affordable and dependable.

Agents can loop and run up bills. Enforce budgets (tokens, money, steps, time) per task, retry tool failures carefully, cache repeated lookups, and run long tasks through queues with checkpoints so they can resume.

What you'll learn

  • Budgets per task and user
  • Step and time limits
  • Retries and fallbacks
  • Caching tool results
  • Queues and concurrency

Agent limits

  1. Money budget
  2. Token budget
  3. Step limit
  4. Time limit
  5. Concurrency limit

Key concepts

Runaway loop
An agent repeating steps endlessly and burning money.
Checkpoint
Saved state so long tasks can resume.

Step by step

  1. 5.1

    Budgets

    Max steps, tokens, money and time per task.

  2. 5.2

    Reliability

    Retries with backoff, fallbacks, checkpoints.

  3. 5.3

    Scale

    Queues, concurrency limits, cached tool results.

Notes

  • Budgets must be enforced by your code, not requested in the prompt.

Tips & tricks

  • Alert on unusual spend per task, not just total spend.

Interview questions

How do you control agent costs?

Hard budgets per task/user enforced in code, step and time limits, smaller models for simple steps, caching tool results and alerts on unusual spend.

The quick way to study this

Add step, time and cost limits with an alert.

6

AgentOps · Step 6 of 6 · 1 week

Incident response and governance

Be ready when an agent misbehaves.

Plan for failure: a kill switch to stop an agent instantly, a playbook for investigating and undoing its actions, complete audit trails and a review process for changes to prompts, tools and permissions.

What you'll learn

  • Kill switches
  • Incident playbooks for agents
  • Audit trails
  • Change management
  • Responsible AI policies

Agent incident response

  1. Detect
  2. Kill switch
  3. Review traces
  4. Undo / fix
  5. Notify
  6. Prevent recurrence

Key concepts

Kill switch
A way to halt an agent immediately.
Audit trail
A tamper-resistant record of everything the agent did.

Step by step

  1. 6.1

    Kill switch

    Stop one agent or all agents instantly.

  2. 6.2

    Playbook

    Contain, investigate traces, undo actions, communicate.

  3. 6.3

    Govern changes

    Review prompts, tools and permissions like code.

Notes

  • If an agent can act, someone must be able to stop it immediately.

Tips & tricks

  • Run a tabletop exercise: 'the agent emailed the wrong customers, what now?'

Interview questions

An agent sent wrong emails to customers. What do you do?

Hit the kill switch, scope the impact from traces and logs, notify affected customers, fix the cause (prompt, tool, permission), add tests and approvals, and document the incident.

The quick way to study this

Write a one-page agent incident playbook and test the kill switch.

分享此页