[GH-ISSUE #16293] feat: A env manager for tools and functions #56517

Closed
opened 2026-05-05 19:34:55 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @Bhargav-Ravinuthala on GitHub (Aug 5, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16293

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

We use to build a lot of workflows where we will be talking to other services. They needed to configured with connection strings and passwords hardcoded inside the tools and functions. Which is not ideal when giving access to others.

Desired Solution you'd like

Currently one way is we doing is go to environment append the env’s to existing one and restart the application so that we can use them using dotenv libraries. This is not right way to do this.

A environment manger user level would be ideal to configure this environment variables and use them inside the code that we writing inside the tools and functions.

Alternatives Considered

No response

Additional Context

No response

Originally created by @Bhargav-Ravinuthala on GitHub (Aug 5, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16293 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description We use to build a lot of workflows where we will be talking to other services. They needed to configured with connection strings and passwords hardcoded inside the tools and functions. Which is not ideal when giving access to others. ### Desired Solution you'd like Currently one way is we doing is go to environment append the env’s to existing one and restart the application so that we can use them using dotenv libraries. This is not right way to do this. A environment manger user level would be ideal to configure this environment variables and use them inside the code that we writing inside the tools and functions. ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@rgaricano commented on GitHub (Aug 5, 2025):

as a settings reg var?
e.g. a reg[] variable in scr/lib/store/index.ts to store values as {"variablename", value}? similar but in backend/config.py? both linked?

<!-- gh-comment-id:3154063686 --> @rgaricano commented on GitHub (Aug 5, 2025): as a settings reg var? e.g. a reg[] variable in scr/lib/store/index.ts to store values as {"variablename", value}? similar but in backend/config.py? both linked?
Author
Owner

@Bhargav-Ravinuthala commented on GitHub (Aug 5, 2025):

Iam thinking something like we need to create a new environment_variables table in db to store user-specific configuration values for tools and functions. When users configure environment variables through the UI (like API keys, database URLs), these values get encrypted and stored in the database linked to their user ID. Tools then retrieve these values at runtime instead of using hardcoded credentials

<!-- gh-comment-id:3154102575 --> @Bhargav-Ravinuthala commented on GitHub (Aug 5, 2025): Iam thinking something like we need to create a new environment_variables table in db to store user-specific configuration values for tools and functions. When users configure environment variables through the UI (like API keys, database URLs), these values get encrypted and stored in the database linked to their user ID. Tools then retrieve these values at runtime instead of using hardcoded credentials
Author
Owner

@rgaricano commented on GitHub (Aug 5, 2025):

then a user.reg attribute?

<!-- gh-comment-id:3154163424 --> @rgaricano commented on GitHub (Aug 5, 2025): then a user.reg attribute?
Author
Owner

@Bhargav-Ravinuthala commented on GitHub (Aug 5, 2025):

Hmmm can be doable but JSON blob storage in a user registry attribute creates database design issues: it’s harder to query specific variables & lacks referential integrity, can’t be indexed efficiently, requires complex JSON manipulation for updates, and violates normalisation by mixing user and configuration data

<!-- gh-comment-id:3154180842 --> @Bhargav-Ravinuthala commented on GitHub (Aug 5, 2025): Hmmm can be doable but JSON blob storage in a user registry attribute creates database design issues: it’s harder to query specific variables & lacks referential integrity, can’t be indexed efficiently, requires complex JSON manipulation for updates, and violates normalisation by mixing user and configuration data
Author
Owner

@rgaricano commented on GitHub (Aug 5, 2025):

other way is that function store that vars in own config, linking with user_id, but it is going to have similar problems.

<!-- gh-comment-id:3154205535 --> @rgaricano commented on GitHub (Aug 5, 2025): other way is that function store that vars in own config, linking with user_id, but it is going to have similar problems.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56517