# Function inferICTM

- inferICTM(subtask: SubTask, analysis: TaskAnalysis): ICTMInferenceResult

  Infer an optimal ICTM configuration from a subtask and its parent task analysis.

  This is the core intelligence of the ICTM pattern — it analyzes the subtask to determine the best instructions, context filter, tools, and model config.

  #### Parameters

  - subtask: SubTask

    The subtask to create a sub-agent for

  - analysis: TaskAnalysis

    Analysis of the parent task

  #### Returns ICTMInferenceResult

  ICTMInferenceResult with config and reasoning

  - Defined in packages/nexus-agents/src/agents/ictm/ictm-factory.ts:242