AgentForge is a lightweight, signal-driven workflow framework for Elixir, designed for building flexible and maintainable data processing pipelines.
graph TB
Signal[Signal] --> Handler[Handler]
Handler --> Store[Store]
Handler --> Flow[Flow]
Flow --> Runtime[Runtime]
- 🔄 Signal-driven Architecture: Build workflows around immutable signals
- 🧩 Composable Primitives: Core building blocks for common patterns
- 🔀 Flexible Flows: Chain handlers into dynamic processing pipelines
- 📦 State Management: Track and update workflow state
- ⚡ Async Support: Handle asynchronous operations
- 🛠 Configuration-based: Define workflows in YAML
- 💪 Type-safe: Leverages Elixir's pattern matching
# Add to mix.exs
def deps do
[
{:agent_forge, "~> 0.1.0"}
]
end
# Run
mix deps.get
defmodule Example do
alias AgentForge.{Flow, Signal, Primitives}
def run do
# Define workflow steps
validate = Primitives.transform(fn data ->
if data.valid?, do: data, else: raise "Invalid data"
end)
process = Primitives.transform(fn data ->
Map.put(data, :processed, true)
end)
notify = Primitives.notify(
[:console],
format: &("Processed: #{inspect(&1)}")
)
# Compose workflow
workflow = [validate, process, notify]
# Execute
signal = Signal.new(:start, %{valid?: true})
{:ok, result, _state} = Flow.process(workflow, signal, %{})
IO.inspect(result)
end
end
Immutable messages that flow through the system:
signal = Signal.new(:user_action, %{id: 1})
Building blocks for common patterns:
- Branch: Conditional processing
- Transform: Data modification
- Loop: Iteration handling
- Wait: Async operations
- Notify: Event notifications
Compose handlers into pipelines:
workflow = [&validate/2, &process/2, ¬ify/2]
- Data Processing: Basic data transformation pipeline
- Async Workflow: Handling async operations
- Configuration-based: YAML-defined workflows
AgentForge focuses on:
- Simplicity: Clean, understandable codebase
- Flexibility: Adaptable to various use cases
- Maintainability: Well-documented, tested code
- Composability: Build complex flows from simple parts
- ✅ Data Processing Pipelines
- ✅ Event-driven Workflows
- ✅ Multi-step Validations
- ✅ Async Task Orchestration
- ✅ Business Process Automation
# Clone the repository
git clone https://github.com/USERNAME/agent_forge.git
cd agent_forge
# Get dependencies
mix deps.get
# Run tests
mix test
# Generate documentation
mix docs
- All tests pass (
mix test
) - Test coverage is acceptable (
mix coveralls.html
- check coverage/excoveralls.html) - Code is formatted (
mix format
) - Documentation generates without errors (
mix docs
) - Version number is correct in mix.exs
- CHANGELOG.md is updated
- GitHub Actions workflows are in place
- All examples run without errors
We welcome contributions! Please see our Contributing Guide for guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Run the tests (
mix test
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.