Deployment
Deploy your agents to Connic cloud using Git-based automatic deployments or CLI deployments.
On this page
Overview
Connic supports two deployment methods depending on your workflow:
Connect a Git repository to your project. Pushing to configured branches triggers deployments.
- • Automatic on push
- • Branch-to-environment mapping
- • Supports GitHub, GitLab, and Bitbucket
Deploy locally or from a CI/CD pipeline when the Connic project has no connected Git repository.
- • Source can live with any Git provider
- • Use in CI/CD pipelines
- • Target the default or a specific environment
Git Integration
Connect your Git repository for automatic deployments on push. Connic supports GitHub, GitLab, and Bitbucket.
Connect Your Repository
- Go to Project Settings → Git & Environments
- Click Connect and select your provider (GitHub, GitLab, or Bitbucket)
- Authorize Connic to access your repositories. GitLab.com uses OAuth; for Self-Managed GitLab 15.5 or later, first add the instance under Account → Git Accounts with a personal access token that has the
apiscope. The GitLab user must be an administrator or have the Maintainer or Owner role on each repository. - Select the repository containing your
agents/directory and any supporting project directories - If your repo is a monorepo, set the Repository root directory to the path where your Connic SDK project lives (e.g.
services/agents). Leave empty when the SDK files are at the repo root. - Connic installs a webhook on the repository to detect pushes and pull or merge requests
Configure Environment Branches
- Open Project Settings → Git & Environments
- For each environment, set the Git Branch that triggers deployments
- Pushes to branches that are not mapped to any environment are ignored
For example:
- • Production →
main - • Staging →
develop - • Development →
feature/customer-import(optional)
Push to Deploy
Push to your configured branch. Connic detects the push via webhooks and creates a deployment.
# Push to trigger deployment
git add .
git commit -m "Update agents"
git push origin mainPR Testing
For GitHub and GitLab repositories, Connic can run the suite from a pull request or merge request whose source branch is in the connected repository. It reports connic/pr-tests as a commit status. The target branch selects the mapped environment, and a configured test-environment override keeps the run away from production state.
See PR Testing for setup, provider-specific merge checks, rerun behavior, and shared-environment guidance.
CLI Deployments
Use the CLI to deploy from your local machine or CI/CD pipeline when:
- The project has no Git repository connected in Connic
- You deploy from a local checkout or CI/CD pipeline
- Your source repository uses any Git provider or no provider
Install the SDK
pip install connic-composer-sdkAuthenticate
Run the login command. It opens the dashboard to create an API key, then prompts for the resulting login token:
connic loginThis creates a .connic file:
{
"api_key": "cnc_xxxxxxxxxxxx",
"project_id": "your-project-uuid"
}For CI/CD, use environment variables instead: CONNIC_API_KEY and CONNIC_PROJECT_ID
Get Your Environment ID
Go to Project Settings → Git & Environments and copy the environment ID you want to deploy to.
Deploy
# Deploy to default environment
connic deploy
# Deploy to a specific environment
connic deploy --env <environment-id>The CLI uploads supported files from agents/, tools/, middleware/, schemas/, guardrails/, hooks/, and tests/, plus requirements.txt. Nested files are included.
CI/CD Integration
Use the CLI in a CI/CD pipeline when the Connic project has no connected Git repository. The source repository can use any provider.
name: Deploy to Connic
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install connic-composer-sdk
- run: connic deploy --env $CONNIC_ENV_ID
env:
CONNIC_API_KEY: ${{ secrets.CONNIC_API_KEY }}
CONNIC_PROJECT_ID: ${{ secrets.CONNIC_PROJECT_ID }}
CONNIC_ENV_ID: ${{ secrets.CONNIC_ENV_ID }}deploy:
stage: deploy
script:
- pip install connic-composer-sdk
- connic deploy --env $CONNIC_ENV_ID
variables:
CONNIC_API_KEY: $CONNIC_API_KEY
CONNIC_PROJECT_ID: $CONNIC_PROJECT_IDSet CONNIC_API_KEY, CONNIC_PROJECT_ID, and CONNIC_ENV_ID as CI/CD secrets in your provider's settings.
What Happens During Deployment
tests/Monitoring Deployments
View deployment status and logs in the Deployments tab:
- See all deployments with status and duration
- Click a deployment to view build logs
- The currently serving deployment is marked "Active"

Test Phase (Deploy Gate)
When a project contains tests/, both Git and CLI deployments build the deployment, run the complete suite, and activate only after every case passes. The deployment detail page shows the live pipeline and per-case results.
See The Deploy Gate for test-environment overrides, result locations, and the CLI-only --skip-tests flag. Use the first-test guide to write the suite itself.
Rollback a Deployment
Activate another successful deployment from the Deployments tab:
- Open the Deployments tab and select a successful deployment
- Click the Activate button on that deployment
- Traffic is routed to the selected deployment without rebuilding it
When a Deployment Fails
When a build fails, the deployment is marked Failed and the active deployment continues serving traffic.
Investigating a failure:
- Open the Deployments tab and click the failed deployment
- Review the build logs to identify the error
Common failure reasons:
- Missing dependencies in
requirements.txt - Invalid agent YAML syntax (malformed config, missing required fields)
- Python import errors in tools or middleware files