How helplessness/benchthread works
BenchThread is a self-hosted AI research workbench: a user starts a session, converses with an agent, and can extend that work with tools, remote jobs, verification, and saved research artifacts. The graph preserves the documented workflow and major capabilities, plus core runtime layers for sessions, agent execution, configuration, and plugins. Several feature modules were not sampled; their README-described roles are shown, but unverified implementation links are omitted or dashed.
Main entry points: engine.py Turn Harness · manager_auto.py MCP Tools · app.py Server API · agents.py Agent Setup
Components 19
User Interaction
- Web Workbench
web/src/App.tsx - Server API
tcode_agent/server/app.py
Agent Runtime
- Sessions
tcode_agent/session/manager.py - Agent Setup
tcode_agent/agent/agents.py - Turn Harness
tcode_agent/harness/engine.py - Configuration
tcode_agent/config/manager.py - Plugin Manager
tcode_agent/plugins/manager.py
Tools and Execution
- MCP Tools
tcode_agent/mcp/manager_auto.py - Execution Workspaces
tcode_agent/workspace/manager.py - Async Jobs
tcode_agent/runtime/jobs.py
Research Workspace
- Research Records
tcode_agent/research - Paper Wiki
plugins/paper_research_workflow/wiki - Saved Workflows
tcode_agent/workflow/manager.py - Agent Memory
tcode_agent/memory/retriever.py
Results and Continuation
- Outcome Verification
tcode_agent/guard/outcome_guard.py - Artifact Results
tcode_agent/tools/builtin/artifact_query.py - Interactive Results
tcode_agent/presentation/canvas.py
Other components
- Researcher
- Model Service
Connections 22
- Researcher → Web Workbench: starts research
- Web Workbench → Server API: sends requests
- Server API → Sessions: manages sessions
tcode_agent/server/app.py - Server API → Agent Setup: selects agents
tcode_agent/server/app.py - Agent Setup → Configuration: loads settings
tcode_agent/agent/agents.py - Agent Setup → Turn Harness: runs turns
- Turn Harness → Model Service: requests completion
- Turn Harness → MCP Tools: invokes tools
- Plugin Manager → MCP Tools: configures integrations
tcode_agent/plugins/manager.py - Turn Harness → Outcome Verification: checks outcomes
tcode_agent/harness/engine.py - Researcher → MCP Tools: connects tools
- Researcher → Async Jobs: submits long tasks
- Async Jobs → MCP Tools: dispatches remotely
- Researcher → Execution Workspaces: chooses workspace
- Turn Harness → Artifact Results: queries artifacts
- Researcher → Artifact Results: reviews deliverables
- Researcher → Interactive Results: reviews visuals
- Researcher → Research Records: organizes research
- Researcher → Paper Wiki: reviews literature
- Researcher → Saved Workflows: saves repeated steps
- Turn Harness → Agent Memory: uses context
- Sessions → Research Records: retains research context
tcode_agent/session/manager.py