Skip to content

Add long-term (OCG-backed) agent memory compilation to agentspan-server - #1314

Draft
NicholasDCole wants to merge 44 commits into
mainfrom
feature/add_memory
Draft

Add long-term (OCG-backed) agent memory compilation to agentspan-server#1314
NicholasDCole wants to merge 44 commits into
mainfrom
feature/add_memory

Conversation

@NicholasDCole

@NicholasDCole NicholasDCole commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Overview

Adds OCG-backed long-term memory for AgentSpan agents, plus the supporting MCP and execution UI work.

OCG memory

  • Configure an agent with an OCG URL, server-side credential name, agent identity, optional user, and visibility.
  • Recall relevant memory before model work begins. Recalled content is bounded and treated as supporting evidence, not instructions.
  • Capture completed or terminated root runs in an observable ocg_memory_capture workflow. OCG handles folding, summaries, ranking, and retention.
  • Show a completed run’s memory summary in the execution page and let users mark it helpful or not helpful with a reason.
  • Keep credentials on the server. Child runs do not create their own capture or feedback records.

MCP and execution UX

  • Honor configured MCP tool allowlists and compile known OCG graph tools without an unnecessary discovery call.
  • Preserve tool identity through dynamic execution so results return to the right model turn.
  • Show clearer MCP labels and aggregate token counts across agent sub-workflows.
  • Load nested execution details in one server request instead of recursively from the browser.

The screenshots below show the end-to-end experience.

NicholasDCole and others added 30 commits July 14, 2026 13:37
Ports the server side of agentspan-ai/agentspan#298: agents configured
with longTermMemory get compiler-inlined memory steps — pre-loop
retrieval (search HTTP -> format INLINE -> _ltm_context variable
injected as an LLM system message) and post-loop distill/save/
feedback-links tasks, plus an optional feedback_sink SIMPLE worker
task. All memory tasks are optional=true so a memory outage never
fails the agent.

Adaptations for this repo: credential headers resolve via
${workflow.secrets.NAME} (this host has no CredentialAwareHttpTask, so
the inert #{NAME} form would never resolve), no __agentspan_ctx__
forwarding, and the distill model falls back to the agent's own model
when summaryModel is unset (ModelParser.parse(null) throws).

Also ports the topLevelOnly executions-search filter and the media
input-template default that fixes the inbound-webhook NPE.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts:
#	agentspan/src/test/java/org/conductoross/conductor/ai/agentspan/runtime/compiler/LongTermMemoryCompilerTest.java
#	common/src/main/java/org/conductoross/conductor/common/metadata/agent/LongTermMemoryConfig.java
# Conflicts:
#	agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/controller/AgentController.java
#	agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/AgentService.java
#	agentspan/src/test/java/org/conductoross/conductor/ai/agentspan/runtime/service/AgentServiceTokenAggregationTest.java
#	ui-next/src/pages/execution/AgentExecution/AgentRunView.test.tsx
# Conflicts:
#	core/src/main/java/com/netflix/conductor/core/execution/tasks/Join.java
#	core/src/test/java/com/netflix/conductor/core/execution/tasks/JoinTest.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant