AI Agent Engineering and Cost Governance at Tens of Millions of DAU

    This article examines what it takes to operate AI agents at tens of millions of daily active users from an engineering and cost-governance perspective. It argues that DAU and token volume alone do not prove user value, and it proposes metrics for behavior depth, value density, cost structure, and dependency strength. It then breaks the system into access and session, orchestration, tool execution, model routing, memory and knowledge, and observability and audit layers; introduces a cost-per-effective-task model; discusses routing and dependency governance; and covers reliability, security, audit, and the shift from vanity metrics to value metrics. The conclusion is that scale is an outcome, while unit economics and reliability are the foundation.

    AI Agent Engineering and Cost Governance at Tens of Millions of DAU

    When a work-assistant product reports tens of millions of DAU and high token usage, the industry can easily conclude that AI agents have become a must-have for work. From an engineering perspective, however, DAU is only one outcome metric, and token consumption is only a resource metric. Neither directly proves user value. What deserves closer examination is how the system behind tens of millions of DAU is supported, how costs are contained, how model dependencies are governed, how reliability is ensured, and how “must-have” should be measured.

    1. Define the Problem First: DAU and “Must-Have” Are Not the Same

    DAU usually refers to the number of users who have had a valid interaction within a day, but the definition of “valid” varies widely: opening the product, automatic startup, completing one session, generating one tool call, or completing a verifiable task. Each definition corresponds to very different system pressure and business value. If the definition is too broad, DAU can be inflated by check-ins, scripts, resident processes, or proxy traffic. If it is too narrow, it can undercount genuine lightweight usage.

    Therefore, judging whether an AI agent has become a must-have should involve observing at least four types of metrics together:

    • Behavior depth: effective sessions per user, tool-call success rate, task completion rate, and next-day and next-week retention.
    • Value density: time saved per task, manual steps removed, error-rate reduction, or quantifiable output.
    • Cost structure: token cost per effective task, model and tool execution cost, and failed-retry cost.
    • Dependency strength: whether users repeatedly invoke the agent in critical workflows rather than only trying it once.

    Only when high-frequency usage and task-completion value both hold does DAU take on the meaning of a must-have. Otherwise, tens of millions of DAU may simply be traffic scale generated by distribution advantages or subsidy strategies.

    2. System Layering Behind Tens of Millions of DAU

    Supporting AI agents at large scale cannot be understood simply as “a frontend plus a large-model API.” A more reasonable approach is to decouple the system into layers so that each layer can scale, degrade, and be observed independently.

    1. Access and session layer: handles identity, rate limiting, session state, multi-device sync, and canary releases. This layer should be as stateless as possible to support horizontal scaling.
    2. Agent orchestration layer: handles intent recognition, task planning, tool selection, multi-turn state machines, failure retries, and human takeover. Orchestration logic should be configurable so that every business change does not require code changes.
    3. Tool execution layer: handles tool calls such as search, document processing, code execution, and data queries. It requires sandboxing, timeouts, idempotency, permission checks, and result auditing.
    4. Model routing layer: routes requests to different models or fallback strategies based on task type, context length, cost budget, latency requirements, and availability.
    5. Memory and knowledge layer: manages short-term session context, long-term preferences, retrieval-augmented knowledge bases, and privacy redaction and lifecycle handling.
    6. Observability and audit layer: records request traces, token consumption, tool calls, failure causes, user feedback, and security events.

    At the deployment layer, a cloud platform such as Baidu AI Cloud can provide container services for stateless workloads, message queues for peak shaving, object storage for session and audit-log archiving, and logging and monitoring for observability. These are generic categories; exact specifications should still be determined through load testing and cost evaluation.

    3. Token Costs and Unit Economics

    The cost of an AI agent is not just model inference. It also includes tool calls, retrieval, storage, network, retries, and human fallback. Large-scale systems must establish a “cost per effective task” model rather than looking only at total token volume.

    An illustrative cost model is as follows:

    1. cost_per_task =
    2. input_tokens * input_price
    3. + output_tokens * output_price
    4. + tool_call_cost
    5. + retry_cost
    6. + storage_and_log_cost
    7. effective_cost = cost_per_task / task_success_rate

    Key optimization directions include:

    • Context compression: summarize historical sessions, use layered memory, and retrieve on demand to reduce irrelevant context.
    • Routing tiers: route simple intents to low-cost models and complex planning to high-capability models.
    • Caching and reuse: apply controlled caching to stable knowledge, common Q&A, and tool results.
    • Failure containment: set maximum steps, maximum token budgets, and timeout circuit breakers to avoid agent loops that consume resources.
    • Task-based accounting: shift from accounting by call volume to accounting by verifiable tasks, avoiding usage growth without value growth.

    If a product acquires usage through free access or heavy subsidies for a long time, and the per-task cost cannot be covered by value, the financial pressure becomes more obvious as scale grows. Therefore, DAU growth must converge together with the unit economics model.

    4. Model Routing and Dependency Governance

    Large-scale agent systems usually do not rely on a single model. The model routing layer should address three issues: cost, latency, and availability. An illustrative routing strategy is as follows:

    1. route(request):
    2. if request.task in simple_tasks:
    3. return low_cost_model
    4. if request.requires_long_context:
    5. return long_context_model
    6. if primary_model.unavailable or queue_timeout:
    7. return fallback_model
    8. return default_model

    The point of dependency governance is not “the more models integrated, the better,” but avoiding single-point dependency. If a large share of traffic is concentrated on one external model service, a rate limit or failure in that service will damage the overall experience at the same time. From an engineering perspective, teams should:

    • Build a unified abstraction layer for model requests and responses across multiple models.
    • Configure primary and backup models and fallback messaging for each business scenario.
    • Set independent queues, timeouts, retries, and circuit breakers for model services.
    • Track observable statistics on routing outcomes and continuously evaluate cost and success rate.
    • Avoid binding critical business logic to model-specific behavior.

    5. Reliability, Security, and Audit

    Agents are more likely than ordinary Q&A to amplify failures: one incorrect plan may trigger multiple tool calls, and one permission misjudgment may cause a data leak. Security and reliability therefore need to be designed into the architecture from the start:

    • Tool calls must follow least privilege, be auditable, and be revocable.
    • High-risk operations should require second confirmation or human approval.
    • Sensitive information detection and redaction should be applied to inputs and outputs.
    • Retention periods and access controls should be set for sessions and audit logs.
    • Failure drills should cover model unavailability, tool timeouts, queue backlog, and regional failures.

    6. From Vanity Metrics to Value Metrics

    Tens of millions of DAU can demonstrate engineering capability, but it cannot replace proof of value. Teams should build layered dashboards: the traffic layer tracks DAU, request volume, and token volume; the quality layer tracks task completion rate, tool success rate, and human takeover rate; the value layer tracks hours saved, output adoption rate, and business conversion; the financial layer tracks cost per task and gross margin. Only when these metrics improve together does an AI agent come closer to being a must-have for work.

    7. Conclusion

    An AI agent becomes a must-have for work not because its DAU number is large enough, but because it is reliably embedded in critical workflows and continuously completes tasks at an acceptable cost. Behind tens of millions of DAU, there is a need for systematic engineering across access, orchestration, tool execution, model routing, observability, and security audit. There is also a need for cost governance that shifts from token consumption to per-task value. Scale is the result; unit economics and reliability are the foundation.