• Home
  • Technology
  • Gaming
  • Entertainment
  • World & Business
  • Science
  • Sports
  • AI
HomeTechnologyGamingEntertainmentWorld & BusinessScienceSportsAI
  • HomeTechnologyGamingEntertainmentWorld & BusinessScienceSportsAI
    • Home
    • Technology
    • Gaming
    • Entertainment
    • World & Business
    • Science
    • Sports
    • AI
    AI

    Santiago Valdarrama Lists Five Patterns for Long-Running Agents

    Post outlines prompt structure and background processing for AI agents.

    SA
    2 Sources, 26d ago, first seen 26d ago

    TLDR

    Computer scientist and ML educator Santiago Valdarrama posted five design patterns for long-running agents. He recommends placing system instructions and tool definitions at the top of prompts with dynamic memories at the end to support caching and lower latency. A second pattern calls for shifting harness learnings to the background while ensuring the agent always replies to the user. The post comes directly from his account on X.

    Combined views

    24.1K

    2 Sources, first seen 26d ago

    Combined views

    24.1K

    2 Sources, first seen 26d ago

    170 likes
    170 likes
    17 comments
    293 saves
    57 reposts

    Sentiment

    Positive——Negative

    Summary

    Not enough discussion yet.

    No sentiment analysis available yet.

    17 comments
    293 saves
    57 reposts

    Sentiment

    Positive——Negative

    Summary

    Not enough discussion yet.

    No sentiment analysis available yet.

    Today's Rank

    —

    Not ranked yet

    Today's Rank

    —

    Not ranked yet

    2 Sources

    @svpino5 design patterns for long-running agents: 1. Design your prompts carefully. Keep system instructions and tool definitions at the top and move dynamic memories and runtime data to the end. This enables prompt caching, cutting costs and latency. 2. Move any learnings on your harness to the background. Always reply to the user first, then process memories asynchronously. You never want the harness to slow user interactions. 3. Preserve files, installed tools, and unfinished work between sessions. Reattach agents to user-scoped environments instead of rebuilding them each turn. 4. Make any sub-agents return structured statuses such as completed, timed out, halted, or awaiting approval. Never return ambiguous prose that a parent agent might mistake for success. 5. Apply cheap, auditable security checks first, policy rules second, and human approval last. Normalize addresses and commands before checking them, and assume safeguards may eventually be bypassed; also isolate credentials and restrict network access. This article breaks down each of these patterns:

    2 Sources

    @svpino5 design patterns for long-running agents: 1. Design your prompts carefully. Keep system instructions and tool definitions at the top and move dynamic memories and runtime data to the end. This enables prompt caching, cutting costs and latency. 2. Move any learnings on your harness to the background. Always reply to the user first, then process memories asynchronously. You never want the harness to slow user interactions. 3. Preserve files, installed tools, and unfinished work between sessions. Reattach agents to user-scoped environments instead of rebuilding them each turn. 4. Make any sub-agents return structured statuses such as completed, timed out, halted, or awaiting approval. Never return ambiguous prose that a parent agent might mistake for success. 5. Apply cheap, auditable security checks first, policy rules second, and human approval last. Normalize addresses and commands before checking them, and assume safeguards may eventually be bypassed; also isolate credentials and restrict network access. This article breaks down each of these patterns: