AI agents
with YAML and Python
Agents are defined in YAML, tools are written as Python functions, and every change goes through Git. No framework abstractions or infrastructure to run. Teams shipping backend code today can ship a production agent through the same workflow.
Read the SDK docs# Define the whole agent in one YAML filename: invoice-processormodel: connic/gpt-5.6-solreasoning_effort: autosystem_prompt: |You are an expert accountant.Extract every field from the invoiceand verify the totals add up.tools: - documents.parse - documents.extract_entities - database.store_invoiceOne file. Every part of the agent.
Configuration, prompts, tools, schemas, and safety in a single declarative spec. Diffable in PR review, version-pinnable in CI.
version: "1.0"
name: invoice-processor
model: connic/gpt-5.6-sol
description: "Extracts data from invoices and stores them"
reasoning_effort: auto
system_prompt: |
Extract every field from the invoice and
verify the totals add up.
tools:
- invoices.parse_pdf
- invoices.extract_fields
- invoices.store
output_schema: invoice-data # references schemas/invoice-data.json
guardrails:
input:
- type: pii
mode: redactAn exact connic/* model or a configured BYOK provider sets the model. Learn more
Tools can reference custom Python functions in tools/ or built-in predefined tools. Learn more
A JSON Schema file in schemas/ enforces structured JSON output. Learn more
Inline PII redaction, prompt-injection defense, custom checks. Learn more
What the framework provides
Same agent, two definitions. The YAML on the left runs with the same guarantees as a hand-written Python implementation, without boilerplate that rots over time.
name: support-triage
model: connic/gpt-5.6-sol # or anthropic/claude-opus-4-7 with Anthropic BYOK configured
description: "Triage incoming customer requests"
system_prompt: |
Triage the customer's request and
route to the right team.
tools:
- retrieval_query
- tickets.create
- tickets.notify_teamfrom langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_anthropic import ChatAnthropic
from langchain.prompts import ChatPromptTemplate
from tools import retrieval_query, ticket_create, notify_team
llm = ChatAnthropic(model="claude-opus-4-7")
tools = [retrieval_query, ticket_create, notify_team]
prompt = ChatPromptTemplate.from_messages([
("system", """Triage the customer's request and
route to the right team."""),
("human", "{input}"),
("placeholder", "{agent_scratchpad}"),
])
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(
agent=agent,
tools=tools,
verbose=True,
max_iterations=10,
handle_parsing_errors=True,
)
# ...plus deployment, retries, observability,
# secrets, env config, telemetry, and more.Use production capabilities built into the SDK
The SDK includes the production primitives that teams otherwise rebuild from scratch.
Per-environment env vars injected at runtime. Secrets are masked in the dashboard and in logs. See docs
Python functions wrap each tool call to validate or rewrite params, redact results, or skip a tool with AbortTool. See docs
Python before() and after() hooks wrap the whole run to attach documents, enrich context, or transform responses. See docs
PII redaction, prompt-injection detection, moderation, topic restriction, regex, and custom Python checks, all declared in YAML. See docs
A JSON Schema file in schemas/ forces the LLM into a typed JSON shape. See docs
Remote MCP tool servers connect over Streamable HTTP, with filters for specific tools or a discoverable setting for the whole server. See docs
How Connic compares
Composer SDK vs. building on LangChain, CrewAI, or a custom framework
| Feature | Connic | LangChain | CrewAI | DIY |
|---|---|---|---|---|
| Config format | YAML | Python code | Python code | Custom |
| Deployment included | Included | Not included | Not included | Not included |
| Built-in observability | Included | Not included | Partial | Not included |
| Retrieval (RAG) | Included | Not included | Not included | Not included |
| Connectors (Kafka, S3, etc.) | Included | Not included | Not included | Not included |
| A/B testing | Included | Not included | Not included | Not included |
| Human-in-the-loop approvals | Included | Not included | Not included | Not included |
| Learning curve | Low | Medium | Medium | High |
| Migration tooling | Included | Not included | Not included | Not included |
Build AI agents as a team
Migrate existing projects, review changes with your team, and manage versions in Git.
connic migrate converts LangChain, LangGraph, and Google ADK projects to Connic format while retaining prompts and tools without the framework boilerplate.
Agents live in the repository as YAML and Python. A Git branch maps to each environment so pushes auto-deploy to staging or production.
Models are pinned by ID in the YAML (e.g. connic/glm-5.2 or anthropic/claude-opus-4-7). Tools and middleware are Python files in the repository, so every change is a Git commit with a reviewable diff.