Nodes
Nodes contain your agent logic. They process events, maintain conversation context, and generate responses from LLMs.
What is a Node?
Nodes are where the “thinking” happens in your agent system. It contain the business logic and LLM interactions.
Basic Example
Node Types
| Type | Description | |------|-------------| | Node
| Base class for all
nodes | | ReasoningNode
| Template for conversational agents with
automatic context management |
ReasoningNode
is the base class for all nodes that use LLMs. Users should implement the process_context()
method to process messages and yield events asynchronously.
Key Features
- Event Processing: Receive and process events from bridges
- State Management: Maintain conversation history and context
- Response Generation: Yield events back through the system
- Lifecycle Hooks:
start()
method for async initialization
Nodes can work together in multi-agent systems. See Agent Patterns for coordination examples.