Memory-aware agent harness A reference agent harness merged with a memory-aware agent design: memory is read before the agent loop, managed and offloaded inside it, and written after it, through a memory manager over typed memory stores. Agent harness The memory-aware agent, end to end control flow memory read / write harness-run (deterministic) agent-triggered memory store (database table) Entry points start condition User query + thread id API and SDK calls Channels Slack, email, web Schedules, triggers Other agents Events, webhooks auth, identity user and thread ids rate limits Context assembly before the loop · a memory-aware context window System prompt ## Conversation ## Knowledge base ## Workflow ## Entity ## Summary Tool retrieval 80% check Agent loop · assemble → invoke → act, until a stop condition Modelreason · choose Loop controllermax iterations · stop Guardrailsinput · action · output Action layer Tools, MCPfunctions Code execsandbox Filesystemworkspace Sub-agentsdelegate Memory toolsagent calls Context managementoffload tool logs · summarize at 80% · trim Post-loop memory writesworkflow: steps and outcome · entities · final answer to conversation Outputsanswer · data · artifacts · actions Observe, evaluatetraces · cost · evals · feedback Memory manager read / write ops over stores database tables · embeddings semantic search · thread ids extract · consolidate · update Conversationalmessages per thread Knowledge basesemantic · documents Workflowprocedural · steps, outcomes Entitypeople, places, orgs Summarycompressed history, by id Toolboxsemantic tool memory Tool logsoffloaded tool outputs Checkpointsthread state, resume Runtimedurable execution · pause and resume · queues and concurrency · deployment and scaling · identity and secrets

How it works

    Design choices

      Risks → defenses