Skip to content

[FEATURE] Support for Custom Node Types in Graph Pattern #544

@moritalous

Description

@moritalous

Problem Statement

Currently, the Graph pattern in Strands Agents only supports Agent or MultiAgentBase instances as nodes. This limitation makes it difficult to implement deterministic business logic, complex preprocessing/postprocessing, and guaranteed execution flows that are essential for production applications.

Proposed Solution

Add support for custom node types that allow:

  1. Custom Function Nodes: Ability to add Python functions as nodes for deterministic processing
  2. Hybrid Nodes: Nodes that combine deterministic logic with agent capabilities
  3. Conditional Logic Nodes: Nodes that perform branching logic without LLM involvement

This would enable developers to create graphs that combine the flexibility of agents with the reliability of deterministic processing, similar to what LangGraph offers.

Use Case

This enhancement would enable:

  • Data Processing Pipelines: Reliable preprocessing of data before agent analysis
  • Business Rule Implementation: Deterministic business logic execution
  • Error Handling: Guaranteed validation and error recovery processes
  • Performance Optimization: Avoiding LLM calls for deterministic operations
  • Hybrid Workflows: Combining agent creativity with deterministic control

The current limitation forces developers to rely entirely on agent-based processing, where tool execution is not guaranteed and depends on the agent's autonomous decision-making. This creates reliability issues for production applications that require consistent, predictable behavior.

Alternatives Solutions

Currently, developers must work around this limitation by:

  • Implementing all logic within agent system prompts (unreliable)
  • Using complex tool combinations (execution not guaranteed)
  • Building separate processing pipelines outside of Strands Agents

Additional Context

This feature would bring Strands Agents closer to the flexibility offered by frameworks like LangGraph, while maintaining the unique agent-centric approach that makes Strands Agents valuable. The enhancement should maintain full backward compatibility with existing Graph implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions