[GH-ISSUE #19] [Enhancement]: ai api #9

Closed
opened 2026-06-06 22:07:54 -04:00 by yindo · 10 comments
Owner

Originally created by @SharkJ0001 on GitHub (Mar 25, 2025).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/19

Originally assigned to: @asdek on GitHub.

Target Component

Core Services (Frontend UI/Backend API)

Enhancement Description

Hello, this openai is charged, can it be replaced with other AI APIs such as Deepseek or Tongyi that can be used for free?

Technical Details

No response

Designs and Mockups

No response

Alternative Solutions

No response

Verification

  • I have checked that this enhancement hasn't been already proposed
  • This enhancement aligns with PentAGI's goal of autonomous penetration testing
  • I have considered the security implications of this enhancement
  • I have provided clear use cases and benefits
Originally created by @SharkJ0001 on GitHub (Mar 25, 2025). Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/19 Originally assigned to: @asdek on GitHub. ### Target Component Core Services (Frontend UI/Backend API) ### Enhancement Description Hello, this openai is charged, can it be replaced with other AI APIs such as Deepseek or Tongyi that can be used for free? ### Technical Details _No response_ ### Designs and Mockups _No response_ ### Alternative Solutions _No response_ ### Verification - [ ] I have checked that this enhancement hasn't been already proposed - [ ] This enhancement aligns with PentAGI's goal of autonomous penetration testing - [ ] I have considered the security implications of this enhancement - [ ] I have provided clear use cases and benefits
yindo added the enhancementhelp wanted labels 2026-06-06 22:07:54 -04:00
yindo closed this issue 2026-06-06 22:07:54 -04:00
Author
Owner

@asdek commented on GitHub (Mar 26, 2025):

Hello @SharkJ0001

Thank you for reaching out and for your interest in PentAGI!

Regarding the use of free models, you might consider experimenting with OpenRouter. However, please note that PentAGI's logic is tailored towards the use of functions, so you'll need to independently select an appropriate set of models capable of handling the tasks within the attack simulation.

These simulations require models with extensive knowledge bases and the ability to execute functions that are typically inherent to big LLMs. As a result, most open-source models freely available on the OpenRouter platform may not be suitable for these specific tasks.

We would also like to highlight that PentAGI supports the DeepSeek API, which you can utilize at a significantly lower cost compared to services like OpenAI or Anthropic. Our project includes configuration files that you can use to integrate PentAGI with these models effectively to achieve your target objectives.

Here is a list of configuration files you might find helpful:

Additionally, you can review the results of our testing and replicate them on your own infrastructure using your configuration files. Below are examples of test reports for the aforementioned configuration files:

To conduct testing yourself, please follow the instructions provided in the Testing LLM Agents section of our README.

Connecting OpenRouter, DeepInfra, or DeepSeek API:

To integrate these services with your PentAGI installation, set the following environment variables in your .env file. When launching the simulation, select custom as the Provider in the UI.

LLM_SERVER_URL=https://openrouter.ai/api/v1      # or https://api.deepinfra.com/v1/openai or https://api.deepseek.com
LLM_SERVER_KEY=your_api_key
LLM_SERVER_MODEL=                                # Leave empty, as models are specified in the config
LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/openrouter.provider.yml  # or deepinfra.provider.yml or deepseek.provider.yml

Based on our measurements, using DeepSeek can reduce costs by up to 5 times compared to running the simulation with the OpenAI API. However, please be aware that the execution speed of the simulation will be significantly slower than when using OpenAI or Anthropic.

If you have any further questions or need assistance with the configuration, please don't hesitate to ask.

<!-- gh-comment-id:2755840895 --> @asdek commented on GitHub (Mar 26, 2025): Hello @SharkJ0001 Thank you for reaching out and for your interest in PentAGI! Regarding the use of free models, you might consider experimenting with **OpenRouter**. However, please note that PentAGI's logic is tailored towards the use of functions, so you'll need to independently select an appropriate set of models capable of handling the tasks within the attack simulation. These simulations require models with extensive knowledge bases and the ability to execute functions that are typically inherent to big LLMs. As a result, most open-source models freely available on the OpenRouter platform may not be suitable for these specific tasks. We would also like to highlight that PentAGI supports the **DeepSeek API**, which you can utilize at a significantly lower cost compared to services like OpenAI or Anthropic. Our project includes configuration files that you can use to integrate PentAGI with these models effectively to achieve your target objectives. Here is a list of configuration files you might find helpful: - [openrouter.provider.yml](https://github.com/vxcontrol/pentagi/blob/master/examples/configs/openrouter.provider.yml) - [deepinfra.provider.yml](https://github.com/vxcontrol/pentagi/blob/master/examples/configs/deepinfra.provider.yml) - [deepseek.provider.yml](https://github.com/vxcontrol/pentagi/blob/master/examples/configs/deepseek.provider.yml) Additionally, you can review the results of our testing and replicate them on your own infrastructure using your configuration files. Below are examples of test reports for the aforementioned configuration files: - [openrouter-report.md](https://github.com/vxcontrol/pentagi/blob/master/examples/tests/openrouter-report.md) - [deepinfra-report.md](https://github.com/vxcontrol/pentagi/blob/master/examples/tests/deepinfra-report.md) - [deepseek-report.md](https://github.com/vxcontrol/pentagi/blob/master/examples/tests/deepseek-report.md) To conduct testing yourself, please follow the instructions provided in the [Testing LLM Agents](https://github.com/vxcontrol/pentagi#-testing-llm-agents) section of our README. **Connecting OpenRouter, DeepInfra, or DeepSeek API:** To integrate these services with your PentAGI installation, set the following environment variables in your `.env` file. When launching the simulation, select `custom` as the Provider in the UI. ```env LLM_SERVER_URL=https://openrouter.ai/api/v1 # or https://api.deepinfra.com/v1/openai or https://api.deepseek.com LLM_SERVER_KEY=your_api_key LLM_SERVER_MODEL= # Leave empty, as models are specified in the config LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/openrouter.provider.yml # or deepinfra.provider.yml or deepseek.provider.yml ``` Based on our measurements, using DeepSeek can reduce costs by up to **5 times** compared to running the simulation with the OpenAI API. However, please be aware that the execution speed of the simulation will be significantly slower than when using OpenAI or Anthropic. If you have any further questions or need assistance with the configuration, please don't hesitate to ask.
Author
Owner

@liujinpen commented on GitHub (Mar 27, 2025):

@asdek Hello, I have run docker compose in windows environment and successfully started.
In accordance with the above specifications, my configuration is as follows, but after start-up cannot choose 'custom UI interface, the console view network request found https://localhost:8443/api/v1/graphql return values only' openai '. Does it not work in windows?

LLM Providers
OPEN_AI_KEY=key
OPEN_AI_SERVER_URL=https://api.openai.com/v1

Custom LLM provider
LLM_SERVER_URL=https://api.deepseek.com
LLM_SERVER_KEY=key
LLM_SERVER_MODEL=
LLM_SERVER_CONFIG_PATH=LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/deepseek.provider.yml

<!-- gh-comment-id:2757092608 --> @liujinpen commented on GitHub (Mar 27, 2025): @asdek Hello, I have run docker compose in windows environment and successfully started. In accordance with the above specifications, my configuration is as follows, but after start-up cannot choose 'custom UI interface, the console view network request found https://localhost:8443/api/v1/graphql return values only' openai '. Does it not work in windows? LLM Providers OPEN_AI_KEY=key OPEN_AI_SERVER_URL=https://api.openai.com/v1 Custom LLM provider LLM_SERVER_URL=https://api.deepseek.com LLM_SERVER_KEY=key LLM_SERVER_MODEL= LLM_SERVER_CONFIG_PATH=LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/deepseek.provider.yml
Author
Owner

@asdek commented on GitHub (Mar 27, 2025):

Hello @liujinpen

Thanks for pointing out this inaccuracy.

This was a bug caused by the LLM_SERVER_MODEL variable not being set in your .env file. Even if LLM_SERVER_CONFIG_PATH was specified, the Custom Provider would not initialize without a value for LLM_SERVER_MODEL.

I have fixed this issue in commit 333bbf6. To resolve this problem on your end, you have two options:

  1. Set the LLM_SERVER_MODEL variable: Add any value to the LLM_SERVER_MODEL variable in your .env file. For example:

    LLM_SERVER_MODEL=your_model_name
    
  2. Update the PentAGI Docker image: Pull the latest version of the Docker image where the issue has been fixed. Run the following commands:

    docker compose pull
    docker compose up -d
    

If you continue to experience any issues or have further questions, please let me know.

<!-- gh-comment-id:2758668517 --> @asdek commented on GitHub (Mar 27, 2025): Hello @liujinpen Thanks for pointing out this inaccuracy. This was a bug caused by the `LLM_SERVER_MODEL` variable not being set in your `.env` file. Even if `LLM_SERVER_CONFIG_PATH` was specified, the Custom Provider would not initialize without a value for `LLM_SERVER_MODEL`. I have fixed this issue in [commit 333bbf6](https://github.com/vxcontrol/pentagi/commit/333bbf6e2811091d61108a061c576cf03d371135). To resolve this problem on your end, you have two options: 1. **Set the `LLM_SERVER_MODEL` variable**: Add any value to the `LLM_SERVER_MODEL` variable in your `.env` file. For example: ``` LLM_SERVER_MODEL=your_model_name ``` 2. **Update the PentAGI Docker image**: Pull the latest version of the Docker image where the issue has been fixed. Run the following commands: ``` docker compose pull docker compose up -d ``` If you continue to experience any issues or have further questions, please let me know.
Author
Owner

@liujinpen commented on GitHub (Mar 27, 2025):

@asdek Thank you very much. It's up and running!👍👍👍 Now he can answer my simple conversation. In addition, after I switched to 'custom', when I asked 'help me check the local port opening status', the UI kept loping, and the log showed that the openapi related interface could not be accessed (because I only had the deepseek key). Do applications have to use openapi capabilities? Because I found out that I have to fill in the OPEN_AI_KEY parameter at startup (and I just filled it in randomly).If only deepseek-chat is configured, the program's capabilities are limited, right?🤔

2025-03-28 09:48:52 time="2025-03-28T01:48:52Z" level=warning msg="failed to exec function" agent=custom args="{\"question\":\"What tools or commands can be used to check open ports on a local machine in a Debian-based system?\",\"type\":\"tool\",\"message\":\"Searching for tools or commands to check open ports on a Debian-based system.\"}" error="failed to execute handler: failed to search answer for question: error embedding query: failed to create openai embeddings: send request: Post \"https://api.openai.com/v1/embeddings\": dial tcp 128.242.245.157:443: connect: connection refused" flow_id=5 msg_chain_id=13 subtask_id="<nil>" task_id=0xc00189eef0

Image

<!-- gh-comment-id:2759999134 --> @liujinpen commented on GitHub (Mar 27, 2025): @asdek Thank you very much. It's up and running!👍👍👍 Now he can answer my simple conversation. In addition, after I switched to 'custom', when I asked 'help me check the local port opening status', the UI kept loping, and the log showed that the openapi related interface could not be accessed (because I only had the deepseek key). Do applications have to use openapi capabilities? Because I found out that I have to fill in the OPEN_AI_KEY parameter at startup (and I just filled it in randomly).If only deepseek-chat is configured, the program's capabilities are limited, right?🤔 ```txt 2025-03-28 09:48:52 time="2025-03-28T01:48:52Z" level=warning msg="failed to exec function" agent=custom args="{\"question\":\"What tools or commands can be used to check open ports on a local machine in a Debian-based system?\",\"type\":\"tool\",\"message\":\"Searching for tools or commands to check open ports on a Debian-based system.\"}" error="failed to execute handler: failed to search answer for question: error embedding query: failed to create openai embeddings: send request: Post \"https://api.openai.com/v1/embeddings\": dial tcp 128.242.245.157:443: connect: connection refused" flow_id=5 msg_chain_id=13 subtask_id="<nil>" task_id=0xc00189eef0 ``` ![Image](https://github.com/user-attachments/assets/302d400d-f3ac-4d07-a539-c53f1fb54cf5)
Author
Owner

@asdek commented on GitHub (Mar 28, 2025):

Hello @liujinpen

I'm glad to hear that you've got the application up and running and that it's working! 😊

Regarding the Issue with the Custom Provider:

The problem you're encountering after switching to the 'custom' provider is due to how the application handles text embeddings. By default, the application uses OpenAI's embedding models for vectorizing text, even when you're using a different LLM provider like DeepSeek. This is reflected in the code here: custom.go.

Why OpenAI Embeddings are Used:

At the initial stage of development, we decided to use a unified model (specifically OpenAI's) for text vectorization across all providers. This approach ensures that the agent's memory and knowledge base function correctly and consistently. The agent's memory stores various valuable information such as manuals, code snippets, software installation scripts, and more.

By using a consistent embedding model, agents can efficiently search their internal vector database for relevant knowledge before resorting to external internet searches. This design choice improves performance and reduces unnecessary internet queries.

Issue with DeepSeek and Embeddings:

The DeepSeek API doesn't currently provide models for text embeddings. As a result, even when you configure DeepSeek as your LLM provider, the application still attempts to use OpenAI's embedding models for processing, which requires a valid OpenAI API key.

Since you don't have a valid OpenAI API key (and only filled in a random value), the application cannot access the OpenAI embeddings API. This leads to the UI looping and the errors you're seeing in the logs:

failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp ...: connect: connection refused

Temporary Solution:

To resolve this issue for now, you can provide a valid OpenAI API key in your .env configuration file:

OPEN_AI_KEY=your_valid_openai_api_key

This will allow the application to access OpenAI's embedding models for text vectorization, even while using DeepSeek for generating responses.

Upcoming Improvements:

If you that you may prefer not to use OpenAI's services or API keys. I'll try to add the ability to choose a custom embedding provider within the application. This means you'll be able to specify an alternative embedding service that suits your needs and doesn't rely on OpenAI.

I anticipate having this feature implemented within the next day or two. Once it's available, you can configure a different embedding provider, and the application will not require an OpenAI API key.

Recommended Updates:

In addition, I made several improvements to the application's interface recently to enhance stability and performance. I recommend updating your application to the latest version to benefit from these updates. You can do this by running:

docker compose pull
docker compose up -d

This will pull the latest Docker images and restart your containers with the updated code.

Have a nice day! 😉

<!-- gh-comment-id:2760398809 --> @asdek commented on GitHub (Mar 28, 2025): Hello @liujinpen I'm glad to hear that you've got the application up and running and that it's working! 😊 **Regarding the Issue with the Custom Provider:** The problem you're encountering after switching to the 'custom' provider is due to how the application handles text embeddings. By default, the application uses OpenAI's embedding models for vectorizing text, even when you're using a different LLM provider like DeepSeek. This is reflected in the code here: [custom.go](https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/providers/custom/custom.go#L49-L62). **Why OpenAI Embeddings are Used:** At the initial stage of development, we decided to use a unified model (specifically OpenAI's) for text vectorization across all providers. This approach ensures that the agent's memory and knowledge base function correctly and consistently. The agent's memory stores various valuable information such as manuals, code snippets, software installation scripts, and more. By using a consistent embedding model, agents can efficiently search their internal vector database for relevant knowledge before resorting to external internet searches. This design choice improves performance and reduces unnecessary internet queries. **Issue with DeepSeek and Embeddings:** The DeepSeek API doesn't currently provide models for text embeddings. As a result, even when you configure DeepSeek as your LLM provider, the application still attempts to use OpenAI's embedding models for processing, which requires a valid OpenAI API key. Since you don't have a valid OpenAI API key (and only filled in a random value), the application cannot access the OpenAI embeddings API. This leads to the UI looping and the errors you're seeing in the logs: ``` failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp ...: connect: connection refused ``` **Temporary Solution:** To resolve this issue for now, you can provide a valid OpenAI API key in your `.env` configuration file: ``` OPEN_AI_KEY=your_valid_openai_api_key ``` This will allow the application to access OpenAI's embedding models for text vectorization, even while using DeepSeek for generating responses. **Upcoming Improvements:** If you that you may prefer not to use OpenAI's services or API keys. I'll try to add the ability to choose a custom embedding provider within the application. This means you'll be able to specify an alternative embedding service that suits your needs and doesn't rely on OpenAI. I anticipate having this feature implemented within the next day or two. Once it's available, you can configure a different embedding provider, and the application will not require an OpenAI API key. **Recommended Updates:** In addition, I made several improvements to the application's interface recently to enhance stability and performance. I recommend updating your application to the latest version to benefit from these updates. You can do this by running: ```bash docker compose pull docker compose up -d ``` This will pull the latest Docker images and restart your containers with the updated code. Have a nice day! 😉
Author
Owner

@liujinpen commented on GitHub (Mar 28, 2025):

@asdek Thank you for your detailed reply. I will continue to pay attention to this project and update it in time. Thanks again!👍👍👍

<!-- gh-comment-id:2760420325 --> @liujinpen commented on GitHub (Mar 28, 2025): @asdek Thank you for your detailed reply. I will continue to pay attention to this project and update it in time. Thanks again!👍👍👍
Author
Owner

@asdek commented on GitHub (Apr 1, 2025):

Hello @liujinpen

I replied in https://github.com/vxcontrol/pentagi/issues/21#issuecomment-2764292561 and after 'embedding provider' fixes can't reproduce this issue, please check it on your side

I hope that it's will be helpful for your case.

<!-- gh-comment-id:2768706987 --> @asdek commented on GitHub (Apr 1, 2025): Hello @liujinpen I replied in https://github.com/vxcontrol/pentagi/issues/21#issuecomment-2764292561 and after 'embedding provider' fixes can't reproduce this issue, please check it on your side I hope that it's will be helpful for your case.
Author
Owner

@liujinpen commented on GitHub (Apr 1, 2025):

@asdek Thank you very much. I think it should be fine. I'll give it a try👍

<!-- gh-comment-id:2768753081 --> @liujinpen commented on GitHub (Apr 1, 2025): @asdek Thank you very much. I think it should be fine. I'll give it a try👍
Author
Owner

@summersblue commented on GitHub (Apr 1, 2025):

I met the same problem, I have already run :docker compose pull
docker compose up -d ,and .env is as follows:## LLM Providers
OPEN_AI_KEY=sk-deepseekkey
OPEN_AI_SERVER_URL=https://api.deepseek.com

Custom LLM provider

LLM_SERVER_URL=https://api.deepseek.com/
LLM_SERVER_KEY=sk-deepseekkey
LLM_SERVER_MODEL=deepseek-chat
LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/deepseek.provider.yml
it can run, and docker logs -f pentagi, many error logs as follows: time="2025-04-02T01:26:23Z" level=error msg="failed to get pentester result" error="failed to get task pentester result: failed to exec function 'search': failed to execute handler: failed to get searcher result: failed to get task searcher result: failed to exec function 'search_answer': failed to execute handler: failed to search answer for question: error embedding query: failed to create openai embeddings: API returned unexpected status code: 404: "

<!-- gh-comment-id:2771199524 --> @summersblue commented on GitHub (Apr 1, 2025): I met the same problem, I have already run :docker compose pull docker compose up -d ,and .env is as follows:## LLM Providers OPEN_AI_KEY=sk-deepseekkey OPEN_AI_SERVER_URL=https://api.deepseek.com ## Custom LLM provider LLM_SERVER_URL=https://api.deepseek.com/ LLM_SERVER_KEY=sk-deepseekkey LLM_SERVER_MODEL=deepseek-chat LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/deepseek.provider.yml it can run, and docker logs -f pentagi, many error logs as follows: time="2025-04-02T01:26:23Z" level=error msg="failed to get pentester result" error="failed to get task pentester result: failed to exec function 'search': failed to execute handler: failed to get searcher result: failed to get task searcher result: failed to exec function 'search_answer': failed to execute handler: failed to search answer for question: error embedding query: failed to create openai embeddings: API returned unexpected status code: 404: "
Author
Owner

@asdek commented on GitHub (Apr 2, 2025):

Hello @summersblue

Unfortunately, the system settings you've provided are not correct. The DeepSeek provider is not fully compatible with the OpenAI provider; specifically, it does not offer the /embeddings endpoint. This is why you're receiving a 404 error from the provider.

In this comment, I have detailed all the changes and provided a list of supported embedding providers. Please review this message to better understand how PentAGI operates.

Default Behavior:

If you do not set the following environment variables:

EMBEDDING_PROVIDER=
EMBEDDING_MODEL=
EMBEDDING_URL=
EMBEDDING_KEY=

and you do not specify a valid key in the OPEN_AI_KEY variable, then the vector storage in RAG (Retrieval Augmented Generation) format will be disabled.

Below is a short list of commands you can use to test the agents' logic, including those that interact with the vector storage. This is a useful tool for debugging and understanding any issues you might be experiencing.


Commands to Test Agent Logic:

  • List all flows:

    docker exec -it pentagi /opt/pentagi/bin/ftester describe -verbose
    
  • List tasks and subtasks within a flow:

    docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 describe
    
  • List available functions for testing:

    docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 -task 2 -subtask 18
    
  • Run the search_in_memory function in interactive mode (the utility will prompt you for necessary parameters):

    docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 -task 2 -subtask 18 search_in_memory
    
  • Get a list of parameters for a function by name:

    docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 -task 2 -subtask 18 search_in_memory -help
    

Note: The -task and -subtask arguments, if accepted by the function and specified before the function name, will be used, and you won't need to input them again.


Important:

In your case, since there is no valid embedding provider configured, the search_in_memory function should not be available. To enable it, you need to specify a valid embedding provider in your settings.

Embedding Provider Testing Utility:

I have also added a utility specifically for testing embedding providers, which can be run with the default configuration as follows:

docker exec -it pentagi /opt/pentagi/bin/etester

Expected Output:

Testing connection to PostgreSQL database...
OK
Testing pgvector extension...
OK
Testing embedding table existence...
OK
Testing embedder with single query...
OK (1536 dimensions)
Testing embedder with multiple documents...
OK (2 documents, 1536 dimensions each)

All tests passed successfully!

Additional Commands:

  • To get statistics about the accumulated knowledge in the vector storage:

    docker exec -it pentagi /opt/pentagi/bin/etester info
    
  • When changing the embedding provider, if the statistics indicate that you have data in the current storage, you need to either flush the current state:

    docker exec -it pentagi /opt/pentagi/bin/etester flush
    

    Note: Be cautious, as this will remove all existing embeddings.

  • Or reindex the storage (this will consume tokens, as all accumulated text will be sent again to obtain new vector representations):

    docker exec -it pentagi /opt/pentagi/bin/etester reindex
    

Searching the Vector Storage:

The utility also provides the ability to search the vector storage directly, bypassing the agents' logic. Please check the function's argument format before running:

docker exec -it pentagi /opt/pentagi/bin/etester search -help

Summary:

To resolve your issue, you need to configure a valid embedding provider that supports the required endpoints. Please refer to the list of supported embedding providers and update your environment variables accordingly.

If you have any further questions or need assistance, feel free to reach out.

<!-- gh-comment-id:2771690358 --> @asdek commented on GitHub (Apr 2, 2025): Hello @summersblue Unfortunately, the system settings you've provided are not correct. The DeepSeek provider is not fully compatible with the OpenAI provider; specifically, it does not offer the `/embeddings` endpoint. This is why you're receiving a 404 error from the provider. In this [comment](https://github.com/vxcontrol/pentagi/issues/21#issuecomment-2764292561), I have detailed all the changes and provided a list of supported embedding providers. Please review this message to better understand how PentAGI operates. **Default Behavior:** If you do not set the following environment variables: ``` EMBEDDING_PROVIDER= EMBEDDING_MODEL= EMBEDDING_URL= EMBEDDING_KEY= ``` and you do not specify a valid key in the `OPEN_AI_KEY` variable, then the vector storage in RAG (Retrieval Augmented Generation) format will be disabled. Below is a short list of commands you can use to test the agents' logic, including those that interact with the vector storage. This is a useful tool for debugging and understanding any issues you might be experiencing. --- ### **Commands to Test Agent Logic:** - **List all flows:** ```bash docker exec -it pentagi /opt/pentagi/bin/ftester describe -verbose ``` - **List tasks and subtasks within a flow:** ```bash docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 describe ``` - **List available functions for testing:** ```bash docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 -task 2 -subtask 18 ``` - **Run the `search_in_memory` function in interactive mode (the utility will prompt you for necessary parameters):** ```bash docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 -task 2 -subtask 18 search_in_memory ``` - **Get a list of parameters for a function by name:** ```bash docker exec -it pentagi /opt/pentagi/bin/ftester -flow 5 -task 2 -subtask 18 search_in_memory -help ``` *Note:* The `-task` and `-subtask` arguments, if accepted by the function and specified before the function name, will be used, and you won't need to input them again. --- **Important:** In your case, since there is no valid embedding provider configured, the `search_in_memory` function should not be available. To enable it, you need to specify a valid embedding provider in your settings. **Embedding Provider Testing Utility:** I have also added a utility specifically for testing embedding providers, which can be run with the default configuration as follows: ```bash docker exec -it pentagi /opt/pentagi/bin/etester ``` **Expected Output:** ``` Testing connection to PostgreSQL database... OK Testing pgvector extension... OK Testing embedding table existence... OK Testing embedder with single query... OK (1536 dimensions) Testing embedder with multiple documents... OK (2 documents, 1536 dimensions each) All tests passed successfully! ``` **Additional Commands:** - **To get statistics about the accumulated knowledge in the vector storage:** ```bash docker exec -it pentagi /opt/pentagi/bin/etester info ``` - **When changing the embedding provider, if the statistics indicate that you have data in the current storage, you need to either flush the current state:** ```bash docker exec -it pentagi /opt/pentagi/bin/etester flush ``` *Note:* Be cautious, as this will remove all existing embeddings. - **Or reindex the storage (this will consume tokens, as all accumulated text will be sent again to obtain new vector representations):** ```bash docker exec -it pentagi /opt/pentagi/bin/etester reindex ``` **Searching the Vector Storage:** The utility also provides the ability to search the vector storage directly, bypassing the agents' logic. Please check the function's argument format before running: ```bash docker exec -it pentagi /opt/pentagi/bin/etester search -help ``` --- **Summary:** To resolve your issue, you need to configure a valid embedding provider that supports the required endpoints. Please refer to the [list of supported embedding providers](https://github.com/vxcontrol/pentagi/issues/21#issuecomment-2764292561) and update your environment variables accordingly. If you have any further questions or need assistance, feel free to reach out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#9