Member Junction
    Preparing search index...

    This interface defines a simple serializable structure that represents the raw specification of an agent including its actions, sub-agents, etc. It pairs with the AgentSpec class which provides methods to manipulate and synchronize this spec with the underlying agent metadata in the database.

    interface AgentSpec {
        Actions?: AgentActionSpec[];
        ChatHandlingOption?: "Failed" | "Retry" | "Success";
        DefaultArtifactTypeID?: string;
        DefaultPromptEffortLevel?: number;
        Description?: string;
        DriverClass?: string;
        FinalPayloadValidation?: string;
        FinalPayloadValidationMaxRetries?: number;
        FinalPayloadValidationMode?: "Fail" | "Retry" | "Warn";
        FunctionalRequirements?: string;
        IconClass?: string;
        ID: string;
        InvocationMode?: "Sub-Agent" | "Any" | "Top-Level";
        LogoURL?: string;
        MaxCostPerRun?: number;
        MaxExecutionsPerRun?: number;
        MaxIterationsPerRun?: number;
        MaxTimePerRun?: number;
        MaxTokensPerRun?: number;
        MinExecutionsPerRun?: number;
        ModelSelectionMode?: "Agent" | "Agent Type";
        Name: string;
        OwnerUserID?: string;
        ParentID?: string;
        Paths?: AgentStepPath[];
        PayloadDownstreamPaths?: string[];
        PayloadScope?: string;
        PayloadSelfReadPaths?: string[];
        PayloadSelfWritePaths?: string[];
        PayloadUpstreamPaths?: string[];
        Prompts?: AgentPromptSpec[];
        StartingPayloadValidation?: string;
        StartingPayloadValidationMode: "Fail" | "Warn";
        Status?: "Active" | "Inactive" | "Pending";
        Steps?: AgentStep[];
        SubAgents?: SubAgentSpec[];
        TechnicalDesign?: string;
        TypeID?: string;
    }
    Index

    Properties

    Actions?: AgentActionSpec[]

    Array of actions that are included within this agent

    ChatHandlingOption?: "Failed" | "Retry" | "Success"

    Controls how Chat next steps are handled. When null (default), Chat propagates to caller. When set to Success, Failed, or Retry, Chat steps are remapped to that value and re-validated.

    DefaultArtifactTypeID?: string

    Default artifact type produced by this agent. This is the primary artifact type; additional artifact types can be linked via AIAgentArtifactType junction table. Can be NULL if agent does not produce artifacts by default.

    DefaultPromptEffortLevel?: number

    Default effort level for all prompts executed by this agent (1-100, where 1=minimal effort, 100=maximum effort). Takes precedence over individual prompt EffortLevel settings but can be overridden by runtime parameters. Inherited by sub-agents unless explicitly overridden.

    Description?: string
    DriverClass?: string

    Optional override for the class name used by the MemberJunction class factory to instantiate this specific agent. If specified, this overrides the agent type's DriverClass. Useful for specialized agent implementations.

    FinalPayloadValidation?: string

    Optional JSON schema or requirements that define the expected structure and content of the agent's final payload. Used to validate the output when the agent declares success. Similar to OutputExample in AI Prompts.

    FinalPayloadValidationMaxRetries?: number

    Maximum number of retry attempts allowed when FinalPayloadValidation fails with Retry mode. After reaching this limit, the validation will fail permanently.

    FinalPayloadValidationMode?: "Fail" | "Retry" | "Warn"

    Determines how to handle validation failures when FinalPayloadValidation is specified. Options: Retry (default) - retry the agent with validation feedback, Fail - fail the agent run immediately, Warn - log a warning but allow success.

    FunctionalRequirements?: string

    Detailed markdown formatted requirements that explain the business goals of the agent without specific technical implementation details.

    IconClass?: string

    Font Awesome icon class (e.g., fa-robot, fa-brain) for the agent. Used as fallback when LogoURL is not set or fails to load.

    ID: string
    InvocationMode?: "Sub-Agent" | "Any" | "Top-Level"

    Controls how the agent can be invoked: Any (default - can be top-level or sub-agent), Top-Level (only callable as primary agent), Sub-Agent (only callable as sub-agent). Used to filter available agents in tools like Sage.

    LogoURL?: string

    URL to an image file or base64 data URI (e.g., data:image/png;base64,...) for the agent logo. Takes precedence over IconClass in UI display.

    MaxCostPerRun?: number

    Maximum cost in dollars allowed for a single agent run. Run will be terminated if this limit is exceeded.

    MaxExecutionsPerRun?: number

    When acting as a sub-agent, maximum number of times this agent can be executed per parent agent run

    MaxIterationsPerRun?: number

    Maximum number of prompt iterations allowed for a single agent run. Run will be terminated if this limit is exceeded.

    MaxTimePerRun?: number

    Maximum time in seconds allowed for a single agent run. Run will be terminated if this limit is exceeded.

    MaxTokensPerRun?: number

    Maximum total tokens (input + output) allowed for a single agent run. Run will be terminated if this limit is exceeded.

    MinExecutionsPerRun?: number

    When acting as a sub-agent, minimum number of times this agent must be executed per parent agent run

    ModelSelectionMode?: "Agent" | "Agent Type"

    Controls whether model selection is driven by the Agent Type's system prompt or the Agent's specific prompt. Default is Agent Type for backward compatibility.

    Name: string
    OwnerUserID?: string

    The user who owns and created this AI agent. Automatically set to the current user if not specified. Owner has full permissions (view, run, edit, delete) regardless of ACL entries.

    ParentID?: string

    Used only when this agent is a child sub-agent of another agent. Specifies the parent agent's ID.

    Paths?: AgentStepPath[]

    For flow agents only, this defines the paths between steps

    PayloadDownstreamPaths?: string[]

    Array of paths that define which parts of the payload should be sent downstream to sub-agents. Use [""] to send entire payload, or specify paths like ["customer.id", "campaign.", "analysis.sentiment"]

    PayloadScope?: string

    Defines the scope/path within the parent payload that this sub-agent operates on. When set, the sub-agent receives only this portion of the payload and all change requests are relative to this scope. Format: /path/to/scope (e.g. /PropA/SubProp1)

    PayloadSelfReadPaths?: string[]

    Array of paths that specify what parts of the payload the agent's own prompt can read. Controls downstream data flow when the agent executes its own prompt step.

    PayloadSelfWritePaths?: string[]

    Array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream data flow when the agent executes its own prompt step.

    PayloadUpstreamPaths?: string[]

    Array of paths that define which parts of the payload sub-agents are allowed to write back upstream. Use [""] to allow all writes, or specify paths like ["analysis.results", "recommendations."]

    Prompts?: AgentPromptSpec[]

    At least one prompt is mandatory for Loop agents, and prompts are optional for flow agents

    StartingPayloadValidation?: string

    Optional JSON schema validation to apply to the input payload before agent execution begins. Uses the same JSONValidator format as FinalPayloadValidation.

    StartingPayloadValidationMode: "Fail" | "Warn"

    Determines how to handle StartingPayloadValidation failures. Fail = reject invalid input, Warn = log warning but proceed.

    Status?: "Active" | "Inactive" | "Pending"

    Agent status - Active, Inactive, or Pending

    Steps?: AgentStep[]

    For flow agents only, this defines the steps that make up the flow

    SubAgents?: SubAgentSpec[]

    Array of sub-agents that are included within this agent

    TechnicalDesign?: string

    Detailed markdown that explains the structure of the agent including agent architecture, actions, sub-agents, prompts, and payload structure. Information will include:

    • Agent architecture overview - basic top level info like name, description, agent type
    • Actions included in the agent
    • Sub-agents included in the agent
    • Prompt(s) for the agent
    • Payload structure including input and output JSON example
    TypeID?: string

    Agent type ID - references MJ: AI Agent Types entity. Common values:

    • Loop: for iterative, LLM-driven agents
    • Flow: for deterministic, graph-based workflows