UOM Orchestrator: DeepAgent Architecture & ACP Integration
To expose translation capabilities to external IDE extensions and command-line interfaces, the orchestrator incorporates a DeepAgent reasoning wrapper and an Agent Communication Protocol (ACP) server. This architecture allows the translator to run as an autonomous programming agent that can inspect local workspace structures, manage file edits, and compile code.1. DeepAgent Workspace Composition (uom_deep_agent/uom_agent.py)
The DeepAgent wrapper, built using the LangChain DeepAgents SDK, integrates the primary LangGraph translation workflow as a specialized subagent. It wraps this graph with conversational reasoning, filesystem access, and environment backends.
1.1 The Composite Backend Router
The assistant interacts with multiple isolated execution environments. It utilizes aCompositeBackend to dynamically route filesystem and terminal execution requests based on URI prefixes:
- Default Route (
/): Directs toLocalShellBackend. This gives the agent direct read/write access to the user’s active monorepo workspace on the host machine. - Dotnet Sandbox Route (
/dotnet_sandbox/): Directs toDaytonaSandbox(ValidationSandbox.SANDBOXES[SandboxType.DOTNET_10_SANDBOX]). - Java Sandbox Route (
/java_sandbox/): Directs toDaytonaSandbox(ValidationSandbox.SANDBOXES[SandboxType.JAVA_25_SANDBOX]). - State Storage (
/memories/&/conversation_history/): Directs to an ephemeralStateBackendfor tracking runtime variables across sessions.
1.2 verbatims Subagent Prompts
To prevent the agent from truncating or altering source code blocks before passing them to the compilation validators, the DeepAgent system prompt enforces strict verbatim reproduction rules:[!IMPORTANT] The system prompt mandates: “Always call ‘universal-object-mapping-translator’ sub-agent to perform the translation with the FULL user input message and code. Do NOT truncate or modify it. Do NOT include any additional text apart from the initial ‘user input’.”This guarantees that raw code inputs are passed exactly as provided by the user into the validation sandboxes, avoiding syntax errors caused by LLM summarization.
2. Parallel Local Context Middleware (uom_deep_agent/local_context.py)
When the assistant starts, it needs to analyze the user’s project structure (such as language, virtual environments, uncommitted git files, and directory layout) to gather context.
To perform this check without slowing down the agent startup, the LocalContextMiddleware runs a highly optimized context detection script.
2.1 Parallel Background Subshells
Instead of executing detection commands sequentially (which would block execution for several seconds), the bash script executes sections in parallel as background subshells, writing output to temporary files:2.2 Defensive Tool Probing
The script usescommand -v to check for the existence of external tools (like git, tree, python3, or node) before attempting to use them, preventing shell errors in empty or minimal container environments.
2.3 Caching Refreshes via Summarization Cutoffs
Rerunning this detection script on every single user turn is redundant. However, if the environment changes (e.g. the agent runs a test command or edits a file), the context must be refreshed. To optimize this, the middleware tracks the private state attribute_local_context_refreshed_at_cutoff:
- When a Summarization Event occurs (indicating a chunk of messages has been processed and saved), the middleware detects the new
cutoff_index. - It refreshes the context only if the current
cutoff_indexdoes not match_local_context_refreshed_at_cutoff. - This ensures the local context is refreshed only when meaningful environment modifications have occurred.
3. Agent Communication Protocol (ACP) Server (uom_acp/main.py)
The ACP server wraps the compiled DeepAgent, exposing it as a standard service that external developer environments can connect to.
3.1 Session Authorization Modes
The server configures three distinct operational security profiles that dictate how the agent handles writes, edits, and terminal executions:
These modes are configured in
uom_acp/main.py using SessionModeState and mapped to LangGraph interrupts:
3.2 The ACP Lifecycle Main Loop
The server entry point handles sandbox allocation and runs the ACP session:- The required Daytona validation sandboxes are already warmed up and cached.
- The session is bound to the user’s selected authorization mode (
ask_before_editsoraccept_edits). - Dynamic LLM provider switching is supported on the fly without restarting the service.