You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Epic: Assimilate OpenHands as an Ouroboros-native AgentOS capability while preserving the OpenHands user experience
Scope decision
Confirmed target: Full surface.
This epic should treat OpenHands CLI, headless mode, SDK, Local GUI, MCP integration, sandboxing, skills/microagents, event streams, and resume/conversation identity as one end-to-end AgentOS experience. Implementation may still be phased, but the architecture must not optimize only for a CLI wrapper or SDK-only embedding path.
Goal
Make OpenHands run smoothly from Ouroboros as a first-class external agent harness, without reducing OpenHands to a thin command wrapper and without violating the UserLevel plugin boundary defined in #27.
The target outcome is an AgentOS-grade bridge:
Users who already know OpenHands should feel that the OpenHands CLI/headless workflow still behaves like OpenHands.
Ouroboros should gain a safe, auditable, resumable way to invoke OpenHands and consume its outputs.
ooo auto should remain coherent and should not grow OpenHands-specific branching logic.
The plugin layer should translate OpenHands runs into Ouroboros-native artifacts: Seeds, handoffs, provenance, audit events, and future Run/Step/Artifact projections.
This epic is intentionally about capability assimilation, not marketplace listing and not vendoring the whole OpenHands platform into this repository.
Background
OpenHands provides a mature AI software-engineering agent stack:
OpenHands SDK: composable Python/REST APIs for code-focused agents.
OpenHands CLI: terminal experience similar to Codex / Claude Code.
Headless mode: scriptable automation with JSONL event output.
Issue #27 defines the Ouroboros plugin layer as a contract/reference layer, not a marketplace. It also draws a hard line between:
trivial wrapper: run this external command
and:
Ouroboros-native plugin: translate an external capability into an explicit,
permissioned, auditable, resumable, handoff-capable workflow
OpenHands is a strong candidate for this model because it is not merely a CLI; it is an external autonomous agent harness with its own event stream, execution semantics, sandbox choices, and UX expectations.
Recommended first reference slice: openhands-agentos with an initial run + handoff + inspect surface.
Proposed command surface
# Inspect local OpenHands availability and effective config without running an agent.
ooo openhands inspect
# Run OpenHands in a bounded workspace while preserving headless/JSONL semantics.
ooo openhands run \
--task <task-file-or-inline-task> \
--workspace <repo-path> \
--out .omx/artifacts/openhands/<run-id>/events.jsonl
# Convert a captured OpenHands event stream into an Ouroboros handoff.
ooo openhands handoff \
--run .omx/artifacts/openhands/<run-id>/events.jsonl \
--out .omx/handoffs/openhands/<run-id>.md
# Summarize an OpenHands run for humans and downstream automation.
ooo openhands summarize --run <events.jsonl># Optional later: resume a known OpenHands conversation/run.
ooo openhands resume --run-id <run-id>
The important contract point: ooo openhands run invokes OpenHands only after manifest validation, registry resolution, trust checks, permission checks, risk handling, and audit emission. It is not considered “run by Ouroboros” merely because a subprocess started.
UX preservation requirements
CLI/headless parity
The plugin should pass through the user’s task in a way that maps cleanly to OpenHands native usage:
openhands --headless --json -t "..."
The plugin may wrap this, but it should preserve:
task text/file input,
JSONL event stream capture,
exit status semantics where possible,
streaming logs/progress,
OpenHands-native error messages when safe,
conversation/run identifiers where available.
Interactive experience
If Ouroboros later supports an interactive OpenHands bridge, it should feel like OpenHands inside an Ouroboros session, not like a static batch job. This can be deferred, but the architecture should not block it.
Configuration
The plugin should support two modes:
Isolated mode (default): use plugin-owned config/cache paths to avoid contaminating ~/.openhands and to keep provenance reproducible.
Native mode (explicit opt-in): use the user’s existing OpenHands configuration for maximum fidelity.
The issue should decide whether native mode requires a separate trust scope because it may read existing credentials, MCP configuration, conversation history, or agent settings.
Contract translation
The plugin should translate OpenHands concepts into Ouroboros concepts:
handoff artifact for ooo auto, human review, or harness continuation
Safety and firewall requirements
OpenHands headless mode is powerful. It can execute actions without per-action human confirmation, depending on the mode. Therefore the Ouroboros plugin must provide safety at the outer boundary.
Required safeguards:
No default host/process execution if safer sandboxing is available.
Workspace must be explicitly bounded.
Plugin must refuse ambiguous workspace paths.
Plugin must record the exact OpenHands command line and environment-shaping settings, redacting secrets.
Plugin must separate OpenHands configuration access from workspace access.
Plugin must fail closed if required permissions are not trusted.
Plugin must classify OpenHands run as destructive unless the implementation can prove a safer bounded mode.
Plugin must not silently pass through arbitrary environment variables.
Plugin must not mutate Ouroboros core state except through declared capabilities.
Plugin must emit blocked/failure semantics without pretending the external agent ran.
This manifest is only a sketch. The implementation must still satisfy the broader #27 contract: safety, auditability, provenance, bounded side effects, and handoff.
Implementation phases
Phase 0 — design spike / feasibility proof
Verify the current OpenHands CLI/headless invocation contract.
Identify stable JSONL event fields needed for provenance.
Identify how OpenHands config paths can be isolated.
Identify which sandbox modes are safe enough for a default.
Decide whether this plugin should depend on openhands CLI being preinstalled or install its own optional dependency.
Deliverable: short design note under docs/ or plugin README.
Phase 1 — read-only inspection
Implement:
ooo openhands inspect
It should report:
OpenHands installed/not installed,
version,
detected CLI path,
detected config mode,
available sandbox mode hints,
whether JSON headless output appears supported,
warnings about unsafe process/host execution.
Risk: read_only.
Phase 2 — JSONL capture without handoff mutation
Implement bounded OpenHands headless execution:
ooo openhands run --task ... --workspace ... --out ...
Required behavior:
require explicit trusted shell:execute,
require explicit bounded workspace,
capture stdout/stderr and JSONL separately where possible,
emit audit/provenance metadata,
preserve OpenHands exit code semantics,
record command line with secret redaction,
write run metadata under plugin-owned state.
Risk: likely destructive.
Phase 3 — handoff conversion
Implement:
ooo openhands handoff --run ... --out ...
The handoff should include:
task input,
OpenHands version and command,
workspace path,
event summary,
file changes inferred from events or git diff,
commands executed,
errors/failures/blocked actions,
final answer,
recommended next action for human / ooo auto / test harness,
provenance links to raw JSONL and metadata.
Risk: write.
Phase 4 — AgentOS smooth-run loop
Add a higher-level flow that makes OpenHands feel native inside Ouroboros:
Epic: Assimilate OpenHands as an Ouroboros-native AgentOS capability while preserving the OpenHands user experience
Scope decision
Confirmed target: Full surface.
This epic should treat OpenHands CLI, headless mode, SDK, Local GUI, MCP integration, sandboxing, skills/microagents, event streams, and resume/conversation identity as one end-to-end AgentOS experience. Implementation may still be phased, but the architecture must not optimize only for a CLI wrapper or SDK-only embedding path.
Goal
Make OpenHands run smoothly from Ouroboros as a first-class external agent harness, without reducing OpenHands to a thin command wrapper and without violating the UserLevel plugin boundary defined in #27.
The target outcome is an AgentOS-grade bridge:
ooo autoshould remain coherent and should not grow OpenHands-specific branching logic.This epic is intentionally about capability assimilation, not marketplace listing and not vendoring the whole OpenHands platform into this repository.
Background
OpenHands provides a mature AI software-engineering agent stack:
Issue #27 defines the Ouroboros plugin layer as a contract/reference layer, not a marketplace. It also draws a hard line between:
and:
OpenHands is a strong candidate for this model because it is not merely a CLI; it is an external autonomous agent harness with its own event stream, execution semantics, sandbox choices, and UX expectations.
Non-negotiable product constraint: preserve OpenHands UX
The integration should not make OpenHands feel like a generic subcommand hidden behind Ouroboros.
Preserve, as much as the plugin boundary allows:
openhands -t ...,openhands -f ...).--headless,--json).Ouroboros should add contract semantics around OpenHands, not flatten the experience into
python -m something.Proposed reference plugin
Initial plugin name:
Alternative narrower names if scope is split:
Recommended first reference slice:
openhands-agentoswith an initialrun+handoff+inspectsurface.Proposed command surface
The important contract point:
ooo openhands runinvokes OpenHands only after manifest validation, registry resolution, trust checks, permission checks, risk handling, and audit emission. It is not considered “run by Ouroboros” merely because a subprocess started.UX preservation requirements
CLI/headless parity
The plugin should pass through the user’s task in a way that maps cleanly to OpenHands native usage:
openhands --headless --json -t "..."The plugin may wrap this, but it should preserve:
Interactive experience
If Ouroboros later supports an interactive OpenHands bridge, it should feel like OpenHands inside an Ouroboros session, not like a static batch job. This can be deferred, but the architecture should not block it.
Configuration
The plugin should support two modes:
~/.openhandsand to keep provenance reproducible.The issue should decide whether native mode requires a separate trust scope because it may read existing credentials, MCP configuration, conversation history, or agent settings.
Contract translation
The plugin should translate OpenHands concepts into Ouroboros concepts:
shell:executepermission usagefilesystem:writepermission usagemcp:callcapability / external permission evidenceooo auto, human review, or harness continuationSafety and firewall requirements
OpenHands headless mode is powerful. It can execute actions without per-action human confirmation, depending on the mode. Therefore the Ouroboros plugin must provide safety at the outer boundary.
Required safeguards:
runas destructive unless the implementation can prove a safer bounded mode.Proposed manifest sketch
{ "schema_version": "0.1", "name": "openhands-agentos", "version": "0.1.0", "description": "Run OpenHands as an audited external agent harness and convert OpenHands outputs into Ouroboros-native handoff artifacts.", "source": { "type": "local_path", "path": "plugins/openhands-agentos" }, "commands": [ { "namespace": "openhands", "name": "inspect", "summary": "Inspect local OpenHands availability and effective integration settings.", "usage": "ooo openhands inspect", "risk": "read_only", "requires_confirmation": false }, { "namespace": "openhands", "name": "run", "summary": "Run OpenHands against a bounded workspace and capture JSONL evidence.", "usage": "ooo openhands run --task <task> --workspace <path> --out <jsonl-path>", "risk": "destructive", "requires_confirmation": true }, { "namespace": "openhands", "name": "handoff", "summary": "Convert an OpenHands JSONL run into an Ouroboros handoff artifact.", "usage": "ooo openhands handoff --run <jsonl-path> --out <handoff-path>", "risk": "write", "requires_confirmation": false } ], "capabilities": [ { "name": "ledger", "access": "write", "reason": "Record invocation, result, and evidence references." }, { "name": "provenance", "access": "write", "reason": "Attach OpenHands event stream and source metadata." }, { "name": "handoff", "access": "attach", "reason": "Attach converted results for downstream Ouroboros execution." }, { "name": "state", "access": "write", "reason": "Persist run IDs and resumable execution metadata." } ], "permissions": [ { "scope": "filesystem:read", "risk": "read_only", "required": true, "reason": "Read task inputs, workspace metadata, and captured OpenHands events." }, { "scope": "filesystem:write", "risk": "write", "required": true, "reason": "Write JSONL captures, summaries, state, and handoff artifacts." }, { "scope": "shell:execute", "risk": "destructive", "required": true, "reason": "OpenHands may execute commands through its agent runtime." }, { "scope": "network:write", "risk": "write", "required": false, "reason": "Optional LLM, MCP, model-provider, or remote sandbox access." } ], "entrypoint": { "type": "command", "command": "python -m openhands_agentos" } }This manifest is only a sketch. The implementation must still satisfy the broader #27 contract: safety, auditability, provenance, bounded side effects, and handoff.
Implementation phases
Phase 0 — design spike / feasibility proof
openhandsCLI being preinstalled or install its own optional dependency.Deliverable: short design note under
docs/or plugin README.Phase 1 — read-only inspection
Implement:
It should report:
Risk:
read_only.Phase 2 — JSONL capture without handoff mutation
Implement bounded OpenHands headless execution:
Required behavior:
shell:execute,Risk: likely
destructive.Phase 3 — handoff conversion
Implement:
The handoff should include:
ooo auto/ test harness,Risk:
write.Phase 4 — AgentOS smooth-run loop
Add a higher-level flow that makes OpenHands feel native inside Ouroboros:
This should coordinate:
ooo autohandoff.It must not turn
ooo autointo an OpenHands-specific router. The plugin owns OpenHands-specific logic.Phase 5 — optional SDK / GUI / MCP expansion
Only after the CLI/headless bridge is stable:
Any manifest/schema expansion must be justified by the reference implementation and should follow #27’s contribution policy.
Acceptance criteria
This epic is complete when:
plugins/openhands-agentos/or a scoped external reference repo is documented.ouroboros.plugin.jsonunder schema0.1.ooo openhands inspectworks without mutating external systems.ooo openhands runpreserves OpenHands headless/JSONL usage semantics as much as possible.ooo openhands runrequires explicit trust for dangerous permissions.ooo openhands handoffconverts captured OpenHands output into a human-readable and harness-readable Ouroboros handoff.ooo autoboundary: OpenHands-specific behavior remains in the plugin.Q00/ouroboros-pluginsas a reference plugin versus a third-party plugin repository.Open questions
~/.openhandsconfiguration?network:writebe required or optional for the first version?openhands runbe split intorun-readonly,run-write, andrun-destructivemodes, or is command-levelrequires_confirmationsufficient?References