-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(agent): added workflow, kb, and function as a tool for agent block, fix keyboard nav in tool input #2107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR adds workflow, knowledge base, and function tools as agent block capabilities, along with keyboard navigation fixes in the tool input component. Key Changes:
Implementation Quality:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant AgentBlock
participant ToolInput
participant ToolCommand
participant WorkflowSelector
participant WorkflowAPI
participant LLM
participant WorkflowExecutor
Note over User,WorkflowExecutor: Agent Tool Configuration Flow
User->>AgentBlock: Configure agent tools
AgentBlock->>ToolInput: Render tool selection UI
ToolInput->>ToolCommand: Display tool command palette
User->>ToolCommand: Search and select tool<br/>(workflow/kb/function)
alt Workflow Tool Selected
ToolCommand->>ToolInput: Add workflow_executor tool
ToolInput->>WorkflowSelector: Render workflow selector
User->>WorkflowSelector: Select workflow
WorkflowSelector->>WorkflowAPI: Fetch workflow details
WorkflowAPI-->>WorkflowSelector: Return workflow input schema
WorkflowSelector->>ToolInput: Show input mapper for selected workflow
User->>ToolInput: Configure input field mappings
else Knowledge Base Tool Selected
ToolCommand->>ToolInput: Add knowledge_search tool
ToolInput->>ToolInput: Render KB selector & search params
User->>ToolInput: Select KB and configure search
else Function Tool Selected
ToolCommand->>ToolInput: Add function_execute tool
ToolInput->>ToolInput: Render code editor
User->>ToolInput: Write JavaScript code
end
Note over User,WorkflowExecutor: Runtime Execution Flow
User->>AgentBlock: Execute workflow
AgentBlock->>LLM: Send prompt with tool schemas
Note over AgentBlock,LLM: createLLMToolSchema filters<br/>user-provided params
LLM->>LLM: Determine which tool to use
alt LLM selects workflow_executor
LLM-->>AgentBlock: Tool call with inputMapping
AgentBlock->>WorkflowExecutor: Execute child workflow
WorkflowExecutor->>WorkflowAPI: POST /api/workflows/{id}/execute
WorkflowAPI-->>WorkflowExecutor: Return execution result
WorkflowExecutor-->>AgentBlock: Return formatted output
else LLM selects knowledge_search
LLM-->>AgentBlock: Tool call with query
AgentBlock->>WorkflowAPI: POST /api/knowledge/search
WorkflowAPI-->>AgentBlock: Return search results
else LLM selects function_execute
LLM-->>AgentBlock: Tool call with code
AgentBlock->>WorkflowAPI: POST /api/function/execute
WorkflowAPI-->>AgentBlock: Return execution result
end
AgentBlock-->>LLM: Provide tool results
LLM-->>User: Generate final response
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
12 files reviewed, 1 comment
...components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx
Outdated
Show resolved
Hide resolved
73241c1 to
118c639
Compare
|
@greptile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16 files reviewed, no comments
Summary
Type of Change
Testing
Tested manually
Checklist