๐
GitHub Deployment
Deploy your agents to GitHub Actions with automatic workflows, secrets management, and PR creation.
Deployment Features
โ๏ธ GitHub Actions
Auto-generate workflow files for scheduled agent execution
๐ Secrets Management
Securely store API keys and credentials in GitHub Secrets
๐ Pull Requests
Create PRs with agent code, policies, and documentation
๐ Monitoring
Track workflow runs and receive failure notifications
Deployment Workflow
๐ Create Agent
โ
๐งช Test
โ
๐ Add Secrets
โ
๐ Deploy
โ
๐ Monitor
Quick Deployment
1 Deploy Your Agent
User: @agentos deploy
AgentOS: ๐ Deploying Agent to GitHub
Pre-deployment Checks:
โ
Agent code validated
โ
Policies attached
โ
Tests passing
โ
Security audit passed
Generated Files:
๐ .github/workflows/data-sync-agent.yml
๐ agents/data-sync-agent/main.py
๐ agents/data-sync-agent/policy.yaml
๐ agents/data-sync-agent/README.md
Required Secrets:
๐ DATABASE_URL - Your database connection string
๐ SLACK_WEBHOOK_URL - Slack notification webhook
Would you like to:
[Create PR] [Set Secrets First] [Preview Files]
2 Configure Secrets
User: @agentos set secret DATABASE_URL
AgentOS: ๐ Setting Secret
Please provide the value for DATABASE_URL.
(This will be stored securely in GitHub Secrets)
Security:
โ
Encrypted at rest
โ
Only accessible to workflows
โ
Not visible in logs
Enter value or paste connection string:
3 Create Pull Request
User: @agentos create pr
AgentOS: ๐ Creating Pull Request
PR Details:
Title: Add data-sync-agent with AgentOS policies
Branch: agentos/data-sync-agent
Base: main
Files Changed:
+ .github/workflows/data-sync-agent.yml (new)
+ agents/data-sync-agent/main.py (new)
+ agents/data-sync-agent/policy.yaml (new)
+ agents/data-sync-agent/README.md (new)
PR Description:
- ๐ค Automated data synchronization agent
- ๐ก๏ธ GDPR-compliant data handling
- โฐ Runs every 6 hours
- ๐ Reports to Slack
โ
PR Created: #42
Reviewers will be notified automatically.
GitHub Actions Workflow
AgentOS generates optimized workflow files:
# .github/workflows/data-sync-agent.yml
name: Data Sync Agent
on:
schedule:
- cron: '0 */6 * * *' # Every 6 hours
workflow_dispatch: # Manual trigger
jobs:
run-agent:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r agents/data-sync-agent/requirements.txt
- name: Run Agent with AgentOS
uses: agentos/run-agent@v1
with:
agent-path: agents/data-sync-agent
policy-path: agents/data-sync-agent/policy.yaml
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Notify on failure
if: failure()
uses: slackapi/slack-github-action@v1
with:
payload: |
{"text": "โ ๏ธ Data Sync Agent failed! Check logs."}
Secrets Management
Check and manage your agent's secrets:
User: @agentos check secrets
DATABASE_URL
โ
Set
SLACK_WEBHOOK_URL
โ
Set
API_KEY
โ Missing
โ ๏ธ Security Note: Never commit secrets to your repository. Always use GitHub Secrets for sensitive values. AgentOS automatically detects and blocks commits containing secrets.
Schedule Configuration
Configure when your agent runs:
# Common schedule patterns
# Every hour
cron: '0 * * * *'
# Every 6 hours
cron: '0 */6 * * *'
# Daily at midnight UTC
cron: '0 0 * * *'
# Weekdays at 9am UTC
cron: '0 9 * * 1-5'
# Every Monday at 6am UTC
cron: '0 6 * * 1'
User: @agentos set schedule "every weekday at 9am"
AgentOS: โฐ Schedule Updated
New Schedule: Every weekday at 9:00 AM UTC
Cron Expression: 0 9 * * 1-5
Next Runs:
- Mon, Jan 27 at 9:00 AM UTC
- Tue, Jan 28 at 9:00 AM UTC
- Wed, Jan 29 at 9:00 AM UTC
Updated workflow file.
Monitoring Deployments
Track your deployed agents:
User: @agentos status
AgentOS: ๐ Agent Status
data-sync-agent
โโโ Status: โ
Healthy
โโโ Last Run: 2 hours ago (success)
โโโ Next Run: in 4 hours
โโโ Success Rate: 98.5% (197/200 runs)
โโโ Avg Duration: 45 seconds
Recent Runs:
โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ Time โ Status โ Duration โ
โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ Today 12:00 โ โ
Pass โ 42s โ
โ Today 06:00 โ โ
Pass โ 48s โ
โ Yesterday 18:00โ โ
Pass โ 41s โ
โ Yesterday 12:00โ โ Fail โ 12s โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ
[View Logs] [Trigger Run] [Pause Agent]
๐ก Best Practice: Start with a manual workflow_dispatch trigger to test your agent, then add the schedule after confirming it works correctly.