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

# Get Apps

> Retrieve a JSON list of all apps the user has access to. Will also return a list of all tasks, tools, agents, models and datasources as a front end helper



## OpenAPI

````yaml get /{resourceSlug}/apps.json
openapi: 3.0.0
info:
  title: Agentcloud Webapp API Docs
  description: The API docs for Agentcloud's webapp.
  version: 0.2.1
servers:
  - url: https://app.agentcloud.dev
    description: Use our public api endpoints!
  - url: '{custom_url}'
    description: Test the endpoints on your own instance of Agent Cloud!
    variables:
      custom_url:
        default: https://app.agentcloud.dev
security: []
tags: []
paths:
  /{resourceSlug}/apps.json:
    get:
      tags:
        - Apps
      summary: Get Apps
      description: >-
        Retrieve a JSON list of all apps the user has access to. Will also
        return a list of all tasks, tools, agents, models and datasources as a
        front end helper
      operationId: appsJson
      parameters:
        - name: resourceSlug
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ObjectId'
          description: >-
            The resourceSlug is a url parameter of the teamId associated with
            the user. Anywhere the resourceSlug is used can be interpreted as a
            teamId
      responses:
        '200':
          description: >-
            JSON object containing an array of all the associated agents with
            that teamId, will return an empty array if the request is successful
            but there are no associated agents.
          content:
            apps.json:
              schema:
                properties:
                  csrf:
                    type: string
                    description: cross site token
                  apps:
                    type: array
                    items:
                      $ref: '#/components/schemas/Agent'
                  tasks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Task'
                  tools:
                    type: array
                    items:
                      $ref: '#/components/schemas/Tool'
                  agents:
                    type: array
                    items:
                      $ref: '#/components/schemas/Agent'
                  models:
                    type: array
                    items:
                      $ref: '#/components/schemas/Model'
                  datasources:
                    type: array
                    items:
                      $ref: '#/components/schemas/Datasource'
        '400':
          description: Error in validation, check error message for more information
          content:
            dynamicResponse:
              schema:
                $ref: '#/components/schemas/dynamicResponse'
        '403':
          description: >-
            Invalid permissions on the resourceSlug, attempting to access an
            agent outside the permissions of the team
          content:
            dynamicResponse:
              schema:
                $ref: '#/components/schemas/dynamicResponse'
        '500':
          description: Internal error
          content:
            dynamicResponse:
              schema:
                $ref: '#/components/schemas/dynamicResponse'
