-
Notifications
You must be signed in to change notification settings - Fork 20.3k
Open
2 / 32 of 3 issues completedOpen
2 / 32 of 3 issues completed
Copy link
Labels
staleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed💪 enhancementNew feature or requestNew feature or request
Description
- I have read the Contributing Guide and Language Policy.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I’m building workflow-based apps where nodes depend on services like HTTP clients, memory systems, and RAG/retrieval. Right now those dependencies are effectively fixed or global, so swapping implementations per workflow/app is difficult and testing nodes requires patching globals. I want a simple injection mechanism so nodes can receive dependencies explicitly and I can choose implementations per workflow without forking nodes or adding ad‑hoc conditionals.
2. Additional context or comments
Proposal (minimal DI approach):
- Use constructor injection for node dependencies (e.g.,
HttpClient,MemoryStore,RagRetriever). - Update
node_factoryto resolve and pass these dependencies when instantiating nodes. - Keep default behavior unchanged by providing default implementations in
node_factoryif no overrides are configured. - Allow configuration (initially internal) to choose alternative implementations per workflow/app/run.
- Focus on a small set of core dependencies first (HTTP client + memory + RAG), expand later.
Acceptance criteria (minimal scope):
- Existing workflows continue to run without config changes.
- Nodes can declare dependencies in their constructor.
node_factoryinjects defaults or configured implementations.- Unit tests for node instantiation + dependency resolution paths.
Notes:
- This keeps DI centralized and avoids a heavy framework; it’s a targeted change to
node_factoryplus constructor signatures.
3. Can you help us with this feature?
- I am interested in contributing to this feature.
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
staleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed💪 enhancementNew feature or requestNew feature or request