MCPcopy Create free account
hub / github.com/HKUDS/OpenSpace / OpenSpaceConfig

Class OpenSpaceConfig

openspace/tool_layer.py:24–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23@dataclass
24class OpenSpaceConfig:
25 # LLM Configuration
26 llm_model: str = "openrouter/anthropic/claude-sonnet-4.5"
27 llm_enable_thinking: bool = False
28 llm_timeout: float = 120.0
29 llm_max_retries: int = 3
30 llm_rate_limit_delay: float = 0.0
31 llm_kwargs: Dict[str, Any] = field(default_factory=dict)
32
33 # Separate models for specific tasks (None = use llm_model)
34 tool_retrieval_model: Optional[str] = None # Model for tool retrieval LLM filter
35 visual_analysis_model: Optional[str] = None # Model for visual analysis
36
37 # Skill Engine Models — names map to class names (None = use llm_model)
38 skill_registry_model: Optional[str] = None # SkillRegistry: skill selection
39 execution_analyzer_model: Optional[str] = None # ExecutionAnalyzer: post-execution analysis
40 skill_evolver_model: Optional[str] = None # (future) SkillEvolver: skill evolution
41
42 # Grounding Configuration
43 grounding_config_path: Optional[str] = None
44 grounding_max_iterations: int = 20
45 grounding_system_prompt: Optional[str] = None
46
47 # Backend Configuration
48 backend_scope: Optional[List[str]] = None # None = All backends ["shell", "gui", "mcp", "web", "system"]
49 use_clawwork_productivity: bool = False # If True, add ClawWork productivity tools (search_web, create_file, etc.) for fair comparison with ClawWork; requires livebench installed.
50
51 # Workspace Configuration
52 workspace_dir: Optional[str] = None
53
54 # Recording Configuration
55 enable_recording: bool = True
56 recording_backends: Optional[List[str]] = None
57 recording_log_dir: str = "./logs/recordings"
58 enable_screenshot: bool = False
59 enable_video: bool = False
60 enable_conversation_log: bool = True # Save LLM conversations to conversations.jsonl
61
62 # Skill Evolution
63 evolution_max_concurrent: int = 3 # Max parallel evolutions per trigger
64 execution_analysis_timeout: float = 300.0 # Overall post-task analyzer/evolver bound
65
66 # Logging Configuration
67 log_level: str = "INFO"
68 log_to_file: bool = False
69 log_file_path: Optional[str] = None
70
71 def __post_init__(self):
72 """Validate configuration"""
73 if not self.llm_model:
74 raise ValueError("llm_model is required")
75
76 logger.debug(f"OpenSpaceConfig initialized with model: {self.llm_model}")
77
78
79class OpenSpace:

Callers 6

_load_configFunction · 0.90
_get_openspaceFunction · 0.90
_make_configFunction · 0.90
__init__Method · 0.85
initializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected