Exporting and importing agents and workflows¶
Status: Current | Last reviewed: 2026-10-08
Move an agent or workflow between environments (dev → staging → production, or between tenants) with the portable export container.
Export¶
- Agents — in the repository, open the agent’s ⋯ Manage dialog and click the download icon for a quick definition
.zip. Inside the agent editor, click More → Export to open the export dialog, where you pick a format (Agent Definition or a code package) — each option shows a short description and what it includes, so you can choose the right one. - Workflows — in the repository’s Background filter, open ⋯ Manage, then the row’s
⋯menu and choose Export for a quick definition.zip. Inside the workflow editor, click Export to open the export dialog and pick a format (Workflow Definition or a code package).
Exports from inside an editor always use the version you're currently viewing — the dialog's title shows a badge (e.g. Exports: Draft or Exports: v4 (live)) confirming which version the download will contain. Switch versions with the version selector before exporting if you need a different one. List-row exports use the agent's current published version / the workflow's current configuration.
The portable zip contains the configuration plus a mappings file listing every external item the config references — integrations, tools, other workflows, surface configs — with their names, so the destination environment can match them even though the ids differ.
Import¶
- Agents — Agents repository → Import → Import conversational agent → pick the
.zip(or a legacy.jsonexport). - Workflows — Agents repository → Import → Import background agent.
If the export references external items, a mapping dialog opens: for each referenced item you pick the matching one in this environment. Exact name matches are pre-selected. You can leave entries blank:
- Unmatched integrations are stripped with a warning — the agent imports but those stages need an integration re-selected.
- Unmatched tools / workflows / surface configs import as-is and show as broken references in the editor for you to fix.
The import always creates a new draft named "… (Imported)" — it never overwrites an existing agent or workflow.
What does NOT travel¶
- Secrets — credentials never leave the source environment. The destination's integrations supply their own.
- Conversation history, versions, run history — only the configuration travels.
- Tenant settings (transfer policy, provider allowlists) — destination rules apply.
Export code packages¶
The agent editor's Export dialog can generate one-way code packages that run the agent outside TrueServe. These downloads differ from the portable export container:
- They generate standalone source code, ready to run after installing dependencies.
- They include prompts, merge-field rendering, supported tool definitions, and a runnable chat entrypoint.
- They never include credentials. Configure the generated
.env.examplevalues before running. - They are not importable back into TrueServe.
Three targets are available, each behind its feature flag:
- Strands code package (.zip) — a Python package using the Strands Agents SDK, purpose-built for the exported agent: the system prompt, model settings, tools, and UI component contracts are baked into readable code you can edit directly. Voice agents (OpenAI Realtime, AWS Nova Sonic) run as real Strands voice agents via
run_voice.py(add--textto test from the keyboard without a microphone); chat agents get a multi-turnrun_chat.pyREPL and a FastAPI server. If the agent has UI catalogs attached, each catalog component becomes its own tool with the component's real description and props — the generatedREADME.mdexplains how to connect the UI events to your interface. Cascaded STT → LLM → TTS voice agents export a runnable chat core plus arun_voice.pyTODO shell. - Genkit code package (.zip) — a TypeScript package using Firebase Genkit (
npm install, thennpx tsx src/chat.ts). Voice agents export their chat core only — Genkit has no live-audio API, so voice I/O has to be integrated by the developer. - Google ADK code package (.zip) — a Python package using the Google Agent Development Kit, compatible with
adk run/adk web. Available only for agents whose conversational stage uses a Google provider (Gemini, Vertex AI, Google ADK); other agents show an explanatory error.
If an agent's shape can't be exported to a target (for example a translation agent, or a non-Google agent to ADK), the export shows the reasons in a notification instead of downloading.
External developers remain responsible for their production UI, web audio, SIP/PSTN, telephony, hosting, and secret management.
Export a workflow as code (LangGraph)¶
When code export is enabled, LangGraph code package (.zip) appears both in the Workflows list's ⋯ menu and in the workflow editor's Export dialog — a standalone Python package that executes the designed workflow using LangGraph. From the editor it exports the version you're currently viewing.
- Run it with
pip install -e ., thenpython run.py --input '{"key": "value"}'. It also works with LangGraph Studio (langgraph dev). - AI Agent, rules-based Decision, Assignment, HTTP Request, Parallel, For Each, Human Review, and Wait nodes execute faithfully. Merge fields (
{{node.field}},{{vars.x}}, JSONata) render exactly as in TrueServe. - Human Review and long Wait steps pause the run; the console prints instructions for resuming with a decision.
- Platform-dependent nodes (Salesforce, Code, Notification, OCR, transcription, PII redaction, scoring) are included as clearly-marked stubs listed in the package's
unsupported.json, for the developer to replace. - Credentials never travel — the generated
.env.examplelists what to configure.
If a workflow can't be exported (for example a batch-mode workflow), the reasons appear in a notification.