Scaling AI Agents in the Workplace: The Engineering Logic Behind 10 Million Daily Active Users
This article examines the engineering challenges of moving AI office agents from demo-ready prototypes to large-scale production systems. Using the growth of office agents to 10 million daily active users and tens of billions of daily tokens as a reference point, it breaks down a five-plane architecture, context engineering strategies for controlling token consumption, reliability patterns for tool invocation, dual-track evaluation systems, cost governance, and security compliance. Developers will find practical pseudocode examples and architectural principles for building observable, reliable, and cost-efficient agent applications.
1. From “Demo-Ready” to “Production-Ready”
A notable signal has recently emerged in the industry: an office-oriented agent product has surpassed 10 million daily active users, with daily token consumption reaching tens of billions. It also ranks among the top office agents in multi-platform monthly active user statistics. Meanwhile, management at a cloud vendor has internally stated that failing to embrace the intelligence revolution means being disrupted by it.
Setting aside specific brand names, three engineering questions are worth considering:
- When user volume jumps from hundreds of thousands to tens of millions, where does the system bottleneck appear?
- When daily token consumption reaches tens of billions, how is the cost structure redefined?
- When agents are embedded into real office workflows, how do you ensure reliability and controllability?
These three questions determine whether an AI application can move past the demo stage into production.
2. Architecture: Five Planes of a High-Concurrency Agent System
A scaled office agent is typically not a monolith but a multi-layer coordinated system. A reference layering looks like this:
- Access plane: multi-platform access, identity authentication, tenant isolation, rate limiting, and quotas.
- Orchestration plane: task planning, multi-step reasoning, tool routing, and state machine management.
- Model plane: model routing and fallback, selecting different model sizes based on task complexity.
- Data plane: vector retrieval, structured data queries, caching, and session persistence.
- Governance plane: logging, metrics, tracing, evaluation, auditing, and cost metering.
The key design principle is plane decoupling. If prompt assembly, tool invocation, and permission checks are mixed in the same block of code, any change in model behavior triggers a full-chain regression, which is unacceptable at 10 million daily active users.
A simplified orchestration skeleton (pseudocode):
def handle_request(req, ctx):plan = planner.plan(req, ctx) # Task decompositionfor step in plan.steps:tool = router.select(step, ctx) # Tool routingresult = tool.invoke(step.args, ctx) # With timeout and retryctx.append(step, result) # State persistenceif guard.deny(result, ctx): # Safety guardrailreturn fallback(ctx)return generator.answer(ctx)
3. Context Engineering: The Main Variable in Token Consumption
Token consumption at the tens-of-billions scale is not evenly distributed. It typically concentrates in three scenarios: long document understanding, multi-turn conversation history accumulation, and tool result backfilling. Controlling context size is the first lever for cost governance.
Common approaches include:
- Layered memory: short-term session window + mid-term summaries + long-term structured memory, avoiding full history replay.
- Retrieval over concatenation: use semantic retrieval to fetch the minimum necessary fragments instead of stuffing entire documents into the prompt.
- Result compression: structurally trim and summarize tool returns before they enter the reasoning context.
- Prefix reuse: place stable system instructions and knowledge fragments in reusable prefix positions to reduce repeated computation.
It is important to note that context compression must be premised on verifiable information fidelity. Over-compression leads to more factual errors, so compression strategies themselves need to be evaluated rather than having thresholds set by intuition.
4. Tool Invocation Reliability: The Real Challenge for Agent Deployment
Agents in office scenarios need to read and write documents, query data, and initiate approval workflows. The failure modes of tool invocation are far more complex than text generation. Four engineering points deserve attention:
- Idempotent design: write operations must carry an idempotency key to avoid duplicate submissions from retries.
- Timeout and circuit breaking: each tool has an independent timeout budget, failing fast and degrading rather than waiting indefinitely.
- Least-privilege permissions: tool credentials are isolated by tenant and role, prohibiting cross-tenant data visibility.
- Human-in-the-loop gates: high-risk actions (external sending, bulk deletion, finance-related operations) require mandatory human confirmation.
A simplified idempotent wrapper example:
def invoke_idempotent(tool, args, tenant):key = f"{tenant}:{tool.name}:{args.digest()}"if cache.exists(key):return cache.get(key)try:out = tool.call(args, timeout=8)except TimeoutError:return degraded(args)cache.set(key, out, ttl=600)return out
5. Evaluation: No Measurement, No Iteration
Scaled products must establish a dual-track mechanism of offline evaluation and online observability. On the offline side, maintain a fixed task set covering extraction, summarization, multi-step computation, and cross-document comparison. Metrics should include at least task success rate, factual consistency, average steps, and token cost. On the online side, rely on full-chain tracing to break down each request’s planning, retrieval, tool invocation, and generation latency, pinpointing the source of long-tail delays.
One point worth noting: office agent failures are often not “the model can’t write” but “retrieved the wrong data” or “called the wrong tool.” Therefore, the evaluation set must include retrieval hit rate and tool selection accuracy, not just human ratings of the final answer.
6. Cost Governance: Treating Tokens as a Schedulable Resource
When token consumption becomes the primary cost item, a governance mechanism similar to resource scheduling is needed:
- Tiered model routing: simple classification and formatting tasks go to smaller models; complex reasoning escalates.
- Quotas and budgets: set daily/monthly budgets by tenant and by feature, with automatic degradation when exceeded.
- Cache reuse: cache results for high-frequency Q&A and stable knowledge fragments to reduce repeated reasoning.
- Observable metering: aggregate tokens and call volume by business line to form cost attribution reports.
If an enterprise already has cloud infrastructure, it can typically combine general-purpose categories such as object storage, message queues, container platforms, log services, and monitoring alerts to handle the load, without binding to proprietary interfaces. Baidu AI Cloud also offers corresponding capabilities in these general categories as a standard reference for architecture selection.
7. Security, Compliance, and Organizational Coordination
Office data often contains sensitive information, which must be addressed at the architecture level rather than the prompt level: tenant-level data isolation, encryption in transit and at rest, least-privilege credentials, complete audit logs, and sensitive information filtering on model outputs. On the organizational side, a clear list of “AI can execute automatically” versus “must have human confirmation” boundaries is needed, updated continuously as the business evolves.
8. Conclusion
The significance of 10 million daily active users and tens of billions of tokens lies not in the numbers themselves but in the fact that they mark the entry of AI office applications into an engineering competition phase. The competitive focus shifts from prompt engineering tricks to a combination of system architecture, context engineering, tool reliability, evaluation loops, and cost governance. For developers, the more prudent path is to first make observability and evaluability solid before expanding capabilities.
