How ai4s-research/open-science works
Open Science Desktop is a local-first, model-agnostic AI research workbench. A user starts a session, works with an agent through the UI or CLI, and produces inspectable artifacts and reproducible runs whose provenance links outputs to their inputs and conversation. The desktop and headless server share the Rust core and gateway; the TypeScript SDK connects clients to the agent runtime. The README also documents projects and memory, notebooks, browser control, remote compute, and ACP integrations. Wiring for unsampled subsystems is limited to documented capabilities.
Main entry points: runtime.rs Agent Runtime · router.tsx Workbench Routes · project.rs Workspace Files · main.tsx Desktop Web UI
Components 22
User Clients
- Desktop Web UI
apps/desktop/src/main.tsx - Workbench Routes
apps/desktop/src/app/router.tsx - osd CLI
crates/osd-cli/src/main.rs
Agent Runtime
- Client SDK
packages/sdk/src/index.ts - OpenCode Client
packages/sdk/src/OpenCodeClient.ts - Agent Runtime
crates/osd-core/src/runtime.rs - OpenCode Sidecar
Research Workflow
- Projects
crates/osd-core/src/project.rs - Sessions & History
crates/osd-core/src/runs.rs - Reproducible Runs
crates/osd-core/src/runs.rs - Artifact Provenance
crates/osd-core/src/provenance.rs - Notebook Runtime
apps/desktop/src-tauri/src/jupyter.rs - Artifact Inspector
apps/desktop/src/components/inspector/ArtifactInspector.tsx
Workspace Platform
- Headless Core
crates/osd-core/src/lib.rs - Authenticated Gateway
crates/osd-core/src/gateway.rs - Workspace Files
crates/osd-core/src/project.rs
Integrations
- Browser Control
apps/desktop/src-tauri/src/browser.rs - Remote Compute
apps/desktop/src-tauri/src/ssh_session.rs - ACP Bridge
packages/sdk/src/acp/server.ts
Other components
- Researcher
- External Editor
- Model Providers
Connections 23
- Researcher → Desktop Web UI: uses
- Desktop Web UI → Workbench Routes: routes to
- Researcher → osd CLI: commands
- Workbench Routes → Client SDK: client access
- osd CLI → Authenticated Gateway: API requests
- Client SDK → OpenCode Client: client requests
- OpenCode Client → OpenCode Sidecar: HTTP and events
- Headless Core → Agent Runtime: provides runtime
- Agent Runtime → OpenCode Sidecar: starts and manages
- Headless Core → Authenticated Gateway: serves
- Authenticated Gateway → Desktop Web UI: serves UI
- Agent Runtime → Model Providers: model requests
- Agent Runtime → Sessions & History: records conversations
- Agent Runtime → Workspace Files: works in
- Projects → Workspace Files: organize
- Reproducible Runs → Workspace Files: capture outputs
- Artifact Provenance → Workspace Files: links artifacts
- Workbench Routes → Notebook Runtime: notebook access
- Workbench Routes → Artifact Inspector: inspect artifacts
- Agent Runtime → Browser Control: browser tools
- Agent Runtime → Remote Compute: remote execution
- External Editor → ACP Bridge: ACP requests
- ACP Bridge → Agent Runtime: translates requests