Add long-term (OCG-backed) agent memory compilation to agentspan-server - #1314
Draft
NicholasDCole wants to merge 31 commits into
Draft
Add long-term (OCG-backed) agent memory compilation to agentspan-server#1314NicholasDCole wants to merge 31 commits into
NicholasDCole wants to merge 31 commits into
Conversation
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
This reverts commit 610c001.
This reverts commit 3bf6f8d.
This reverts commit 26d271d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OCG-backed long-term memory to AgentSpan agents, with deterministic recall before execution, best-effort raw run capture after execution, and completed-run feedback plumbing. It also fixes MCP tool compilation/execution and improves agent execution observability in the OSS UI.
Ports and extends agentspan-ai/agentspan#298 for Conductor OSS.
What changed
Long-term memory and recall
longTermMemoryconfiguration with OCG URL, server-side credential name, agent identity, and optional user identity.cg_search_memoriescall before the first model or sub-agent task.MCP tool compilation and execution fixes
config.tool_namesbeing ignored, which previously caused a configured six-tool OCG allowlist to expose all 14 discovered tools.LIST_MCP_TOOLScalls while preserving generic discovery when no explicit list is configured.CALL_MCP_TOOLtask._agent_tool_nameonto dynamic MCP tasks and preserves it through JOIN compaction, including agent-as-tool sub-workflow inputs, so results are attributed and merged back into the next model turn correctly.Run capture and feedback
GET/POST /api/agent/executions/{executionId}/feedbackand completed-execution feedback controls in the UI.OCG_FEEDBACK_CONTRACT_UNAVAILABLEuntil OCG provides the required API-key-authenticated turn feedback contract; no guessed memory key or browser-side OCG credential is used.Agent execution UI
/fullrequest instead of recursively fetching children in the browser.MCP_TOOL_CG_QUERYwhile retainingCALL_MCP_TOOLas the underlying Conductor task type.Compatibility and robustness
Security and failure behavior
Verification
./gradlew :conductor-agentspan:test./gradlew spotlessApplypnpm test -- --runinui-next(719 passed, 1 skipped)pnpm typecheckinui-nextPull request type