Skip to main content
connic
Build

Project Structure

The directories and files for agent definitions, Python extensions, tests, and dependencies in a connic project.

Last updated

A connic project is a repository with a small set of recognized directories. connic init creates agents/, tools/, middleware/, and schemas/. Add guardrails/, hooks/, tests/, connectors/, assets/, and apps/ when needed.

Project structure
my-agent-project/
agents/
_defaults.yamlOptional defaults inherited by agents below
assistant.yamlLLM agent
tax-calculator.yamlTool agent
document-pipeline.yamlSequential agent
tools/
search.pyCustom tools
calculator.py
middleware/Optional run-level hooks
assistant.py
hooks/Optional tool-call hooks
assistant.py
guardrails/Optional custom guardrails
account-policy.py
schemas/Structured-output schemas
support-response.json
tests/
assistant.yamlTest cases and assertions
connectors/Optional connectors applied by deploys
support-inbox.yaml
assets/Optional audio files, such as hold audio
hold.mp3
apps/Optional web frontends built by deploys
portal.yaml
portal/
requirements.txtPython dependencies

What each directory contains

agents/
YAML files that define each agent. Use _defaults.yaml for shared settings, then override them in individual agent definitions.
tools/
Python modules containing custom tools. Parameter types and defaults define input schemas; docstrings define descriptions.
middleware/
Optional Python modules that run before and after an agent execution. Match modules to agents as described in Middleware.
hooks/
Optional Python modules that wrap individual tool calls. See Tool Hooks for discovery and signatures.
guardrails/
Optional Python modules containing custom guardrail checks.
schemas/
JSON Schema files referenced by an agent's output_schema field.
tests/
YAML suites containing inputs, mocks, and assertions. See the first-test guide for file matching and execution.
connectors/
Optional YAML files, one per connector, that deploys create, update, or retire. See Connectors in code.
apps/
Optional web frontends: an apps/<key>.yaml file and an apps/<key>/ source folder per app, built and served by deploys. See Apps.
requirements.txt
Python packages installed with the project. Keep credentials out of this file and use environment variables for runtime secrets. Each line must be a plain requirement such as httpx>=0.27; options, URLs and file paths are rejected. Packages install only from prebuilt wheels for Python 3.12 on Linux x86-64, and source builds are disabled. If a package or one of its dependencies is published only as source, the build fails. connic rejects dependencies that install executable .pth hooks or importable modules named sitecustomize or usercustomize. Paths in .pth files must stay inside site-packages and cannot point to files.

Upload size and file types

A deploy or connic dev upload can be up to 50 MB, counted unpacked. Outside tests/files/ and apps/, files must be text with one of these extensions: .py, .yaml, .txt, .json, .csv, .md, .toml, .jsonl. MP3 and WAV audio (.mp3, .wav) is allowed there too, such as a voice connector's hold audio. tests/files/ accepts any file type, binary included. Images, PDFs, and other binary files that tools need at runtime belong in Files, not base64 in the code.

Create the scaffold

terminal
connic init my-agents --skill
cd my-agents

The optional --skill flag adds the connic project guidance used by compatible AI coding agents. Run connic lint after reorganizing files to validate discovery.