MCPcopy Create free account
hub / github.com/InternScience/InternAgent / create_session

Method create_session

internagent/mas/interface.py:127–163  ·  view source on GitHub ↗

Create a new research session. Args: goal_description: Description of the research goal domain: Scientific domain for the research background: Background information for context ref_code_path: Path to reference code (optional)

(self,
                           goal_description: str,
                           domain: str,
                           background: str = "",
                           ref_code_path: str = "",
                           constraints: List[str] = None)

Source from the content-addressed store, hash-verified

125 raise
126
127 async def create_session(self,
128 goal_description: str,
129 domain: str,
130 background: str = "",
131 ref_code_path: str = "",
132 constraints: List[str] = None) -> str:
133 """
134 Create a new research session.
135
136 Args:
137 goal_description: Description of the research goal
138 domain: Scientific domain for the research
139 background: Background information for context
140 ref_code_path: Path to reference code (optional)
141 constraints: List of constraints for the session
142
143 Returns:
144 Session ID for the created session
145
146 Raises:
147 RuntimeError: If system is not ready
148 """
149 self._ensure_system_ready()
150
151 session_id = await self.orchestration_agent.create_session(
152 goal_description=goal_description,
153 domain=domain,
154 background=background,
155 ref_code_path=ref_code_path,
156 constraints=constraints or []
157 )
158
159 # Track session
160 self._track_session(session_id, goal_description, domain, ref_code_path)
161
162 logger.info(f"Created session {session_id}: {goal_description}")
163 return session_id
164
165 async def run_session(self,
166 session_id: str,

Callers 1

load_taskMethod · 0.45

Calls 2

_ensure_system_readyMethod · 0.95
_track_sessionMethod · 0.95

Tested by

no test coverage detected