Action that loads the complete AgentSpec structure for an existing agent by ID.

This action retrieves the full agent specification including all nested structures: Actions, SubAgents, Prompts, Steps, and Paths. The result is the complete AgentSpec JSON structure suitable for analysis, modification, or display.

Example

// Load an agent's complete specification
await runAction({
ActionName: 'Load Agent Spec',
Params: [{
Name: 'AgentID',
Value: 'agent-uuid-here'
}, {
Name: 'IncludeSubAgents',
Value: true // Optional, defaults to true
}]
});

Hierarchy (view full)

Constructors

Methods

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result

  • Truncates PromptText fields in SubAgents (and nested SubAgents) recursively. Top-level agent prompts are NOT truncated - only subagent prompts. Applied to both the AgentSpec output parameter and Message to avoid super long outputs.

    Parameters

    • spec: any
    • maxLength: number = 100

    Returns any