remove docker and cicd setup from the cli examples

pull/1245/head^2
Kye Gomez 2 days ago
parent fd6b688b64
commit b7712201b5

@ -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 ## Other Useful CLI Commands
### Setup Check ### 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 ## Troubleshooting
### Common Issues ### Common Issues

@ -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 ## Configuration Recommendations
### Quick Analysis (Cost-Effective) ### 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 ## Best Practices
!!! tip "Task Formulation" !!! tip "Task Formulation"

@ -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 ## Best Practices
!!! tip "Query Formulation" !!! tip "Query Formulation"

@ -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 ## Next Steps
- [CLI Agent Guide](./cli_agent_guide.md) - Create agents from command line - [CLI Agent Guide](./cli_agent_guide.md) - Create agents from command line

Loading…
Cancel
Save