How openharness-research/openharness works
OpenHarness is a self-hosted studio for building and running agent harnesses. Users configure agents and visual harnesses in Studio, submit conversations or API requests, and follow live execution traces; runs are queued, checkpointed, and resumable. The graph retains documented capabilities for knowledge, skills, human review, guardrails, and integrations. Some subsystem paths are present in the tree but their implementations were not sampled, so links to them are limited to README-supported relationships; edges describe only supported calls or documented flows.
Main entry points: experience.ts Learning and reflection · app.ts HTTP API · runtime.ts Agent runtime · runs.ts Run admission
Components 25
Studio
- Studio UI
apps/studio/src/main.tsx - Studio API client
apps/studio/src/api.ts - Webhook settings
apps/studio/src/components/WebhooksPanel.tsx
API surface
- HTTP API
apps/api/src/app.ts - Authentication
apps/api/src/auth.ts - Harness API sessions
apps/api/src/openharness/sessions.ts
Run execution
- Run admission
packages/core/src/runs.ts - Durable job queue
packages/core/src/queue.ts - Runner worker
apps/runner/src/worker.ts - Agent runtime
packages/core/src/runtime.ts - Harness workflow
packages/core/src/workflow.ts
Agent capabilities
- Model provider calls
packages/core/src/llm.ts - Guardrail policies
packages/core/src/guardrails.ts - Knowledge bases
packages/core/src/knowledge.ts - Knowledge notebooks
packages/core/src/notebooks.ts - Learning and reflection
packages/core/src/experience.ts - Human review
packages/core/src/human.ts - MCP tools
packages/core/src/mcp.ts - Reusable skills
packages/core/src/skillContext.ts - Conversations
packages/core/src/conversations.ts - Domain validation
packages/core/src/schema.ts
State and services
- MongoDB state
packages/core/src/db.ts - Security controls
packages/core/src/security.ts - Connector gateway
gateway/src/server.ts
Other components
- Studio user
Connections 28
- Studio user → Studio UI: configures and runs
README.md - Studio UI → Studio API client: sends requests
apps/studio/src/main.tsx - Studio API client → HTTP API: calls API
README.md - HTTP API → Authentication: checks token scope
apps/api/src/app.ts - HTTP API → Run admission: submits runs
apps/api/src/app.ts - Harness API sessions → Run admission: manages sessions
apps/api/src/openharness/sessions.ts - Run admission → Durable job queue: publishes jobs
README.md - Durable job queue → Runner worker: delivers jobs
README.md - Runner worker → Agent runtime: executes runs
apps/runner/src/worker.ts - Run admission → Harness workflow: snapshots harness
packages/core/src/runs.ts - Agent runtime → Model provider calls: requests completions
- Agent runtime → Guardrail policies: applies policies
- Agent runtime → Knowledge bases: retrieves context
- Learning and reflection → Guardrail policies: checks reflection
packages/core/src/experience.ts - Learning and reflection → Knowledge bases: searches knowledge
packages/core/src/experience.ts - Learning and reflection → Model provider calls: generates reflection
packages/core/src/experience.ts - Learning and reflection → Durable job queue: queues reflection
packages/core/src/experience.ts - Learning and reflection → Knowledge notebooks: resolves targets
packages/core/src/experience.ts - Learning and reflection → Knowledge bases: stores lessons
packages/core/src/experience.ts - HTTP API → Human review: records decisions
apps/api/src/app.ts - HTTP API → MongoDB state: reads and writes
apps/api/src/app.ts - Run admission → MCP tools: discovers tools
packages/core/src/runs.ts - Runner worker → Conversations: updates conversations
apps/runner/src/worker.ts - Harness workflow → Domain validation: validates harness
- HTTP API → Security controls: uses request errors
apps/api/src/app.ts - Studio UI → Webhook settings: configures webhooks
- Connector gateway → MongoDB state: stores gateway state
- Agent runtime → Reusable skills: loads instructions