Skip to content

feat: add agent node type with tool calling#29

Open
benzend wants to merge 5 commits into
mainfrom
feat/agent-builder
Open

feat: add agent node type with tool calling#29
benzend wants to merge 5 commits into
mainfrom
feat/agent-builder

Conversation

@benzend
Copy link
Copy Markdown
Owner

@benzend benzend commented Mar 22, 2026

Summary

  • Adds a new agent workflow node type that supports autonomous AI execution with an agentic loop
  • Agents can call existing integrations (email, Slack, HTTP, GitHub, etc.) and user-defined custom API endpoints as tools
  • Configurable model, temperature (0–2), max steps (1–20), system/user prompts with variable autocomplete
  • Full sidebar config panel with tool picker UI (integration checklist + custom API form)
  • Agent outputs (output, tool_calls, last_tool_result) available to downstream nodes via {{agent_label.field}}

New files

  • lib/agent-tools.ts — Bridges AgentToolConfig to Vercel AI SDK tool definitions
  • lib/agent-executor.ts — Core agent loop using generateText() + stopWhen(stepCountIs(N))
  • components/reactflow-nodes/AgentNode.tsx — Canvas node with tool count badge
  • components/AgentToolPicker.tsx — Tool selection UI

Modified files

  • lib/workflow-types.ts — AgentNodeConfig/AgentToolConfig interfaces
  • lib/node-registry.ts — Agent registry entry with defaults
  • lib/node-outputs.ts — Agent output variables
  • pages/api/workflow/[id]/execute.ts — Agent execution case
  • components/WorkflowBuilderReactFlow.tsx — Full agent sidebar config panel
  • lib/agentic-chat.ts, lib/workflow-parser.ts — Added agent to node type enums

Test plan

  • Create a workflow with an agent node from the node palette
  • Configure model, temperature, max steps, system/user prompts
  • Add integration tools (e.g., HTTP Request) and verify they appear in the tool list
  • Add a custom API tool with endpoint and parameter schema
  • Save and reload the workflow — verify agent config persists
  • Execute the workflow and verify the agent calls tools and produces output
  • Verify downstream nodes can reference {{agent.output}} variables
  • TypeScript compiles cleanly, no new lint errors

🤖 Generated with Claude Code

Introduces a new 'agent' workflow node that supports autonomous AI execution
with configurable tools, temperature, and step limits. Agents can call
existing integrations (email, Slack, HTTP, etc.) and custom API endpoints
as tools during their execution loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
joice Error Error Mar 23, 2026 1:40pm

Request Review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…result)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace plain text node dropdown with categorized modal selector
  with search, icons, descriptions, and keyboard navigation
- Add metadata (label, description, category, icon) to node registry
- Use accent color for all selected nodes instead of success
- Add Brain/Bot Lucide icons for AI/Agent nodes (canvas + sidebar)
- Add editable account name in settings page with API endpoint
- Fix session callback to read name from DB
- Remove email from profile dropdown
- Fix hydration mismatch in GetStarted MCP config
- Add click-to-edit workflow renaming in builder header

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant