How to work and test the agent first locally with the CLI before the agent will be deployed to watsonx.ai?
Question: Local development and test not supported with the CLI?
This is possible with the "old" example applications, but not with the CLI.
1. Expected flow
- Generate agent and tools with a template
- Change agent implementation and tools locally
- Test tools isolated
- Test new agent and tools locally
- Deploy agent and tools as the ai-service to watsonx.ai
2. Current situation
Currently, I don't see any chance to work with my agent locally, when I going to use the CLI.
watsonx-ai --help
Usage: watsonx-ai [OPTIONS] COMMAND [ARGS]...
Entry point for the CLI.
Args: version (bool): If set to True, prints the CLI version and exits.
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version -v Print the current CLI version. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────╮
│ template Explore, download and try-out the template. │
│ service Work with deployed templates. │
│ app Build & run an UI playground. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@royderks
Hi @thomassuedbroecker! To execute the template locally you have to run the below command:
$ watsonx-ai template invoke "Hello!”
This is also described in the help section, which you can view by running:
$ watsonx-ai template --help
For more information about the CLI, you can check the documentation on PyPI: IBM watsonx.ai CLI for Agents
@KajetanOzog This doesn't work for me!
This doesn't work for me!
Could you please provide more information ?. What's the error you are experiencing ? How to recreate the issue ?.
Hi @LukaszCmielowski, from my perspective it is simple to reproduce:
Use a clean machine with no configuration for watsonx.ai and the Secret Manager.
Follow for example the steps in the related GitHub to set up the local configuration: https://github.com/IBM/watsonx-developer-hub/tree/main/agents/community/langgraph-graph-rag
You will notice that there is no information on how to use and set up the Secret Manager on IBM Cloud for local execution. (BTW, there is no Public Endpoint OOTB for the Secret Manager, as far as I have discovered.) So a local execution for the CLI will never work.
CC: @KajetanOzog @Mateusz-Switala
@thomassuedbroecker We've recently added information to Graph RAG Readme on how to set up IBM Cloud Secret Manager and store secrets - https://github.com/IBM/watsonx-developer-hub/tree/main/agents/community/langgraph-graph-rag#-modifying-and-configuring-the-template In addition, if you set env variable NEO4J_CONN_ARGS_FROM_ENV to "True", the neo4j connection arguments will be retrieved from the environment.