From b7712201b567a4dced69f184e4916ec0b020e18d Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Tue, 2 Dec 2025 14:03:07 -0800 Subject: [PATCH] remove docker and cicd setup from the cli examples --- docs/examples/cli_multi_agent_quickstart.md | 112 ------------------ docs/swarms/cli/cli_heavy_swarm_guide.md | 121 -------------------- docs/swarms/cli/cli_llm_council_guide.md | 110 ------------------ docs/swarms/cli/cli_yaml_guide.md | 34 ------ 4 files changed, 377 deletions(-) diff --git a/docs/examples/cli_multi_agent_quickstart.md b/docs/examples/cli_multi_agent_quickstart.md index 3d23d032..3b0e1c02 100644 --- a/docs/examples/cli_multi_agent_quickstart.md +++ b/docs/examples/cli_multi_agent_quickstart.md @@ -145,90 +145,6 @@ swarms heavy-swarm --task "Summarize recent advances in battery technology" --- -## Integration Examples - -### Bash Script Integration - -```bash -#!/bin/bash -# research_script.sh - -TOPICS=( - "AI in manufacturing" - "Autonomous vehicles market" - "Edge computing trends" -) - -for topic in "${TOPICS[@]}"; do - echo "Researching: $topic" - swarms heavy-swarm --task "Analyze $topic" --verbose >> research_output.txt - echo "---" >> research_output.txt -done -``` - -### CI/CD Pipeline (GitHub Actions) - -```yaml -name: AI Research Pipeline - -on: - schedule: - - cron: '0 9 * * 1' # Every Monday at 9 AM - -jobs: - research: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install dependencies - run: pip install swarms - - - name: Run LLM Council - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - run: | - swarms llm-council \ - --task "Weekly market analysis for tech sector" \ - --verbose > weekly_analysis.txt - - - name: Upload results - uses: actions/upload-artifact@v3 - with: - name: analysis-results - path: weekly_analysis.txt -``` - -### Docker Integration - -```dockerfile -FROM python:3.10-slim - -RUN pip install swarms - -ENV OPENAI_API_KEY="" -ENV WORKSPACE_DIR="/workspace" - -WORKDIR /workspace - -ENTRYPOINT ["swarms"] -CMD ["--help"] -``` - -```bash -# Build and run -docker build -t swarms-cli . -docker run -e OPENAI_API_KEY="your-key" swarms-cli \ - llm-council --task "Analyze market trends" -``` - ---- - ## Other Useful CLI Commands ### Setup Check @@ -269,34 +185,6 @@ swarms show-all --- -## Output Handling - -### Capture Output to File - -```bash -swarms llm-council --task "Evaluate cloud providers" > analysis.txt 2>&1 -``` - -### JSON Output Processing - -```bash -swarms llm-council --task "Compare databases" | python -c " -import sys -import json -# Process output as needed -for line in sys.stdin: - print(line.strip()) -" -``` - -### Pipe to Other Tools - -```bash -swarms heavy-swarm --task "Research topic" | tee research.log | grep "RESULT" -``` - ---- - ## Troubleshooting ### Common Issues diff --git a/docs/swarms/cli/cli_heavy_swarm_guide.md b/docs/swarms/cli/cli_heavy_swarm_guide.md index 288f4119..9987b858 100644 --- a/docs/swarms/cli/cli_heavy_swarm_guide.md +++ b/docs/swarms/cli/cli_heavy_swarm_guide.md @@ -175,99 +175,6 @@ swarms heavy-swarm \ --- -## Scripting Examples - -### Research Pipeline - -```bash -#!/bin/bash -# research_pipeline.sh - -TOPICS=( - "AI in manufacturing" - "Blockchain in supply chain" - "Edge computing in IoT" -) - -for topic in "${TOPICS[@]}"; do - echo "Researching: $topic" - OUTPUT_FILE="research_$(echo $topic | tr ' ' '_').txt" - - swarms heavy-swarm \ - --task "Comprehensive analysis of $topic: market size, key players, trends, and opportunities" \ - --loops-per-agent 2 \ - --verbose > "$OUTPUT_FILE" - - echo "Saved to: $OUTPUT_FILE" -done -``` - -### Daily Market Analysis - -```bash -#!/bin/bash -# daily_market.sh - -DATE=$(date +%Y-%m-%d) -OUTPUT_FILE="market_analysis_$DATE.txt" - -echo "Daily Market Analysis - $DATE" > $OUTPUT_FILE -echo "==============================" >> $OUTPUT_FILE - -swarms heavy-swarm \ - --task "Analyze today's key market movements, notable news, and outlook for tomorrow. Focus on tech, healthcare, and energy sectors." \ - --loops-per-agent 2 \ - --question-agent-model-name gpt-4 \ - --worker-model-name gpt-4 \ - --verbose >> $OUTPUT_FILE - -echo "Analysis complete: $OUTPUT_FILE" -``` - -### CI/CD Integration - -```yaml -# .github/workflows/heavy-swarm-research.yml -name: Weekly Heavy Swarm Research - -on: - schedule: - - cron: '0 6 * * 1' # Every Monday at 6 AM - -jobs: - research: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install Swarms - run: pip install swarms - - - name: Run Heavy Swarm Research - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - run: | - swarms heavy-swarm \ - --task "Weekly technology trends and market analysis report" \ - --loops-per-agent 3 \ - --question-agent-model-name gpt-4 \ - --worker-model-name gpt-4 \ - --verbose > weekly_research.txt - - - name: Upload Results - uses: actions/upload-artifact@v3 - with: - name: weekly-research - path: weekly_research.txt -``` - ---- - ## Configuration Recommendations ### Quick Analysis (Cost-Effective) @@ -311,34 +218,6 @@ swarms heavy-swarm \ --- -## Output Processing - -### Save to File - -```bash -swarms heavy-swarm --task "Your task" > report.txt 2>&1 -``` - -### Extract Sections - -```bash -# Get executive summary -swarms heavy-swarm --task "Your task" | grep -A 50 "Executive Summary" - -# Get recommendations -swarms heavy-swarm --task "Your task" | grep -A 20 "Recommendations" -``` - -### Timestamp Output - -```bash -swarms heavy-swarm --task "Your task" | while read line; do - echo "[$(date '+%H:%M:%S')] $line" -done -``` - ---- - ## Best Practices !!! tip "Task Formulation" diff --git a/docs/swarms/cli/cli_llm_council_guide.md b/docs/swarms/cli/cli_llm_council_guide.md index 01f9a79e..baa78fa1 100644 --- a/docs/swarms/cli/cli_llm_council_guide.md +++ b/docs/swarms/cli/cli_llm_council_guide.md @@ -116,116 +116,6 @@ The default council includes: --- -## Scripting Examples - -### Batch Processing - -```bash -#!/bin/bash -# council_batch.sh - -QUESTIONS=( - "What is the future of remote work?" - "How will AI impact healthcare in 5 years?" - "What are the risks of cryptocurrency adoption?" -) - -for question in "${QUESTIONS[@]}"; do - echo "=== Processing: $question ===" >> council_results.txt - swarms llm-council --task "$question" >> council_results.txt - echo "" >> council_results.txt -done -``` - -### Weekly Analysis Script - -```bash -#!/bin/bash -# weekly_council.sh - -DATE=$(date +%Y-%m-%d) -OUTPUT_FILE="council_analysis_$DATE.txt" - -echo "Weekly Market Analysis - $DATE" > $OUTPUT_FILE -echo "================================" >> $OUTPUT_FILE - -swarms llm-council \ - --task "Analyze current tech sector market conditions and provide outlook for the coming week" \ - --verbose >> $OUTPUT_FILE - -echo "Analysis complete: $OUTPUT_FILE" -``` - -### CI/CD Integration - -```yaml -# .github/workflows/council-analysis.yml -name: Weekly Council Analysis - -on: - schedule: - - cron: '0 8 * * 1' # Every Monday at 8 AM - -jobs: - council: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install Swarms - run: pip install swarms - - - name: Run Council Analysis - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - run: | - swarms llm-council \ - --task "Provide weekly technology trends analysis" \ - --verbose > weekly_analysis.txt - - - name: Upload Results - uses: actions/upload-artifact@v3 - with: - name: council-analysis - path: weekly_analysis.txt -``` - ---- - -## Output Processing - -### Capture to File - -```bash -swarms llm-council --task "Your question" > council_output.txt 2>&1 -``` - -### Extract Sections - -```bash -# Get just the final synthesis -swarms llm-council --task "Your question" | grep -A 100 "FINAL SYNTHESIS" -``` - -### JSON Processing - -```bash -# Pipe to Python for processing -swarms llm-council --task "Your question" | python3 -c " -import sys -content = sys.stdin.read() -# Process content as needed -print(content) -" -``` - ---- - ## Best Practices !!! tip "Query Formulation" diff --git a/docs/swarms/cli/cli_yaml_guide.md b/docs/swarms/cli/cli_yaml_guide.md index 6bf7fc43..7e76dbee 100644 --- a/docs/swarms/cli/cli_yaml_guide.md +++ b/docs/swarms/cli/cli_yaml_guide.md @@ -312,40 +312,6 @@ swarms load-markdown --markdown-path ./agents/ --concurrent --- -## CI/CD Integration - -### GitHub Actions - -```yaml -# .github/workflows/run-agents.yml -name: Run Agent Pipeline - -on: - schedule: - - cron: '0 9 * * 1' # Every Monday at 9 AM - -jobs: - run-agents: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install Swarms - run: pip install swarms - - - name: Run Agents - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - run: swarms run-agents --yaml-file agents.yaml -``` - ---- - ## Next Steps - [CLI Agent Guide](./cli_agent_guide.md) - Create agents from command line