Overview
Learn how Connic Composer SDK works, understand the project structure, and connect your repository to Connic.
Build agents like you build apps
Instead of configuring agents through a UI, you define them in YAML files and manage them with version control. Push to deploy. Review in PRs. Roll back with git revert.
Why Code-First?
Version Control
Track changes, review PRs, rollback deployments
Environment Parity
Same config in dev, staging, and production
Custom Tools
Write Python functions your agents can call
MCP Integration
Connect external MCP servers for additional tools
Secure Secrets
Store API keys and credentials safely
Code Review
Have teammates review agent configurations
Installation
Get started in seconds
Install the Connic Composer SDK using pip:
pip install connic-composer-sdkCLI Commands
The SDK provides a command-line interface to scaffold and validate your agent projects:
connic init [name]Initialize a new agent project with the standard folder structure and example files.
connic loginAuthenticate with your Connic project using an API key.
connic test [name]Start a local testing session with hot-reload. Changes sync in 2-5 seconds.
connic devValidate your project configuration and preview all agents and tools.
connic toolsList all available tools in your project with their signatures.
See Local Testing for details on the test command.
Project Structure
my-agent-project/
├── agents/
│ ├── assistant.yaml # LLM agent with tools
│ ├── invoice-clerk.yaml # Another LLM agent
│ ├── tax-calculator.yaml # Tool agent (direct execution)
│ └── document-pipeline.yaml # Sequential agent (chains agents)
├── tools/
│ ├── search.py # Custom tools
│ └── calculator.py
├── middleware/ # Optional hooks
│ └── assistant.py # Runs before/after assistant
└── requirements.txt # Python dependenciesagents/
YAML files that define your agents. Each file represents one agent with its model, system prompt, and tool configuration.
tools/
Python modules containing custom tools your agents can use. Any Python function can be used as a tool.
middleware/
Optional Python modules that run before and after agent execution. Auto-discovered by agent name.
Agent Types
Connic supports three types of agents for different use cases
LLM Agent
Standard AI agents powered by language models
Sequential Agent
Chain multiple agents together in a pipeline
Tool Agent
Execute tools directly without AI reasoning
See the Agent Configuration Reference for detailed configuration of each type.
Environment Variables
Secure secrets management
Configure environment variables in the dashboard under Settings → Variables. These are injected into your agent containers at runtime and accessible via os.environ.get().
Variables are environment-specific. Use different API keys for staging vs production.
Connect Your Repository
# Initialize git repository
git init
# Add your files
git add .
git commit -m "Initial agent setup"
# Add your connected repository as remote
git remote add origin <your-connected-repo-url>
# Push to trigger deployment
git push origin <your-deployment-branch>Once your repository is connected to a Connic project, pushing changes to your configured deployment branch will automatically trigger a new deployment.
Automatic Deployment
Connic automatically deploys your agents whenever you push changes to your connected repository. Push to your configured deployment branch and the platform handles the rest: building, deploying, and scaling your agents automatically.
Learn about deployment options