Connic
Connic Composer SDK

Overview

Learn how Connic Composer SDK works, understand the project structure, and connect your repository to Connic.

Code-First Agent Development

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:

bash
pip install connic-composer-sdk
Requires Python 3.10 or higher

CLI 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 login

Authenticate 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 dev

Validate your project configuration and preview all agents and tools.

connic tools

List all available tools in your project with their signatures.

See Local Testing for details on the test command.

Project Structure

plaintext
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 dependencies

agents/

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

Uses AI models to process requests with reasoning, tool selection, and natural language responses. The default type for most use cases.

Sequential Agent

Chain multiple agents together in a pipeline

Chains multiple agents together. Each agent's output becomes the next agent's input. Perfect for multi-step workflows.

Tool Agent

Execute tools directly without AI reasoning

Executes a tool directly without AI reasoning. Faster and more deterministic. Perfect for calculations, data transforms, or API calls.

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

bash
# 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