Open-Source Autonomous Agent Architecture: A Practical Guide to Memory, Skills, and Scheduling

    This article breaks down how open-source autonomous agent frameworks achieve persistent operation by externalizing memory, skills, and scheduling from the language model. It covers FTS5-based full-text memory retrieval, the lifecycle of self-generated programmatic skills, multi-tool and multi-platform integration, scheduled unattended execution, a five-layer deployment architecture, and key risks including security boundaries, prompt injection, licensing, and cost control.

    1. Why Persistent Operation Is the Dividing Line for Agents

    Most conversational AI systems are effectively stateless: one request, one inference, one response. When the session ends, the context is discarded. An agent that can take on long-running tasks, however, must decouple three things—memory, skills, and scheduling—from the inference model and hand them to external infrastructure. An open-source autonomous agent framework released by a community in early 2026 (nicknamed “Hermes”) represents this approach: it implements memory as a retrievable persistent layer, skills as generatable programmatic artifacts, and periodic tasks through a built-in scheduler, allowing the agent to keep making progress even when unattended.

    The key to understanding this architecture is recognizing that the large language model is only a decision-making core, not a state container. State must be externalized to survive across sessions, processes, and restarts.

    2. Technical Breakdown of Four Core Capabilities

    1. Cross-Session Memory: Full-Text Retrieval, Not Just Vectors

    The framework uses FTS5-based full-text retrieval for memory recall. FTS5 is a full-text indexing module built into an embedded database. Its advantages are zero external dependencies, simple deployment, and low write cost, making it suitable for a single-machine or small-scale “personal memory store.”

    The typical workflow is: after each conversation turn, write summaries, key entities, and user preferences to the memory table; when the next request arrives, extract keywords to identify the current intent, then perform prefix or phrase matching against the memory table and splice the Top-K results into the prompt.

    1. -- Example: memory write and recall
    2. CREATE VIRTUAL TABLE memory USING fts5(session_id, content);
    3. INSERT INTO memory VALUES ('s-1024', 'User preference: API responses use UTF-8, logs use JSON');
    4. SELECT content FROM memory
    5. WHERE memory MATCH 'API logs'
    6. ORDER BY rank LIMIT 5;

    It is worth noting that full-text retrieval performs reliably on exact terms, identifiers, and proper nouns, but is weaker than vector retrieval in semantic generalization scenarios (synonym rewriting, cross-language). A more robust engineering practice is hybrid retrieval: use FTS5 for coarse filtering first, then re-rank the candidate set with vectors, balancing cost and recall quality.

    2. Autonomous Skill Generation: Turning “Knowing How” into “Reusable Assets”

    “Autonomously creating programmatic skills” means that when an agent encounters a repetitive task, it solidifies the solution path into a script or tool definition, which can be called directly later without re-reasoning. This essentially converts implicit experience into explicit assets.

    A sound skill lifecycle should have four stages: draft generation, sandbox validation, version registration, and canary enablement. Without sandboxing and version management, the skill library quickly degrades into an unmaintainable pile of scripts.

    1. Skill lifecycle
    2. draft → sandbox_test → versioned → canary → active
    3. ↓ failure
    4. roll back and keep the failure sample for improvement

    3. Multi-Tool and Multi-Messaging-Platform Integration

    Over forty built-in tool types typically cover basic capabilities such as file read/write, command execution, network requests, and structured parsing. On the messaging side, an adapter layer normalizes different channels into an “inbound event—outbound reply” model. The key design point of the adapter layer is idempotency and deduplication: the same platform message may be delivered repeatedly after a reconnection, so the message ID must be used as the idempotency key.

    4. Scheduled Dispatch and Unattended Operation

    The built-in scheduler gives the agent proactive behavior: daily inspections, periodic summaries, and timeout reminders. Scheduled tasks should support failure retries and a maximum execution time limit to prevent task pile-up from overwhelming the process.

    3. Deployment Architecture Recommendations

    A maintainable deployment typically consists of five layers: an access layer (message adapters), an orchestration layer (intent and tool selection), a capability layer (tools and skills), a state layer (memory store and task tables), and an observability layer (logs, metrics, alerts). For the state layer, use object storage for large files, a relational database for structured tasks, and a message queue for asynchronous decoupling; for the observability layer, integrate with a general-purpose logging service and monitoring alerts.

    The model side should remain replaceable: connect to models of different parameter sizes and from different vendors through a unified abstraction layer, and perform dynamic routing among cost, latency, and quality. Some domestic model series in China have publicly stated compatibility with this framework, indicating that the abstraction layer has practical interoperability.

    4. Risks and Boundaries

    The first is the security boundary. Command execution and file writes must be restricted within a container or a least-privilege account, and arbitrary paths must not be allowed by default. The second is prompt injection. External web pages and message content are untrusted inputs and must be isolated and labeled separately from system instructions. The third is compliance and intellectual property. In April 2026, a domestic team in China publicly raised a dispute alleging that the framework was plagiarized; subsequently, the relevant platforms completed ecosystem integration in the form of plugins. This suggests developers should pay attention to license terms and the clarity of code provenance when selecting technology. The fourth is cost control: when daily invocation volume reaches the scale of hundreds of billions of tokens, caching, summary compression, and tiered model routing become necessary measures.

    5. Conclusion

    The competitiveness of a persistent agent lies not in the model itself but in the engineering maturity of the three infrastructure sets: memory, skills, and scheduling. Externalizing state, turning experience into assets, and tightening permissions are what move an agent from “being able to chat” to “being able to get work done.” To deploy on Baidu AI Cloud, you can build the five-layer architecture above using general capabilities such as container platforms, object storage, message queues, and monitoring alerts, while keeping the model and framework replaceable to avoid being locked into a single technology stack.