[GH-ISSUE #21] System loop execution #11

Closed
opened 2026-06-06 22:07:56 -04:00 by yindo · 2 comments
Owner

Originally created by @afooldeer on GitHub (Mar 27, 2025).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/21

I built the whole environment and the system could run successfully, but when I assigned tasks to him, he would always get stuck ina task loop and execute a command repeatedly in terminal. Is there a problem with my prompt or is there a configuration problem with the environment?
If prompt has a problem, please give me an example.
I configured the environment according to the document, the only difference is that I used Deepseek api.Whether that could be deepseek's problem?

Image

Image

Originally created by @afooldeer on GitHub (Mar 27, 2025). Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/21 I built the whole environment and the system could run successfully, but when I assigned tasks to him, he would always get stuck ina task loop and execute a command repeatedly in terminal. Is there a problem with my prompt or is there a configuration problem with the environment? If prompt has a problem, please give me an example. I configured the environment according to the document, the only difference is that I used **Deepseek** api.Whether that could be deepseek's problem? ![Image](https://github.com/user-attachments/assets/d0f7d74a-7082-492e-b2fb-de8526787013) ![Image](https://github.com/user-attachments/assets/9b52f7b5-9cc3-4d28-bd28-dfd9986241b0)
yindo added the enhancementbug labels 2026-06-06 22:07:56 -04:00
yindo closed this issue 2026-06-06 22:07:56 -04:00
Author
Owner

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

Hello @afooldeer

Yes, this is a known issue with all LLMs, which can be resolved by adjusting the repetition_penalty parameter when configuring access to a specific model. If you're using Deepseek, you can use the provided config file deepseek.provider.yml or use it as a basis to create your own. After that, mount it inside the Docker container via a volume from the host file system. If you're using the default settings, your .env file should look like this:

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

By default, the path /opt/pentagi/conf/deepseek.provider.yml points to the file linked above in the repository, but it can be any file within the file system of the PentAGI container. You can mount it by modifying the docker-compose.yml file.

To avoid errors like the ones you're experiencing, the PentAGI backend includes a repeatingDetector that checks that functions are not repeated more than three times (code reference). However, it seems that in this case, it didn't work because the launch arguments differed slightly. You can click on the specific line to view the command execution details or check it in Langfuse.

You might try increasing the temperature value for the specific agent or adding a repetition_penalty according to the recommendations from the LLM provider or the service where the model is available.

To ensure your configuration is working correctly, you can run tests inside the PentAGI container:

docker exec -it pentagi /opt/pentagi/bin/ctester -verbose

This will use the environment variables from the .env file when the container was launched and provide you with a report in the console. You can also obtain a report file in Markdown format. More details are described in the README.md file.

<!-- gh-comment-id:2758372365 --> @asdek commented on GitHub (Mar 27, 2025): Hello @afooldeer Yes, this is a known issue with all LLMs, which can be resolved by adjusting the `repetition_penalty` parameter when configuring access to a specific model. If you're using Deepseek, you can use the provided config file [deepseek.provider.yml](https://github.com/vxcontrol/pentagi/blob/master/examples/configs/deepseek.provider.yml) or use it as a basis to create your own. After that, mount it inside the Docker container via a volume from the host file system. If you're using the default settings, your `.env` file should look like this: ``` LLM_SERVER_URL=https://api.deepseek.com LLM_SERVER_KEY=key LLM_SERVER_MODEL=deepseek-chat LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/deepseek.provider.yml ``` By default, the path `/opt/pentagi/conf/deepseek.provider.yml` points to the file linked above in the repository, but it can be any file within the file system of the PentAGI container. You can mount it by modifying the `docker-compose.yml` file. To avoid errors like the ones you're experiencing, the PentAGI backend includes a `repeatingDetector` that checks that functions are not repeated more than three times ([code reference](https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/providers/helpers.go#L17-L68)). However, it seems that in this case, it didn't work because the launch arguments differed slightly. You can click on the specific line to view the command execution details or check it in Langfuse. You might try increasing the `temperature` value for the specific agent or adding a `repetition_penalty` according to the recommendations from the LLM provider or the service where the model is available. To ensure your configuration is working correctly, you can run tests inside the PentAGI container: ```bash docker exec -it pentagi /opt/pentagi/bin/ctester -verbose ``` This will use the environment variables from the `.env` file when the container was launched and provide you with a report in the console. You can also obtain a report file in Markdown format. More details are described in the [README.md file](https://github.com/vxcontrol/pentagi#running-tests-in-a-production-environment).
Author
Owner

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

Hello @afooldeer,

Update on Embedding Providers:

I've recently made significant updates to PentAGI in PR #26, which adds support for several embedding providers. The supported embedding providers now include:

  • OpenAI
  • Ollama
  • Mistral
  • Jina
  • Hugging Face
  • Google AI
  • VoyageAI

In #24 user faced with the same issue so your case might be related to the embedding provider configuration, especially since DeepSeek doesn't support embeddings by default. The agents rely on embeddings for effective memory recall and task execution. Without proper embeddings, the agents may get stuck in loops or repeat commands.

Possible Solutions:

  1. Use an Alternative Embedding Provider:

    You can configure another embedding provider compatible with OpenAI's API. For instance, you might consider using Baichuan Text Embeddings. Here's how you can set it up in your .env file:

    EMBEDDING_PROVIDER=openai
    EMBEDDING_MODEL=Baichuan-Text-Embedding
    EMBEDDING_URL=https://api.baichuan-ai.com/v1
    EMBEDDING_KEY=your_baichuan_api_key
    EMBEDDING_BATCH_SIZE=100
    

    Make sure to replace your_baichuan_api_key with your actual Baichuan API key.

  2. Update the docker-compose.yml File:

    I've added the use of these embedding variables in the latest docker-compose.yml file. Please download the updated file from the master branch of the repository to ensure you have the latest changes.

  3. Test Your Embedding Configuration:

    If the above steps don't resolve the issue, you can test your embedding setup using the etester utility:

    • Run the Embedding Test:

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

      This command will attempt to connect to your configured embedding provider and test the embedding functionality. If there are any errors, please share the output so we can help diagnose the issue.

    • Check the Vector Store:

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

      If this command shows that there are documents in the vector store, you might need to flush or reindex the embeddings.

    • Flush or Reindex Embeddings:

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

      Flushing clears the existing embeddings, and reindexing rebuilds them based on your current configuration.

    For more detailed instructions, please refer to the Embedding Configuration and Testing section in the README.

Additional Options:

  • VoyageAI as an Embedding Provider:

    You might also consider using VoyageAI as your embedding provider. It's now supported and can be configured similarly in the .env file.

  • OpenAI-Compatible Providers:

    If you have access to other OpenAI-compatible embedding services, you can configure them using the same approach.

Let me know if you need any more assistance!

<!-- gh-comment-id:2764292561 --> @asdek commented on GitHub (Mar 29, 2025): Hello @afooldeer, **Update on Embedding Providers:** I've recently made significant updates to PentAGI in [PR #26](https://github.com/vxcontrol/pentagi/pull/26), which adds support for several embedding providers. The supported embedding providers now include: - **OpenAI** - **Ollama** - **Mistral** - **Jina** - **Hugging Face** - **Google AI** - **VoyageAI** In #24 user faced with the same issue so your case might be related to the embedding provider configuration, especially since DeepSeek doesn't support embeddings by default. The agents rely on embeddings for effective memory recall and task execution. Without proper embeddings, the agents may get stuck in loops or repeat commands. **Possible Solutions:** 1. **Use an Alternative Embedding Provider:** You can configure another embedding provider compatible with OpenAI's API. For instance, you might consider using [Baichuan Text Embeddings](https://platform.baichuan-ai.com/docs/text-Embedding). Here's how you can set it up in your `.env` file: ``` EMBEDDING_PROVIDER=openai EMBEDDING_MODEL=Baichuan-Text-Embedding EMBEDDING_URL=https://api.baichuan-ai.com/v1 EMBEDDING_KEY=your_baichuan_api_key EMBEDDING_BATCH_SIZE=100 ``` Make sure to replace `your_baichuan_api_key` with your actual Baichuan API key. 2. **Update the `docker-compose.yml` File:** I've added the use of these embedding variables in the latest `docker-compose.yml` file. Please download the updated file from the master branch of the repository to ensure you have the latest changes. 3. **Test Your Embedding Configuration:** If the above steps don't resolve the issue, you can test your embedding setup using the `etester` utility: - **Run the Embedding Test:** ```bash docker exec -it pentagi /opt/pentagi/bin/etester test ``` This command will attempt to connect to your configured embedding provider and test the embedding functionality. If there are any errors, please share the output so we can help diagnose the issue. - **Check the Vector Store:** ```bash docker exec -it pentagi /opt/pentagi/bin/etester info ``` If this command shows that there are documents in the vector store, you might need to flush or reindex the embeddings. - **Flush or Reindex Embeddings:** ```bash docker exec -it pentagi /opt/pentagi/bin/etester flush docker exec -it pentagi /opt/pentagi/bin/etester reindex ``` Flushing clears the existing embeddings, and reindexing rebuilds them based on your current configuration. For more detailed instructions, please refer to the [Embedding Configuration and Testing](https://github.com/vxcontrol/pentagi#-embedding-configuration-and-testing) section in the README. **Additional Options:** - **VoyageAI as an Embedding Provider:** You might also consider using VoyageAI as your embedding provider. It's now supported and can be configured similarly in the `.env` file. - **OpenAI-Compatible Providers:** If you have access to other OpenAI-compatible embedding services, you can configure them using the same approach. Let me know if you need any more assistance!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#11