Connic
Connic Composer SDK

Overview

How the Connic Composer SDK works: the project structure, the building blocks you compose into agents, and how your repository connects to Connic.

Last updated
Build agents like you build apps

Define agents in YAML, write tools in Python, and manage everything with version control. Push to deploy. Review in PRs. Roll back with git revert. Iterate with the cloud dev server and gate every release with tests.

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:

terminal
pip install connic-composer-sdk
Requires Python 3.10 or higher
Pair the SDK with your AI coding agent

Optional but recommended

The Connic team maintains an open SKILL.md-format skill that teaches AI coding agents how to write idiomatic Connic projects — the full project layout, every YAML key, all eleven connectors, the real CLI flags, and the team's recommended best practices for guardrails, tests, and tool wrapping. It works with Claude Code, Cursor, Codex, GitHub Copilot, Windsurf, Gemini, and any other agent that supports the SKILL.md standard.

Install for any supported agent:

terminal
npx skills add connic-org/connic-skill

Or, inside Claude Code, install the plugin from the marketplace:

claude code
/plugin marketplace add connic-org/connic-skill
/plugin install connic@connic

View the skill on GitHub for the layout, per-agent install paths, and the evaluation suite used to keep it in sync with the SDK.

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 migrate
Scan an ADK or LangChain project and generate a new Connic project.
connic dev [name]
Start a cloud dev runner with hot-reload. Local edits sync in 2-5 seconds.
connic test
Run the suites under tests/ against a real environment. Same gate the deploy runs.
connic lint
Validate your project configuration and preview all agents and tools.
connic tools
List all available tools in your project with their signatures.

See Dev Server for the iteration loop, and Testing for the test framework and deploy gate.

Project Structure

Project structure
my-agent-project/
agents/
_defaults.yamlOptional: cascading defaults for every agent below
assistant.yamlLLM agent with tools
invoice-clerk.yamlAnother LLM agent
tax-calculator.yamlTool agent (direct execution)
document-pipeline.yamlSequential agent (chains agents)
tools/
search.pyCustom tools
calculator.py
middleware/Optional request/response hooks
assistant.pyRuns before/after assistant
hooks/Optional tool-level hooks
assistant.pyRuns before/after each tool call
requirements.txtPython dependencies

For simple projects, keeping agent YAMLs and tool modules at the top level of agents/ and tools/ is usually the easiest option. Larger projects can optionally organize both directories into subfolders.

agents/

YAML files that define your agents. Each file represents one agent with its model, system prompt, and tool configuration. Subfolders are optional for larger projects.

tools/

Python modules containing custom tools your agents can use. Any Python function can be used as a tool, and nested modules are supported when you want more structure.

middleware/

Optional Python modules that run before and after agent execution. See middleware. Auto-discovered by agent name.

hooks/

Optional Python modules that run before and after each tool call. See tool hooks. 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

terminal
# 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 deploys your agents whenever you push to your connected repository. Push to your configured deployment branch and the platform handles the rest: building, deploying, and scaling.

Learn about deployment options