Create a new EmergentCapabilityEngine.
All collaborator dependencies. See EmergentCapabilityEngineDeps.
Forge a new tool from a request.
Runs test cases, submits the candidate to the LLM judge, and registers the
tool at the 'session' tier if approved. Returns a ForgeResult with
the tool ID on success, or an error / rejection verdict on failure.
Pipeline:
The forge request describing the desired tool.
Caller context containing the agent and session IDs.
A ForgeResult indicating success or failure.
Check if a tool is eligible for promotion and auto-promote if the threshold is met.
A tool qualifies for promotion when:
'session' tier.EmergentConfig.promotionThreshold:totalUses >= threshold.usesconfidenceScore >= threshold.confidenceWhen eligible, the engine submits the tool to the judge's promotion panel.
If both reviewers approve, the tool is promoted to 'agent' tier.
The ID of the tool to check.
A PromotionResult if promotion was attempted, or null if
the tool is not eligible or does not exist.
Get all session-scoped tools for a given session ID.
The session identifier.
An array of EmergentTool objects belonging to the session.
Get all agent-tier tools for a given agent ID.
The agent identifier.
An array of EmergentTool objects created by the agent.
Clean up all session tools for a given session.
Delegates to the registry's EmergentToolRegistry.cleanupSession()
method and clears the local session index.
The session identifier to clean up.
Hydrate a persisted tool back into a live runtime and make it executable.
This is used by backend/admin control planes to sync shared tools from durable storage into a running ToolOrchestrator after promotion or restart.
Remove a previously synced tool from the live runtime and registry.
Factory method that creates the four self-improvement tools when
config.selfImprovement?.enabled is true.
Returns an array containing:
Returns an empty array when self-improvement is disabled or the config is absent. Uses dynamic imports to avoid hard compile-time coupling to tool modules that may not yet exist.
Runtime hooks for personality, skills, tools, and memory.
Array of 0 or 4 ITool instances.
Create an executable ITool wrapper for a forged emergent tool.
The wrapper performs runtime output validation, usage tracking, and promotion checks after each successful execution.
Orchestrates runtime tool creation for agents with emergent capabilities.
Pipeline: forge request → build tool → run tests → judge review → register.
Supports two creation modes:
Example