CTX in CI/CD Pipelines
CTX in CI/CD Pipelines
Section titled “CTX in CI/CD Pipelines”AgentCTX integrates into CI/CD workflows to automate context-aware operations — running agents on pull requests, verifying trust chains, and maintaining persistent project memory.
GitHub Actions
Section titled “GitHub Actions”Verify Translations on PR
Section titled “Verify Translations on PR”name: AgentCTX Verifyon: [pull_request]
jobs: verify: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' - run: npm install @agentctx/core - name: Verify translation signatures run: | node -e " const { CryptoManager } = require('@agentctx/core'); const crypto = new CryptoManager('.context'); crypto.verifyAll('.context/translations/').then(r => { console.log('Verified:', r.valid, '/', r.total); if (r.invalid.length > 0) { console.error('Invalid:', r.invalid); process.exit(1); } }); "Run Agent Review on PR
Section titled “Run Agent Review on PR”name: Agent Code Reviewon: [pull_request]
jobs: review: runs-on: ubuntu-latest services: surrealdb: image: surrealdb/surrealdb:v3 ports: ['8000:8000'] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' - run: npm install @agentctx/core - name: Initialize and run agent queries run: | node -e " const { Gateway } = require('@agentctx/core'); const gw = new Gateway(); (async () => { await gw.process('+m:context \"reviewing PR changes\"'); await gw.process('?k \"security patterns\" #code ^5'); await gw.process('+m:check \"OWASP compliance verified\"'); })(); "Ingest Documentation
Section titled “Ingest Documentation”name: Knowledge Syncon: push: paths: ['docs/**']
jobs: ingest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm install @agentctx/core - name: Ingest documentation run: | node -e " const { Gateway } = require('@agentctx/core'); const gw = new Gateway(); // Ingest docs via gateway knowledge plane gw.process('+k:ingest \"docs/\"'); "Docker Compose in CI
Section titled “Docker Compose in CI”For full-stack testing:
jobs: integration: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: docker compose up -d --build --wait - run: | curl -f http://localhost:3100/health - run: docker compose downPersistent Project Memory
Section titled “Persistent Project Memory”Store CI/CD context that agents can recall across runs:
// On successful deploy+m "deploy-v2.1.0" #team #milestone "Deployed to production, all tests green"
// On next PR, agent recalls recent deploys?m #team #milestone @7dTrust Verification in CI
Section titled “Trust Verification in CI”Add trust verification as a required check:
- name: Verify Agent Actions run: | node -e " const { CryptoManager } = require('@agentctx/core'); const crypto = new CryptoManager('.context'); crypto.verifyAll('.context/translations/').then(r => { if (r.invalid.length > 0) { console.error('::error::Agent translation signatures failed verification'); console.error('Invalid files:', r.invalid); process.exit(1); } console.log('All', r.total, 'translations verified'); }); "See Also
Section titled “See Also”- Trust & Verification — the trust model
- Docker Deployment — Docker Compose setup