Migrate from Google ADK
The connic migrate CLI converts Google ADK projects to Connic. This guide covers concept mapping, automatic conversion, and the parts that need manual cleanup.
On this page
Concept mapping
ADK defines agents in Python. Connic separates them into YAML configuration and Python tool code. The table below shows how the main ADK concepts translate.
| ADK | Connic | Notes |
|---|---|---|
Agent / LlmAgent | YAML file in agents/ with type: llm | Migrated automatically |
SequentialAgent | YAML file with type: sequential | Migrated automatically |
ParallelAgent / LoopAgent | Migrated as sequential; needs manual review | No direct Connic equivalent |
instruction | system_prompt | Extracted from Python or YAML |
model | model with provider prefix (built-in or custom) | gemini-2.5-flash becomes gemini/gemini-2.5-flash |
Python tools / FunctionTool | Python functions in tools/ | FunctionTool wrappers are unwrapped |
AgentTool / LLM sub_agents | trigger_agent predefined tool | Mapped automatically; review prompts and target agent names |
google_search | web_search predefined tool | Mapped automatically |
| Callbacks | Middleware in middleware/ and tool hooks in hooks/ | Requires manual conversion |
| Sessions / state | Connic sessions or retrieval | Requires manual redesign |
MCPToolset | mcp_servers in agent YAML | Requires manual configuration |
If the ADK project relies heavily on custom agent subclasses, dynamic registration, planners, or callback-driven workflows, connic migrate may not find all agents automatically. In that case, use a coding agent (Cursor, Windsurf, Claude Code, Codex, etc.) to handle the full migration. Run connic migrate first for the scaffold, then let the coding agent finish the cleanup using the Connic docs as context.
Example prompt for a coding agent
You are migrating a Google ADK Python project to Connic.
1. Inspect the existing ADK project at ./my-adk-project and explain how agents, tools, callbacks, sessions, and deployment are structured.
2. Run `connic migrate --source ./my-adk-project --dest ./my-connic-project`.
3. Review the generated Connic project and fix any issues listed in MIGRATION_REPORT.md.
4. Run `connic lint` inside the migrated project and resolve any errors.
5. Summarize what migrated cleanly and what still needs manual work.
Prefer Connic conventions: YAML agents in agents/, Python tools in tools/, middleware/ for hooks, schemas/ for structured output.
Use the Connic docs at https://connic.co/docs/v1 as a reference.Run the migration
Install the SDK and run
connic migrate. It prompts for the path to the existing ADK project and a destination for the generated Connic project.terminalpip install connic-composer-sdk connic migrateBoth paths can also be passed directly:
terminalconnic migrate --source ./my-adk-project --dest ./my-connic-projectThe migrator scans the source project for
Agent,LlmAgent,SequentialAgent,ParallelAgent, andLoopAgentdefinitions in Python, as well as YAML-based agent configs (includingroot_agent.yaml). It extracts tools, resolves instructions and model names, generates the Connic project, and runsconnic linton the result.Review the generated project
The migrator creates the following structure. Start by reading
MIGRATION_REPORT.md, which lists every agent that was migrated, what tools were resolved, and any items that need manual work.Project structuremy-connic-project/agents/support-agent.yamlreview-pipeline.yamltools/tools.pyExtracted tool functionsmiddleware/schemas/requirements.txtREADME.mdMIGRATION_REPORT.mdReview this firstUnderstand the output
Below are examples of how typical ADK definitions translate to Connic.
LLM agent
ADK source
agent.pyfrom google.adk.agents import LlmAgent from google.adk.tools import FunctionTool from tools import search_docs, summarize support_agent = LlmAgent( name="support-agent", model="gemini-2.5-flash", instruction="""You are a technical support agent. Help users resolve issues by searching documentation and summarizing the results.""", tools=[search_docs, summarize], )Connic output
agents/support-agent.yamlversion: "1.0" name: support-agent type: llm model: connic/gpt-5.6-terra # or gemini/gemini-2.5-flash with Gemini BYOK configured description: "You are a technical support agent." system_prompt: | You are a technical support agent. Help users resolve issues by searching documentation and summarizing the results. tools: - tools.search_docs - tools.summarizeSequential agent
ADK source
agent.pyfrom google.adk.agents import SequentialAgent pipeline = SequentialAgent( name="review-pipeline", sub_agents=[draft_agent, review_agent, publish_agent], )Connic output
agents/review-pipeline.yamlversion: "1.0" name: review-pipeline type: sequential description: "Runs draft, review, and publish agents in order." agents: - draft-agent - review-agent - publish-agentClean up
Migrates automaticallyExplicit
Agent,LlmAgent, andSequentialAgentdefinitionsPlain Python tool functions and
FunctionToolwrappersAgentToolwrappers mapped totrigger_agentStatic
instructiontext (string literals and variables)Model names (auto-prefixed with the provider, e.g.
gemini/)YAML-based ADK agent definitions
google_searchmapped toweb_searchNeeds manual workParallelAgentandLoopAgent(migrated as sequential placeholders)Custom agent subclasses and wrapper factories
Dynamic agent registration patterns
Callbacks (convert to Connic middleware where applicable)
Session state and persistent memory
MCPToolsetwrappersDynamically constructed instructions or tool lists
Custom guardrails
Checklist after migration- Read
MIGRATION_REPORT.mdand address every follow-up item. - Open each agent YAML in
agents/and verify the system prompt and tool list. - Check that tool modules in
tools/still import everything they need (relative imports from the original project may break). - Convert ADK agent-level callbacks to Connic middleware, and tool-level callbacks (
before_tool_callback/after_tool_callback) to tool hooks. - Run
connic lintafter each cleanup pass. - Run
connic devto open a cloud development environment with hot reload and verify the migrated agents end-to-end.