> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maadify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Parent Agent Details

> Get a parent agent and its configured tools, sub-agents, and state-function details.



## OpenAPI

````yaml /api-reference/openapi.json get /api/parent_agents/{parent_agent_id}
openapi: 3.1.0
info:
  title: Maadify API
  description: Public and admin API endpoints for Maadify.
  version: 1.0.0
servers:
  - url: https://app.maadify.com
    description: Production
security: []
tags:
  - name: Parent agents
    description: Create, update, and configure parent agents.
  - name: Sub-agents
    description: Create sub-agents and assign them to parent agents.
  - name: Tools
    description: Search tools and manage tool assignments.
  - name: Prompt templates
    description: Search and manage prompt templates.
  - name: Users
    description: Search users available to the authenticated tenant.
  - name: Models
    description: Search available LLM models.
  - name: Files
    description: Check file upload status.
paths:
  /api/parent_agents/{parent_agent_id}:
    get:
      tags:
        - Parent agents
      summary: Get Parent Agent Details
      description: >-
        Get a parent agent and its configured tools, sub-agents, and
        state-function details.
      operationId: get_parent_agent_details_api_parent_agents__parent_agent_id__get
      parameters:
        - name: parent_agent_id
          in: path
          required: true
          schema:
            type: integer
            title: Parent Agent Id
        - name: relationship_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Relationship Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParentAgentDetailsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    ParentAgentDetailsResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the request was successful.
        error_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Type
          description: Type of error if the request failed.
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message or informational message.
        data:
          $ref: '#/components/schemas/ParentAgentDetailsData'
          description: Parent agent details.
      type: object
      required:
        - success
        - data
      title: ParentAgentDetailsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ParentAgentDetailsData:
      properties:
        parent_agent:
          $ref: '#/components/schemas/ParentAgentListItem'
          description: Parent agent row.
        details:
          $ref: '#/components/schemas/ParentAgentOrganizedDetails'
          description: Organized parent-agent configuration details.
      type: object
      required:
        - parent_agent
        - details
      title: ParentAgentDetailsData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ParentAgentListItem:
      properties:
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
          description: Parent agent ID.
        parent_agent_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Agent Type
          description: Human-readable parent agent type.
        parent_agent_type_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Agent Type Key
          description: Parent agent type key.
        agent_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Key
          description: Stored parent agent key.
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
          description: >-
            User-facing agent name derived from agent_key with underscores
            converted to spaces.
        full_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Full Display Name
          description: Full display name for the parent agent.
        tenant:
          anyOf:
            - type: string
            - type: 'null'
          title: Tenant
          description: Owning tenant ID.
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: Human-readable parent agent name.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Parent agent description.
        configs:
          anyOf:
            - $ref: '#/components/schemas/ParentAgentConfigRequest'
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Configs
          description: Parent agent runtime configuration.
        llm_model:
          anyOf:
            - type: integer
            - type: 'null'
          title: Llm Model
          description: Default LLM model ID.
        llm_model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model Name
          description: Default LLM model name.
        active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Active
          description: Whether the parent agent is active.
        state_function:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: State Function
          description: State-function routing rules.
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
          description: Creation timestamp.
      type: object
      title: ParentAgentListItem
    ParentAgentOrganizedDetails:
      properties:
        sub_agents:
          items:
            $ref: '#/components/schemas/ParentAgentDetailSubAgent'
          type: array
          title: Sub Agents
          description: Configured sub-agents for the parent agent.
        executed_tools:
          items:
            $ref: '#/components/schemas/ParentAgentExecutedTool'
          type: array
          title: Executed Tools
          description: >-
            Tools the parent agent can execute directly from state-function
            actions.
      type: object
      title: ParentAgentOrganizedDetails
    ParentAgentConfigRequest:
      properties:
        last_agent_in_group:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Agent In Group
          description: >-
            Default sub-agent for a continued conversation. If empty, standard
            routing rules are used.
        max_rounds:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Max Rounds
          description: >-
            Maximum number of agent-to-agent turns that can occur in one
            parent-agent run.
          default: '10'
        temperature:
          anyOf:
            - type: string
            - type: number
            - type: integer
            - type: 'null'
          title: Temperature
          description: >-
            Default creativity level used when a sub-agent does not specify its
            own temperature.
          default: 0
        max_messages:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Max Messages
          description: >-
            Maximum number of non-system messages to keep in the parent-agent
            context.
          default: '10'
        continue_with_last_agent:
          anyOf:
            - type: string
            - type: boolean
          title: Continue With Last Agent
          description: >-
            When a conversation resumes, keep the last sub-agent as the routing
            reference instead of restarting rule logic.
          default: false
        memory_expiration:
          anyOf:
            - $ref: '#/components/schemas/MemoryExpirationConfigRequest'
            - type: 'null'
          description: >-
            Default memory expiration settings for thread, agent, and tenant
            scoped memories.
      type: object
      title: ParentAgentConfigRequest
    ParentAgentDetailSubAgent:
      properties:
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
          description: Sub-agent ID.
        sub_agent_name_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Sub Agent Name Key
          description: Stored normalized sub-agent key.
        sub_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sub Agent Name
          description: Human-readable sub-agent name.
        agent_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Type
          description: Sub-agent type.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Sub-agent description.
        config:
          additionalProperties: true
          type: object
          title: Config
          description: Sub-agent runtime configuration.
        tenant:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tenant
          description: Owning tenant ID or joined tenant object.
        system_prompt:
          anyOf:
            - $ref: '#/components/schemas/PromptTemplateListItem'
            - type: 'null'
          description: Joined system prompt template row.
        llm_model:
          anyOf:
            - $ref: '#/components/schemas/ParentAgentDetailLLMModel'
            - type: 'null'
          description: Joined LLM model row.
        tools:
          items:
            $ref: '#/components/schemas/ParentAgentDetailSubAgentTool'
          type: array
          title: Tools
          description: Tools attached to this sub-agent.
      additionalProperties: true
      type: object
      title: ParentAgentDetailSubAgent
    ParentAgentExecutedTool:
      properties:
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
          description: Parent-agent tool link ID.
        parent_agent_tool_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Agent Tool Id
          description: Parent-agent tool link ID.
        parent_agent_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Agent Id
          description: Parent agent ID.
        agent_tool_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Agent Tool Id
          description: Linked agent tool ID.
        tool_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Id
          description: String tool identifier used in state-function context keys.
        flow_configs:
          additionalProperties: true
          type: object
          title: Flow Configs
          description: Tool-level execution configuration.
        default_tool_owner_config:
          additionalProperties: true
          type: object
          title: Default Tool Owner Config
          description: Owner default configuration for quick assignment.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Tool key.
        tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Name
          description: Tool key.
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: Human-readable tool name.
        tool_name_display:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Name Display
          description: Human-readable tool name.
        custom_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Custom Name
          description: Tenant-specific tool name override.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Tool description.
        connector:
          anyOf:
            - type: string
            - type: 'null'
          title: Connector
          description: Connector key.
        connector_image:
          anyOf:
            - type: string
            - type: 'null'
          title: Connector Image
          description: Connector image URL.
        connector_name_display:
          anyOf:
            - type: string
            - type: 'null'
          title: Connector Name Display
          description: Human-readable connector name.
        input_schema:
          title: Input Schema
          description: Effective input schema for the tool.
        output_schema:
          title: Output Schema
          description: Effective output schema for the tool.
        output_example:
          title: Output Example
          description: Effective output example for the tool.
        tool_output_schema:
          title: Tool Output Schema
          description: Effective output schema for the tool.
        tool_output_example:
          title: Tool Output Example
          description: Effective output example for the tool.
        tenant_owner:
          anyOf:
            - type: string
            - type: 'null'
          title: Tenant Owner
          description: Tenant that owns the tool.
        tenant_owner_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tenant Owner Name
          description: Name of the tenant that owns the tool.
      additionalProperties: true
      type: object
      title: ParentAgentExecutedTool
    MemoryExpirationConfigRequest:
      properties:
        thread_ttl_hours:
          type: integer
          minimum: 1
          title: Thread Ttl Hours
          description: Hours to retain thread-scoped memories.
          default: 24
        agent_ttl_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Agent Ttl Days
          description: Days to retain agent-scoped memories. Null means no expiration.
        tenant_ttl_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tenant Ttl Days
          description: Days to retain tenant-scoped memories. Null means no expiration.
        clear_thread_on_conversation_end:
          type: boolean
          title: Clear Thread On Conversation End
          description: Clear thread memories when a conversation ends.
          default: false
      type: object
      title: MemoryExpirationConfigRequest
    PromptTemplateListItem:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Prompt template ID.
        tenant_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tenant Id
          description: Owning tenant ID.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Prompt template name.
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: Prompt template version.
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
          description: Whether this prompt template version is active.
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: Prompt template content.
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Prompt template metadata.
        latest_version:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Latest Version
          description: Whether this row is marked as the latest template version.
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
          description: Creation timestamp.
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
          description: Last update timestamp.
      type: object
      title: PromptTemplateListItem
    ParentAgentDetailLLMModel:
      properties:
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
          description: LLM model ID.
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
          description: Model name.
        model_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Version
          description: Model version.
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
          description: Model provider.
      type: object
      title: ParentAgentDetailLLMModel
    ParentAgentDetailSubAgentTool:
      properties:
        agent_tool_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Agent Tool Id
          description: Linked agent tool ID.
        system_agent_tool_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: System Agent Tool Id
          description: Linked system tool ID.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Tool key.
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: Human-readable tool name.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Tool description.
        option:
          anyOf:
            - type: string
            - type: 'null'
          title: Option
          description: How the sub-agent can use the tool.
        connector:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Connector
          description: Connector key or joined connector row.
        connector_setting_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Connector Setting Id
          description: Connector settings ID used by this tool.
        input_schema:
          title: Input Schema
          description: Effective input schema for the tool.
        output_schema:
          title: Output Schema
          description: Effective output schema for the tool.
        output_example:
          title: Output Example
          description: Effective output example for the tool.
        input_example:
          title: Input Example
          description: Effective input example for the tool.
      additionalProperties: true
      type: object
      title: ParentAgentDetailSubAgentTool
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````