AI Agent Architecture Design Philosophy: Kernel-First vs. Experience-First for Always-On Agents
This article breaks down the architecture design philosophy behind always-on AI agents, comparing two common approaches: kernel-first and experience-first. It explains how these designs differ across runtime lifecycle, reasoning loops and tool calling, layered memory, task scheduling, messaging channels, and security boundaries. You will also find practical selection guidance, common implementation pitfalls, and mitigation strategies for running AI agents reliably, securely, and at scale.
1. Background: From Conversational Q&A to Always-On Agents
Over the past two years, most AI applications have remained in a request-response pattern: the user asks a question, the model answers, the session ends, and the context is discarded. Real business scenarios, however, often involve long-running needs—daily data summaries, periodic inspections, automated remediation after anomalies, and information synchronization across systems. These needs cannot be fulfilled by a single Q&A exchange. They require software that stays online continuously, can be scheduled, retains memory, and can push updates proactively.
This has led to a software category commonly referred to as always-on AI agents. Such an agent can run for a long time on a single server or across a group of containers, use a large model as its reasoning core, call external tools and system commands, connect to instant messaging entry points or command-line interfaces, and persist its process and results as reusable memory. In engineering practice, two typical design orientations have emerged around this type of system. This article does not evaluate any specific product. Instead, it abstracts the commonalities and differences between the two orientations as a reference for architecture selection.
2. Two Typical Design Orientations
The first orientation can be called kernel-first. It treats the agent as an embeddable, operating-system-level service: the core retains only the minimum necessary scheduling and reasoning loop, while all capabilities are extended through plugins, a tool registry, and external processes. Its advantages are low coupling and low replacement cost, making it suitable for teams that already have a mature operations system.
The second orientation can be called experience-first. It treats the agent as an out-of-the-box, productized assistant: it comes with a large set of scenario templates, default channel integrations, and configuration wizards, and users configure it mainly through natural language with as little code as possible. Its advantages are a fast start and a short validation cycle, making it suitable for business-driven scenarios with rapid iteration.
The difference between the two lies not in a feature list but in the fundamental question of “what is the extension point”: the former hands the extension point to developers, while the latter confines the extension point to the configuration layer.
3. Dimension-by-Dimension Comparison
3.1 Runtime Form and Lifecycle
A kernel-first solution typically exists as a daemon or a container’s main process, with its lifecycle managed by an external orchestration system. Health checks, restart policies, and resource limits are all handled by a mature container platform. An experience-first solution often comes with its own process supervision and auto-start logic, reducing external dependencies, but it requires additional design for state isolation when scaling horizontally across multiple instances.
3.2 Reasoning Loop and Tool Calling
Both approaches follow the loop in which the model decides which tool to call, what arguments to pass, and how to interpret the return value. The difference lies in how tool descriptions are managed: a kernel-first solution tends to declare tool schemas as separate files or registration interfaces, which is convenient for version management and canary releases; an experience-first solution tends to maintain them in a configuration interface, which lowers the barrier to changes but lacks code-level review. In either case, it is recommended to apply a whitelist and parameter validation to tool calls, as illustrated below:
ALLOWED_TOOLS = {"read_metric", "query_log", "notify_user"}def dispatch(tool_name, arguments):if tool_name not in ALLOWED_TOOLS:raise PermissionError(f"tool not allowed: {tool_name}")schema = TOOL_SCHEMAS[tool_name]safe_args = schema.validate(arguments) # type/range/enum validationreturn TOOL_REGISTRY[tool_name](**safe_args)
3.3 Layered Memory Design
The memory of an always-on system cannot be a single large text blob. A more robust approach uses three layers: short-term session context, task-level intermediate state, and a long-term knowledge base. Short-term context is truncated by window or compressed through summarization; task-level state is written to external storage to ensure it is not lost when the process restarts; long-term knowledge is retrieved through a hybrid of vector search and structured fields. The main difference between the two orientations here is whether long-term knowledge is maintained manually by users or extracted automatically by the system. The latter is less labor-intensive but requires deduplication and conflict resolution strategies.
3.4 Task Scheduling and Long-Running Task Handling
Scheduled tasks and background long-running tasks are the core value of always-on agents. In engineering terms, “triggering” and “execution” should be decoupled: the scheduler is only responsible for delivering task identifiers by time or event, while the executor takes tasks from a queue and updates their state. Long-running tasks require idempotency keys and resumable checkpoints to avoid duplicate pushes and duplicate writes.
scheduler -> task_queue -> worker -> tool_calls -> state_store|-> notify(channel, result)
3.5 Integration Channels and Message Push
The command line is suitable for debugging and automation pipelines, while instant messaging entry points are suitable for business users. In design, a unified message adapter layer should be abstracted to converge channel differences into four actions—send, reply, authentication, and rate limiting—so that business logic is not bound to a specific channel.
3.6 Security Boundaries and Permission Model
Being always online means the attack surface is exposed over the long term. At a minimum, the following should be ensured: tool-level least privilege, a command execution whitelist, masking of sensitive parameters, and full-chain audit logs. When cloud resources are involved, object storage can be used to store state snapshots, a message queue can handle task distribution, and logging services with monitoring and alerting can provide observability—all implemented through general-purpose capability categories to avoid strong coupling to a single vendor’s interfaces.
4. Selection Guidance
If a team already has robust container orchestration, configuration management, and code review processes, and the agent needs to be deeply embedded into internal systems, kernel-first is more suitable. If the goal is to validate business value within two weeks and the users are mainly non-developers, experience-first is more efficient. Most mature implementations take a middle path: keep the kernel lean, deliver scenario capabilities as plugins, and provide a limited configuration interface to lower the barrier to use.
5. Common Implementation Pitfalls
The first is treating long-term memory as an infinitely growing log, which increases retrieval noise. The second is running scheduling and execution in the same process, so a restart loses tasks. The third is granting overly broad tool permissions, where a single model misjudgment can cause real side effects. The fourth is lacking cost observability, where long-running task loops repeatedly call the model and the bill spirals out of control. The corresponding measures are layered memory with periodic compression, decoupling tasks through a queue, least privilege with secondary confirmation, and instrumenting call volume and latency by task dimension.
6. Conclusion
The competitive focus of always-on AI agents has shifted from “whether they can call tools” to “whether they can run stably, securely, and maintainably over the long term.” Understanding where the extension point belongs behind the two design philosophies is more valuable than memorizing feature differences. Built on general cloud infrastructure such as Baidu AI Cloud, and using standard capabilities like container platforms, message queues, object storage, and monitoring and alerting, the design choices for an agent can return to the business itself.
