[0.0.10] - TBD
Added
- Direct Starlette support for
GraphEventandEventCallbackobjects - Parallel node execution for graphs with multiple outgoing edges from a single node
- Automatic concurrent execution when a node has multiple successors
- State merging from parallel branches
- Configurable through standard
add_edge()calls
- New
add_join()method for explicit convergence of parallel branches- Synchronizes multiple parallel branches to a single destination node
- Ensures convergence node executes only once with merged state
- Prevents duplicate execution of downstream nodes
- New
add_parallel()convenience method for creating parallel branches- Syntactic sugar for adding multiple edges from one source to multiple destinations
Changed
- Enhanced
EventCallback.__call__()andEventCallback.acall()method signatures- Removed legacy
node_nameparameter for cleaner API - Added
typeparameter to specify event type directly (defaults toGraphEventType.CALLBACK) - Added
identifierparameter for custom event identification - Added
paramsparameter for event metadata - Improved flexibility for custom event handling and streaming
- Removed legacy
[0.0.9] - 2025-09-05
Added
- Enhanced
FunctionSchema.from_pydantic()method with full Pydantic v2 support- Correctly extracts field types, descriptions, and default values from Pydantic models
- Handles
Optionaltypes and complex type annotations - Properly identifies required vs optional fields using
PydanticUndefined
- New
to_openai()method on FunctionSchema for OpenAI API format support- Supports both
completionsandresponsesAPI endpoints - Export schemas for either nested or flat format structures
- Supports both
- New
EventCallbackclass for object-based callback handling- Outputs structured
GraphEventobjects instead of formatted strings - Provides
GraphEventTypeenum for event type identification - Better structured data with
type,identifier,token, andparamsfields - Maintains backward compatibility with existing callback interface
- Outputs structured
- Comprehensive graph compilation validation
- Stricter validation of node connections and dependencies
- Better error messages for graph construction issues
- Cycle detection with clear
GraphCompileErrorreporting
- New
execute_many()method for concurrent graph execution- Execute the graph on multiple inputs concurrently
- Configurable concurrency level to control parallel execution
- Preserves input order in results for predictable output
Changed
- Graph compilation now validates execution order at compile time
- Graphs with cycles now raise
GraphCompileErrorduring compilation to ensure predictable execution order
Deprecated
Callbackclass is deprecated and will be removed in v0.1.0 - useEventCallbackinsteadspecial_token_formatandtoken_formatparameters inEventCallbackexist for backwards compatibility but are deprecated and will be removed in v0.1.0
Fixed
- Added Python 3.10 compatibility for
StrEnumwith fallback implementation - Fixed type annotation issues with
default_factoryin Pydantic field definitions - Improved type extraction for complex Pydantic field types including
UnionandOptional
[0.0.8] - 2025-08-16
Added
- Graph constructor methods [
add_node,add_router,add_edge,set_callback,set_state,update_state,reset_state,set_start_node,set_end_node,compile] can now be chained - Moved
Callbackclass to top-level import, you can now import it withfrom graphai import Callback - Environment variable
GRAPHAI_LOG_LEVELfor controlling log output level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
Changed
- Dropped
networkx,matplotlib, andcolorlogdependencies (note if usingGraph.visualizeone ofnetworkxormatplotlibmust be installed) - Updated documentation notebooks to use new callback pattern
- Updated old type annotations to use Python 3.10+ syntax, e.g.,
List[str]->list[str]andOptional[list]->list | None
0.0.7 - Removed
0.0.6 - 2025-05-28
Added
- Explicit callback parameter in
execute()method for better control over callback instances NodeProtocoltype definition for improved type safety and IDE support- Enhanced documentation examples demonstrating proper parallel execution patterns
- New
set_callback()method for customizing default callback class
Changed
- BREAKING: Refactored callback handling to eliminate shared state between parallel executions
- Modified
execute()method signature to accept optionalcallbackparameter - Removed internal
self.callbackattribute - Updated all documentation notebooks to use new callback pattern
- Improved type hints throughout codebase using
Type[Callback]
Fixed
- Critical: Fixed callback stream contamination when multiple graphs executed in parallel
- Resolved race conditions in multi-threaded environments
- Fixed inconsistent streaming behavior in concurrent scenarios
- Improved memory management and reduced callback-related memory leaks
- Better cleanup of callback resources after execution
Security
- Enhanced thread-safety for parallel graph execution
- Eliminated shared state vulnerabilities in callback handling
Migration Guide
For basic usage, no changes required - the API remains backwards compatible. For custom callbacks, update from:0.0.5 - 2025-03-30
Added
- New function schema functionality for generating standardized function schemas compatible with various LLM providers
- Built-in colored logger with support for different log levels and custom formatting
- Support for generating function schemas from Pydantic models
Changed
- Removed dependency on semantic router library
- Improved type mapping for function parameters in schemas
- Enhanced documentation and code organization
Fixed
- Various bug fixes and improvements
Security
- No security-related changes in this release

