MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / createSessionFromConfig

Function createSessionFromConfig

scripts/mars-api.mjs:288–294  ·  view source on GitHub ↗

* Launch a new session from an existing Agent Config. The config already * holds the manifest and its resolved credentials, so this carries no * spec of its own — which is what makes "run this agent" a single call. * The new session starts PROVISIONING, not READY.

(configId, name)

Source from the content-addressed store, hash-verified

286 * The new session starts PROVISIONING, not READY.
287 */
288 async createSessionFromConfig(configId, name) {
289 const body = await request("POST", SESSIONS_PATH, {
290 body: { name, config_id: configId },
291 timeoutMs: CREATE_SESSION_TIMEOUT_MS,
292 });
293 return body?.session ?? null;
294 },
295
296 async pauseSession(sessionId) {
297 await request("POST", `${SESSIONS_PATH}/${sessionId}/pause`);

Callers

nothing calls this directly

Calls 1

requestFunction · 0.70

Tested by

no test coverage detected