Expand description
§Module System
Extensible module system for Driven that allows custom agents, workflows, templates, and resources to be packaged and shared.
§Features
- Module installation from path or URL
- Dependency resolution and version management
- Resource isolation to prevent conflicts
- DX LLM format manifests
§Module Manifest Format
Modules are defined using DX LLM format in a module.dx file:
# My Custom Module
id|my-module
nm|My Custom Module
v|1.0.0
desc|A custom module for specialized workflows
author|Your Name
license|MIT
# Dependencies
dep.base-module|^1.0.0
# Resources
agent.0|custom-agent
workflow.0|custom-workflow
template.0|custom-template§Example Usage
ⓘ
use driven::modules::{ModuleManager, Module};
// Create a module manager
let mut manager = ModuleManager::new(".driven/modules");
// Load existing modules
manager.load()?;
// Install a new module
manager.install(Path::new("./my-module"))?;
// List installed modules
for module in manager.list_installed() {
println!("{}: {} v{}", module.id, module.name, module.version);
}
// Get all agents from installed modules (namespaced)
let agents = manager.get_all_agents();
// Returns: ["my-module:custom-agent", ...]§Resource Isolation
When isolation is enabled (default), all module resources are namespaced with the module ID to prevent conflicts:
- Agent
my-agentin modulemy-modulebecomesmy-module:my-agent - Workflow
my-flowin modulemy-modulebecomesmy-module:my-flow
§Dependency Resolution
The module system supports:
- Exact version matching:
1.0.0 - Caret requirements:
^1.0.0(compatible with major version) - Tilde requirements:
~1.0.0(compatible with minor version) - Wildcard:
*(any version) - Optional dependencies: marked with
optional: true
Structs§
- Module
- A Driven module containing agents, workflows, templates, and resources
- Module
Dependency - A module dependency with version requirement
- Module
Manager - Module manager for installing, updating, and managing modules
Enums§
- Module
Status - Module installation status