Nodejs-dialogflow: FR: Allow to create multiple agents per project and create them through an API

Created on 27 Sep 2018  路  20Comments  路  Source: googleapis/nodejs-dialogflow

  • OS: any
  • Node.js version: any
  • dialogflow version: 0.6.0

Hi, I've searched online and I found that you can't create agents through the API, nor you can have multiple agents in the same Google Cloud project.
It would be nice for more complex applications to be able to create multiple agents within the same project, and make this possible through the API would allow us to automate the process.

Knowing if this is possible for the Dialogflow devs and how much time it would take would help me predict the scalability of my use case, so I can focus on what makes more sense now.
Thank you very much.

feature request backend dialogflow

Most helpful comment

This post is misleading. It makes people feel that you can create multiple agents under one project as the original question raised by @rwmb is

be able to create multiple agents within the same project

However, it has been confirm by Google itself that

Note: You can only create one agent for a GCP project. If you need multiple agents, you will need to create multiple projects.

The setAgent method that @nnegrey mentioned is to create or update the one, and the only one agent in project. If the project does not have an agent, this setAgent method will create one. Otherwise it simple does the update job. Therefore, this setAgent API is not able to create multiple agents under one project.

All 20 comments

@nnegrey is this possible?

Hi, currently you are correct, this is not a supported feature.

Is this instance a case where you would find yourself creating agents often and quickly?

No need for it to be very quick - through an API would be much quicker than doing the whole process manually, obviously - but in a situation where you want to provide custom agents for different groups of customers, you'd have to create different agents AND projects so intents don't get confused. I do have this feature where I do something like that (I'm under NDA so we can talk about this through DM for more details), but I don't want to use a jenky solution like a bot to do something like this, so my application won't scale if I have to manually create one agent and one project per group.
Does this makes sense @nnegrey ?
Thanks for the quick response.

EDIT: btw, there's the whole service account setup as well, which makes everything even more slower

Hi @nnegrey - I'd like to note I see this is an essential feature request.

I was surprised the agent couldn't be created via the API, especially for the Enterprise edition.
Is there potential for this to be implemented or should DialogFlow developers look for another solution?

It would be good if we can create agent through api. And our team will love this feature if we can create agent through api. So that there will be very less manual process to create agent

Hi, @nnegrey, any updates on this issue? Is the team considering this feature?

Hi @JustinBeckwith - Could you help with any feedback on this?

Knowing whether there is a timeline for implementation, or if it's a feature DF will never support - will help a great deal.

Hi all, you can jump on this page to report bugs and feature requests directly to the product teams.
https://cloud.google.com/support/docs/issue-trackers

There are two bugs currently open related to above FRs. Please jump on those and make additional comments for these requests.
Multi Agent FR: https://b.corp.google.com/issues/119335121
Create via API FR: https://b.corp.google.com/issues/122786944

Going to close this issue out, since the discussion seems to have moved elsewhere.

@callmehiphop the other one was moved to this issue and was closed, this is the main one it seems

@rwmb interesting, since this client is generated, there isn't anything actionable by the node devs themselves, it would be up to the API team to implement this feature.

@nnegrey @beccasaurus @sduskis where is the right place for a request like this? I'm not really sure where it should go, but I don't think it's here.

Please see the above comment for feature requests that are tied to the product itself.

Hi all, you can jump on this page to report bugs and feature requests directly to the product teams.
https://cloud.google.com/support/docs/issue-trackers

There are two bugs currently open related to above FRs. Please jump on those and make additional comments for these requests.
Multi Agent FR: https://b.corp.google.com/issues/119335121
Create via API FR: https://b.corp.google.com/issues/122786944

@callmehiphop sorry, I thought issues were being managed here, but I agree, it's a feature of the platform and not the package

Just FYI, Agent Creation has been added: https://cloud.google.com/dialogflow/docs/release-notes#june_13_2019

@nnegrey Great news on the creation part! But currently I can just update the parent one, do you also know how to use the API to create a new agent? There is no documentation on the creation part?

POST https://dialogflow.googleapis.com/v2/projects/PROJECT-NAME/agent/
then as body
{
  "parent": "test",
  "displayName": "test",
    "defaultLanguageCode": "en",
    "timeZone": "Europe/Madrid",
    "enableLogging": true,
    "matchMode": "MATCH_MODE_HYBRID",
    "classificationThreshold": 0.3,
    "apiVersion": "API_VERSION_V2",
    "tier": "TIER_STANDARD"
}

https://cloud.google.com/dialogflow/docs/reference/rest/v2/projects/agent
https://cloud.google.com/dialogflow/docs/reference/rest/v2beta1/Agent?authuser=1

any idea?
Thanks

That's amazing! I am very happy this feature has been added. I will certainly use it and let people know this exists! I will start messing around with it soon and give my feedback when possible! Thanks a lot guys.

It seems that this feature still does not work. Unable to create new agent. We can only edit the existing one. Maybe someone knows life hack how to create agent via api?

This post is misleading. It makes people feel that you can create multiple agents under one project as the original question raised by @rwmb is

be able to create multiple agents within the same project

However, it has been confirm by Google itself that

Note: You can only create one agent for a GCP project. If you need multiple agents, you will need to create multiple projects.

The setAgent method that @nnegrey mentioned is to create or update the one, and the only one agent in project. If the project does not have an agent, this setAgent method will create one. Otherwise it simple does the update job. Therefore, this setAgent API is not able to create multiple agents under one project.

Was this page helpful?
0 / 5 - 0 ratings