components:
  schemas:
    ObjectId:
      description: >-
        Mongodb Object id, unique identifier, length of 24 characters fitting
        the following regex; [a-f0-9]{24}
      type: string
    Agent:
      description: An agent object used for tasks or apps
      required:
        - _id
        - name
        - role
        - goal
        - backstory
        - modelId
        - verbose
        - allowDelegation
      properties:
        _id:
          type: string
          description: Unique Mongodb identifier for the object
          additionalProperties:
            $ref: '#/components/schemas/ObjectId'
        orgId:
          description: >-
            Organisation the agent is linked to (generally the org of the user
            that created the agent)
          type: string
          additionalProperties:
            $ref: '#/components/schemas/ObjectId'
        teamId:
          description: >-
            Team the agent is linked to (generally the team of the user that
            created the agent)
          type: string
          additionalProperties:
            $ref: '#/components/schemas/ObjectId'
        name:
          type: string
          description: Name of the agent
        role:
          description: >-
            Fed into the LLM to help it provide a more detailed and correct
            response
          type: string
        goal:
          description: >-
            The goal of the agent is fed into the LLM, this allows the LLM to
            know it's role in the RAG pipeline
          type: string
        backstory:
          description: A detailed description of what the LLM will be doing
          type: string
        modelId:
          description: >-
            The linked ObjectId of the model being used by this agent (this
            links to a Model object)
          type: string
          additionalProperties:
            $ref: '#/components/schemas/ObjectId'
        functionModelId:
          description: >-
            A secondary model used to execute function calls (this links to a
            Model object), set to null if unused automatically by the API
          type: string
          additionalProperties:
            $ref: '#/components/schemas/ObjectId'
        verbose:
          description: >-
            True or false check to determine if custom verbosity is used in
            agent, higher verbosity requires agent to include more of the
            retrieved documents at the expense of longer answers, lower
            verbosity can result in shorter answers but can also ommit crucial
            details
          type: boolean
        allowDelegation:
          description: >-
            True or false check to determine if the agent is allowed to delegate
            tasks to other agents in the context of an app
          type: boolean
        toolIds:
          description: >-
            Array of the tools the agent can access to improve performance and
            abstract tool functionality from agent usage
          type: array
          items:
            type: string
            additionalProperties:
              $ref: '#/components/schemas/ObjectId'
        icon:
          description: >-
            IconAttachment object used to hold the attached icon used for the
            agent (this links to an IconAttachment object);
          additionalProperties:
            $ref: '#/components/schemas/ObjectId'
    Task:
      type: object
      description: >-
        Represents a task within the system, including its configuration,
        expected output, and optional form fields.
      required:
        - name
        - description
      properties:
        _id:
          description: Unique identifier for the task.
          oneOf:
            - $ref: '#/components/schemas/ObjectId'
            - type: string
        orgId:
          description: Identifier of the organization to which the task belongs.
          oneOf:
            - $ref: '#/components/schemas/ObjectId'
            - type: string
        teamId:
          description: Identifier of the team to which the task belongs.
          oneOf:
            - $ref: '#/components/schemas/ObjectId'
            - type: string
        name:
          description: The name of the task.
          type: string
        description:
          description: A detailed description of the task.
          type: string
        agentId:
          description: Identifier of the agent associated with the task.
          oneOf:
            - $ref: '#/components/schemas/ObjectId'
            - type: string
        expectedOutput:
          description: The expected output of the task.
          type: string
        toolIds:
          description: List of tool identifiers associated with the task.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ObjectId'
              - type: string
        asyncExecution:
          description: Indicates if the task is executed asynchronously.
          type: boolean
        context:
          description: Contextual information related to the task.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ObjectId'
              - type: string
        outputJson:
          description: The JSON output of the task.
          type: object
          additionalProperties: true
        outputPydantic:
          description: The Pydantic output of the task.
          type: object
          additionalProperties: true
        outputFile:
          description: The file output of the task.
          type: string
        icon:
          description: >-
            Icon associated with the task, either an attachment or an object
            containing the icon details.
          oneOf:
            - $ref: '#/components/schemas/IconAttachment'
            - type: object
              properties:
                id:
                  description: Identifier for the icon.
                  type: string
                filename:
                  description: Filename of the icon.
                  type: string
        requiresHumanInput:
          description: Indicates if the task requires human input.
          type: boolean
        displayOnlyFinalOutput:
          description: Indicates if only the final output should be displayed.
          type: boolean
        hidden:
          description: Indicates if the task is hidden from standard views.
          type: boolean
        formFields:
          description: Array of form field configurations associated with the task.
          type: array
          items:
            $ref: '#/components/schemas/FormFieldConfig'
        isStructuredOutput:
          description: Indicates if the output of the task is structured.
          type: boolean
    Tool:
      type: object
      description: >-
        Represents a tool within the system, including its configuration, state,
        and associated retrievers.
      required:
        - name
        - description
        - type
        - data
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        orgId:
          $ref: '#/components/schemas/ObjectId'
          description: Identifier of the organization to which the tool belongs.
        teamId:
          $ref: '#/components/schemas/ObjectId'
          description: Identifier of the team to which the tool belongs.
        name:
          description: The name of the tool.
          type: string
        description:
          description: A detailed description of the tool.
          type: string
        type:
          $ref: '#/components/schemas/ToolType'
          description: The type of tool.
        asdf:
          description: The schema associated with the tool.
          type: string
        retriever_type:
          $ref: '#/components/schemas/Retriever'
          description: The type of retriever used by the tool.
        retriever_config:
          $ref: '#/components/schemas/RetrieverConfig'
          description: Configuration settings for the retriever.
        datasourceId:
          $ref: '#/components/schemas/ObjectId'
          description: Identifier of the datasource associated with the tool.
        state:
          $ref: '#/components/schemas/ToolState'
          description: The current state of the tool.
        data:
          type: object
          description: >-
            Data related to the tool, including runtime, environment variables,
            and more.
          required:
            - name
          properties:
            runtime:
              description: The runtime environment for the tool.
              type: string
            builtin:
              description: Indicates if the tool is a built-in feature.
              type: boolean
            name:
              description: The name of the data.
              type: string
            description:
              description: A description of the data.
              type: string
            apiKey:
              description: API key associated with the tool.
              type: string
            environmentVariables:
              description: Environment variables required by the tool.
              type: object
              additionalProperties:
                type: string
            parameters:
              type: object
              description: Parameters for the tool's function.
              properties:
                properties:
                  description: Properties of the function parameters.
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/FunctionProperty'
                required:
                  description: List of required parameter names.
                  type: array
                  items:
                    type: string
            code:
              description: Code associated with the tool.
              type: string
            requirements:
              description: Requirements needed by the tool.
              type: string
            openAPIMatchKey:
              description: Key used to match OpenAPI specifications.
              type: string
        icon:
          $ref: '#/components/schemas/IconAttachment'
          description: Icon associated with the tool.
        hidden:
          description: Indicates whether the tool is hidden.
          type: boolean
        functionId:
          description: Identifier of the function associated with the tool.
          type: string
        revisionId:
          $ref: '#/components/schemas/ObjectId'
          description: Identifier of the tool's revision.
        functionLogs:
          description: Logs related to the function's execution.
          type: string
    Model:
      type: object
      description: Represents an AI model used within a team or organization.
      required:
        - _id
        - orgId
        - teamId
        - name
        - model
        - embeddingLength
        - modelType
        - type
        - config
      properties:
        _id:
          description: Unique identifier for the model.
          type: string
        orgId:
          description: Identifier of the organization to which the model belongs.
          type: string
        teamId:
          description: Identifier of the team to which the model belongs.
          type: string
        name:
          description: The name of the model.
          type: string
        model:
          description: The specific AI model used.
          type: string
        embeddingLength:
          description: The length of the embeddings generated by the model.
          type: integer
        modelType:
          description: The type of the model.
          type: string
        type:
          description: The general type of the model (e.g., embedding, language model).
          type: string
        config:
          type: object
          description: Configuration settings for the model.
          required:
            - model
            - api_key
            - base_url
            - cohere_api_key
            - groq_api_key
          properties:
            model:
              description: The model configuration setting.
              type: string
            api_key:
              description: API key for accessing the model.
              type: string
            base_url:
              description: The base URL for the model's API.
              type: string
            cohere_api_key:
              description: API key for accessing Cohere services.
              type: string
            groq_api_key:
              description: API key for accessing Groq services.
              type: string
    Datasource:
      type: object
      description: >-
        Represents a data source configuration within the system, including
        connection details, status, chunking configurations, and record counts.
      required:
        - name
        - originalName
        - sourceType
        - sourceId
        - destinationId
        - workspaceId
        - connectionId
        - createdDate
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
          description: Unique identifier for the datasource.
        orgId:
          $ref: '#/components/schemas/ObjectId'
          description: Identifier of the organization to which the datasource belongs.
        teamId:
          $ref: '#/components/schemas/ObjectId'
          description: Identifier of the team to which the datasource belongs.
        name:
          description: The name of the datasource.
          type: string
        description:
          description: Optional description of the datasource.
          type: string
        originalName:
          description: The original name of the datasource.
          type: string
        filename:
          description: The name of the file associated with the datasource, if applicable.
          type: string
          nullable: true
        sourceType:
          description: The type of source for the datasource.
          type: string
        sourceId:
          description: The identifier of the data source.
          type: string
        destinationId:
          description: The identifier of the data destination.
          type: string
        workspaceId:
          description: The identifier of the workspace associated with the datasource.
          type: string
        connectionId:
          description: The identifier of the connection associated with the datasource.
          type: string
        recordCount:
          $ref: '#/components/schemas/DatasourceRecordCount'
          description: >-
            The record count details for the datasource, including total,
            successful, and failed records.
        connectionSettings:
          $ref: '#/components/schemas/DatasourceConnectionSettings'
          description: Configuration settings for the datasource connection.
        createdDate:
          description: The date and time when the datasource was created.
          type: string
          format: date-time
        lastSyncedDate:
          description: >-
            The date and time when the datasource was last synced. Null
            indicates it has never been synced.
          type: string
          format: date-time
          nullable: true
        status:
          description: The current status of the datasource.
          type: string
          enum:
            - draft
            - processing
            - embedding
            - ready
        discoveredSchema:
          description: >-
            Schema discovered during the data source connection. The structure
            depends on the source type.
          type: object
          nullable: true
        chunkingConfig:
          $ref: '#/components/schemas/UnstructuredChunkingConfig'
          description: >-
            Configuration settings for chunking unstructured data, including
            partitioning and chunking strategies, character limits, and
            similarity thresholds.
        embeddingField:
          description: The field used for embedding within the datasource.
          type: string
        timeWeightField:
          description: The field used to apply time weighting within the datasource.
          type: string
        modelId:
          $ref: '#/components/schemas/ObjectId'
          description: Identifier of the embedding model used, if applicable.
        hidden:
          description: Indicates whether the datasource is hidden from standard views.
          type: boolean
        streamConfig:
          $ref: '#/components/schemas/StreamConfigMap'
          description: >-
            Configuration settings for processing streams of data, breaking them
            into smaller chunks for more manageable processing.
        timeUnit:
          description: >-
            A temporary field to limit CRON frequency based on the plan. This
            will be replaced with a more robust solution in the future.
          type: string
    dynamicResponse:
      description: Server response
      properties:
        message:
          type: string
          description: Error message to provide more detail
        code:
          type: integer
          description: the error code
    IconAttachment:
      description: Attachment, generally used for image upload
      required:
        - id
        - filename
      properties:
        id:
          description: >-
            this is NOT a unique id for the IconAttachment, this is a Mongo id
            that links to an Asset object (neet to implement assets in docs)
          additionalProperties:
            $ref: '#/components/schemas/ObjectId'
        filename:
          type: string
          description: Filename of the attachment at the point of upload
    FormFieldConfig:
      type: object
      description: >-
        Configuration for a form field within a task, including position, type,
        and optional settings.
      required:
        - position
        - type
        - name
        - label
      properties:
        position:
          description: The position of the form field within the form layout.
          type: string
        type:
          description: The data type of the form field.
          type: string
          enum:
            - string
            - number
            - radio
            - checkbox
            - select
            - multiselect
            - date
        name:
          description: The name attribute of the form field.
          type: string
        label:
          description: The label displayed for the form field.
          type: string
        description:
          description: An optional description for the form field.
          type: string
        required:
          description: Indicates if the form field is required.
          type: boolean
        options:
          description: Options available for fields like radio, select, or multiselect.
          type: array
          items:
            type: string
        tooltip:
          description: A tooltip providing additional information about the form field.
          type: string
    ToolType:
      type: string
      description: Enum representing different types of tools.
      enum:
        - function
        - rag
    Retriever:
      type: string
      description: Enum representing different types of retrievers used in tools.
      enum:
        - raw
        - self_query
        - time_weighted
        - multi_query
    RetrieverConfig:
      type: object
      description: Union type representing different retriever configurations.
      oneOf:
        - $ref: '#/components/schemas/SelfQueryRetrieverConfig'
        - $ref: '#/components/schemas/TimeWeightedRetrieverConfig'
    ToolState:
      type: string
      description: Enum representing the possible states of a tool.
      enum:
        - pending
        - ready
        - error
    FunctionProperty:
      type: object
      description: Defines the properties of a function parameter in a tool.
      required:
        - type
        - description
      properties:
        type:
          description: The data type of the function property.
          type: string
        description:
          description: A description of the function property.
          type: string
    DatasourceRecordCount:
      type: object
      description: >-
        Represents the record count information for a datasource, including
        total, successful, and failed records.
      properties:
        total:
          description: The total number of records processed.
          type: integer
          format: int32
        success:
          description: The number of successfully processed records.
          type: integer
          format: int32
        failure:
          description: The number of records that failed to process.
          type: integer
          format: int32
    DatasourceConnectionSettings:
      type: object
      description: >-
        Configuration settings for a datasource connection, including
        scheduling, data residency, and namespace details.
      required:
        - prefix
        - name
        - sourceId
        - destinationId
        - status
        - configurations
        - nonBreakingSchemaUpdatesBehavior
      properties:
        prefix:
          description: >-
            Optional prefix to be added to the destination's namespace. Can be
            null.
          type: string
          nullable: true
        name:
          description: The name of the datasource connection.
          type: string
        sourceId:
          description: The identifier of the data source.
          type: string
        destinationId:
          description: The identifier of the data destination.
          type: string
        status:
          description: >-
            The status of the datasource connection. This should match the enum
            values defined by the Airbyte API and should allow creation in a
            paused state.
          type: string
        configurations:
          description: >-
            Configuration settings for the datasource connection. Structure is
            dependent on the datasource type.
          type: object
        schedule:
          type: object
          description: Scheduling information for the datasource connection.
          properties:
            scheduleType:
              description: The type of schedule for the datasource connection.
              type: string
              enum:
                - cron
                - manual
            cronExpression:
              description: >-
                The CRON expression for scheduling, required if the schedule
                type is 'cron'.
              type: string
              nullable: true
        dataResidency:
          description: Specifies where the data should be stored geographically.
          type: string
          nullable: true
        namespaceDefinition:
          description: Defines how the namespace should be determined for the data.
          type: string
          nullable: true
        namespaceFormat:
          description: The format of the namespace, can be null if not applicable.
          type: string
          nullable: true
        nonBreakingSchemaUpdatesBehavior:
          description: Specifies the behavior for handling non-breaking schema updates.
          type: string
    UnstructuredChunkingConfig:
      type: object
      description: >-
        Configuration for chunking unstructured data, including partitioning and
        chunking strategies, character limits, and similarity thresholds.
      required:
        - partitioning
        - strategy
        - max_characters
        - new_after_n_chars
        - overlap
        - similarity_threshold
        - overlap_all
      properties:
        partitioning:
          $ref: '#/components/schemas/UnstructuredPartitioningStrategy'
          description: The partitioning strategy used for unstructured data.
        strategy:
          $ref: '#/components/schemas/UnstructuredChunkingStrategy'
          description: The chunking strategy used for unstructured data.
        max_characters:
          description: The maximum number of characters allowed per chunk.
          type: integer
          format: int32
        new_after_n_chars:
          description: The number of characters after which a new chunk is created.
          type: integer
          format: int32
        overlap:
          description: The number of characters to overlap between chunks.
          type: integer
          format: int32
        similarity_threshold:
          description: >-
            Threshold for similarity when chunking by similarity, with a value
            between 0.0 and 1.0.
          type: number
          format: float
          minimum: 0
          maximum: 1
        overlap_all:
          description: >-
            Indicates whether to apply overlap to all chunks or only between
            adjacent chunks.
          type: boolean
    StreamConfigMap:
      type: object
      description: A mapping of stream names to their respective configuration settings.
      additionalProperties:
        $ref: '#/components/schemas/StreamConfig'
    SelfQueryRetrieverConfig:
      type: object
      description: Configuration for the self-query retriever.
      required:
        - metadata_field_info
      properties:
        k:
          description: Number of results to retrieve.
          type: integer
          format: int32
        metadata_field_info:
          description: Array of metadata field information objects.
          type: array
          items:
            $ref: '#/components/schemas/MetadataFieldInfo'
    TimeWeightedRetrieverConfig:
      type: object
      description: Configuration for the time-weighted retriever.
      properties:
        k:
          description: Number of results to retrieve.
          type: integer
          format: int32
        decay_rate:
          description: Decay rate applied to the time weighting.
          type: number
          format: float
    UnstructuredPartitioningStrategy:
      type: string
      description: Enum representing the strategy used for unstructured data partitioning.
      enum:
        - auto
        - fast
        - hi_res
        - ocr_only
    UnstructuredChunkingStrategy:
      type: string
      description: Enum representing the strategy used for unstructured data chunking.
      enum:
        - basic
        - by_title
        - by_page
        - by_similarity
    StreamConfig:
      type: object
      description: >-
        Configuration settings for a specific stream, used to break down large
        volumes of data into smaller, manageable chunks for processing.
      required:
        - checkedChildren
        - primaryKey
        - syncMode
        - cursorField
        - descriptionsMap
      properties:
        checkedChildren:
          description: >-
            List of child stream identifiers that are checked for inclusion in
            the sync.
          type: array
          items:
            type: string
        primaryKey:
          description: List of fields that make up the primary key for the stream.
          type: array
          items:
            type: string
        syncMode:
          description: The synchronization mode used for the stream.
          type: string
        cursorField:
          description: List of fields that act as the cursor for incremental syncs.
          type: array
          items:
            type: string
        descriptionsMap:
          $ref: '#/components/schemas/FieldDescriptionMap'
          description: A map of field names to their descriptions.
    MetadataFieldInfo:
      type: object
      description: Information about a metadata field used in retriever configurations.
      required:
        - name
        - description
        - type
      properties:
        name:
          description: The name of the metadata field.
          type: string
        description:
          description: A description of the metadata field.
          type: string
        type:
          description: The data type of the metadata field.
          type: string
          enum:
            - string
            - integer
            - float
    FieldDescriptionMap:
      type: object
      description: A mapping of field names to their descriptions.
      additionalProperties:
        $ref: '#/components/schemas/FieldDescription'
    FieldDescription:
      type: object
      description: >-
        Provides details about a specific field, including its description and
        type.
      required:
        - description
        - type
      properties:
        description:
          description: A textual description of the field.
          type: string
        type:
          description: The data type of the field.
          type: string

````