Class: SolidAgent::AgentManifest::Exporters::CrewAIExporter
- Inherits:
-
BaseExporter
- Object
- BaseExporter
- SolidAgent::AgentManifest::Exporters::CrewAIExporter
- Defined in:
- lib/solid_agent/agent_manifest/exporters/crewai_exporter.rb
Overview
CrewAIExporter converts Manifests to CrewAI's agents.yaml format.
Class Method Summary collapse
-
.export(manifest) ⇒ String
Export manifest to CrewAI agents.yaml format.
-
.export_multiple(manifests) ⇒ String
Export multiple manifests to a single agents.yaml.
- .format_name ⇒ Object
Class Method Details
.export(manifest) ⇒ String
Export manifest to CrewAI agents.yaml format
26 27 28 |
# File 'lib/solid_agent/agent_manifest/exporters/crewai_exporter.rb', line 26 def export(manifest, **) export_multiple([manifest]) end |
.export_multiple(manifests) ⇒ String
Export multiple manifests to a single agents.yaml
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/solid_agent/agent_manifest/exporters/crewai_exporter.rb', line 34 def export_multiple(manifests) agents = {} manifests.each do |manifest| agent_key = manifest.name.to_s.tr("-", "_") agents[agent_key] = build_crewai_agent(manifest) end # Use YAML dump with custom options for better formatting yaml = agents.to_yaml # Remove leading --- yaml.sub(/\A---\n/, "") end |
.format_name ⇒ Object
18 19 20 |
# File 'lib/solid_agent/agent_manifest/exporters/crewai_exporter.rb', line 18 def format_name :crewai end |