AgentForge.Config (AgentForge v0.2.2)
View SourceProvides configuration parsing for declarative workflows. Supports loading workflows from YAML or JSON.
Summary
Functions
Loads a workflow from a YAML or JSON file. Returns a flow function that can be executed.
Loads a workflow from a YAML or JSON string. Returns a flow function that can be executed.
Functions
Loads a workflow from a YAML or JSON file. Returns a flow function that can be executed.
Examples
iex> flow = AgentForge.Config.load_from_file("test/fixtures/simple_workflow.yaml")
iex> is_function(flow, 1)
true
Loads a workflow from a YAML or JSON string. Returns a flow function that can be executed.
Examples
iex> config = """
...> flow:
...> - type: transform
...> fn: upcase
...> - type: branch
...> condition: "String.length(data) > 5"
...> then:
...> - type: tool
...> name: notify
...> else:
...> - type: tool
...> name: log
...> """
iex> flow = AgentForge.Config.load_from_string(config)
iex> is_function(flow, 1)
true