From b2739010392b9168dd83f46ee7e436118425f9e8 Mon Sep 17 00:00:00 2001 From: demo-bot Date: Mon, 13 Apr 2026 20:01:50 +0000 Subject: [PATCH] agent-factory: generate agent auto-retrieve-files-from-a-reposito --- app/nodes/core_node.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/nodes/core_node.py b/app/nodes/core_node.py index 68b8475..67e3e43 100644 --- a/app/nodes/core_node.py +++ b/app/nodes/core_node.py @@ -2,6 +2,13 @@ async def process(state: dict) -> dict: """ This node retrieves files from a repository based on the provided URL and update scope. It uses an LLM to analyze and extract relevant workflow files from the repository. + + Input Schema: + - repository_url: The URL of the repository to retrieve files from. + - update_scope: The scope or context for the update (e.g., branch, directory). + + Output Schema: + - workflow_files: A list of workflow file names retrieved from the repository. """ from app.agent import llm from langchain_core.messages import SystemMessage, HumanMessage @@ -15,11 +22,11 @@ async def process(state: dict) -> dict: messages = [ SystemMessage(content="You are an assistant that retrieves workflow files from a repository."), - HumanMessage(content=f"Repository URL: {repository_url}\nUpdate Scope: {update_scope}") + HumanMessage(content=f"Retrieve workflow files from the repository at {repository_url} within the scope '{update_scope}'.") ] response = await llm.ainvoke(messages) - workflow_files = response.content.splitlines() # Assuming the LLM returns file names as newline-separated strings. + workflow_files = response.content.splitlines() # Assuming the response lists files line by line. return {"workflow_files": workflow_files, "phase": "complete"} except Exception as exc: