Changelog¶
All notable changes to AgentFlow are documented here.
0.7.4¶
Added¶
HANDLER_RESULTevent from code handler nodes. Handler nodes (registered Python functions) now emit aHANDLER_RESULTevent after execution, carrying the fullNodeOutput(text, artifacts, metadata). Observers — such as asset collectors — can react to handler outputs the same way they react toTOOL_RESULTevents from agent nodes, without parsing text.
0.7.3¶
Added¶
raw_resultinTOOL_RESULTfor local tools.LocalToolDispatchernow parses JSON results and setslast_raw_tool_result(the sameContextVarused byHTTPToolDispatcher).TOOL_RESULTevents for locally dispatched tools now includeraw_resultwith the structured dict output, enabling asset collectors to capture document URLs and other structured data from local tools.
0.7.2¶
Added¶
- Enriched
TOOL_RESULTevents.HTTPToolDispatcherstashes the pre-formatted tool result dict in an asyncio-safeContextVar.AgentExecutorreads it and includesinput,result(formatted string), andraw_result(raw dict) in everyTOOL_RESULTevent. Downstream consumers can now capture structured tool output at call time without regex-parsing the agent's final response.
0.7.1¶
Fixed¶
- Langfuse SDK compatibility.
LangfuseEventHandlernow wrapsresource_attributesinitialization in atry/except TypeError. Langfuse SDK 4.0.x does not support theresource_attributesparameter; older SDK versions skip it gracefully rather than raising at startup.
0.7.0¶
Added¶
- Langfuse session and trace context. New
set_trace_context()method onLangfuseEventHandlerlets callers inject per-request conversation context —session_id,trace_name,user_id,tags, andmetadata— before each workflow execution. Context is consumed once whenWORKFLOW_STARTEDfires, then cleared. resource_attributesparameter.LangfuseEventHandler.__init__now acceptsresource_attributes: dict[str, str]for attaching static service metadata (e.g.service.name,service.version) to the Langfuse client instance.DOMAIN_ROUTEDspan.LangfuseEventHandlernow handles theDOMAIN_ROUTEDevent, recording the routing decision as a child span on the root trace withdomain,target,confidence, androutermetadata.
0.6.0¶
Added¶
- Code handler nodes. Workflow nodes can now specify
handler: <name>instead ofagent: <name>. Handlers are registered Python async functions (async def fn(message: str, prior_outputs: dict) -> NodeOutput) passed toWorkflowExecutor(handlers={...}). Use handler nodes for deterministic processing steps that don't need an LLM call.
async def normalize_text(message: str, prior_outputs: dict) -> NodeOutput:
return NodeOutput(node_id="transform", agent_id="normalize_text", text=message.lower())
executor = WorkflowExecutor(
config=wf_config,
runner_factory=runner_factory,
handlers={"normalize_text": normalize_text},
)
- Foreach iteration. Workflow nodes can specify
foreach: <dotted-ref>pointing to a list artifact from a prior node. The node body executes once per item; each iteration receivesloop_item,loop_index,loop_total, andloop_prior_resultsinjected into the message. Results are collected intoartifacts["results"]on the synthetic__loop__output.
nodes:
- id: extract
handler: extract_items
next: [process]
- id: process
agent: item_processor
foreach: "extract.artifacts.items"
Handler nodes and foreach can be combined: a handler node with foreach iterates the handler function over the list.
HANDLER_RESULTevent constant. Importable fromagentflow.
0.5.2¶
Changed¶
- Named inputs deliver labeled sections to agents. When a workflow node
defines
inputswith keys other thanmessage, each key is now resolved in YAML-definition order and delivered as a labeled[key]\nvaluesection. Previously, non-messagekeys were processed through_predecessors()and concatenated without labels in non-deterministic (set iteration) order.
Before (0.5.1 behavior — unlabeled, unordered):
After (0.5.2 behavior — labeled, definition order):
Migration: Agent system prompts that receive named inputs should be
updated to reference the labeled sections by key name. The message key
pattern is unchanged.
Fixed¶
NodeRunner._predecessors()renamed to_input_node_ids()with corrected docstring. The method is used only for scratchpad context filtering; it is no longer involved in message resolution.
Added¶
- Four new tests covering named inputs: labeled section format, definition order preservation, missing upstream node handling, and end-to-end workflow integration.
0.5.1¶
Fixed¶
- Release workflow: no longer fails if a GitHub release already exists for the current tag.
0.5.0 (alpha)¶
Breaking Changes¶
- VectorMemory is now embedding-agnostic. The constructor requires
embed_fn(an asyncstr -> list[float]callable) andembedding_diminstead of using a hardcoded embedding model. This decouples VectorMemory from any specific embedding provider.
Changed¶
- Migrated embedding from deprecated
text-embedding-004togemini-embedding-001in examples and tests.
0.4.0 (alpha)¶
Added¶
- Hierarchical domain routing. New
DomainRouterclass implements two-tier routing: a top-level router classifies messages into domains, then per-domain routers pick specific agents or workflows. - New
DomainConfigschema for*.domain.mdfiles. ConfigLoadernow scanscontext/domains/for domain definitions.DOMAIN_ROUTEDevent constant for domain routing telemetry.RoutingResultnow includes adomainfield.
0.3.3¶
Fixed¶
- Subdirectory context loading:
ConfigLoadernow correctly loads*.context.mdfiles from arbitrary subdirectories (not justshared/).
0.3.0¶
Added¶
- Context profiles (
*.context.mdwithtype: profile) for conditional context loading. ContextProfileandConditionalIncludeschemas.ConfigLoader.get_profile()andConfigLoader.is_profile()methods.- Shared context files loaded from all subdirectories, not just
agents/.
0.2.0¶
Added¶
WorkflowExecutorwith DAG-based execution.NodeRunnerfor per-node agent execution.Scratchpadfor per-node working memory and summaries.ArtifactStorefor named artifact storage.MultiUserHistoryandHistoryPersistencefor multi-user session support.FileMemoryandVectorMemorybackends.MemoryManagerfor coordinating memory operations.ComplexityClassifier,DAGExecutor,Plan,PlanSteporchestration primitives.LangfuseEventHandlerfor Langfuse telemetry integration.GoogleGenAIProviderfor Google Gemini models.
0.1.0¶
Added¶
- Initial release.
ConfigLoaderwith.prompt.md,.workflow.md,.context.mdparsing.RouterEnginewith YAML rules and LLM fallback.RuleEvaluatorfor Python expression-based routing rules.AgentExecutorwith tool loop support.ContextAssemblerandPromptTemplate.EventBuspub/sub event system.ToolRegistry,LocalToolDispatcher,HTTPToolDispatcher.AnthropicProvider,OpenAICompatProvider,MockLLMProvider.FileSystemStorage,InMemoryStorage,S3Storagebackends.SessionManagerandSession.- Core types:
Message,AgentResponse,ToolCall,ToolResult,NodeOutput. - Protocols:
LLMProvider,StorageBackend,ToolDispatcher,MemoryStore,EventHandler.