Skip to main content
Connic
Build

Project Structure

See where agent definitions, Python extensions, tests, and dependencies live 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/, and tests/ 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
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.
requirements.txt
Python packages installed with the project. Keep credentials out of this file and use environment variables for runtime secrets.

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.