新增一键导出员工按钮
Pre-checks
- [x] I have searched existing issues and this is not a duplicate.
What problem does this solve?
方便员工迁移、备份和导入到其它设备。
Proposed solution
No response
Willing to contribute?
- [ ] I'd be interested in working on this.
Hi @laixiao 👋
Thanks for submitting this feature request! I've analyzed the Clawith codebase to understand the agent data structure and export capabilities.
Analysis
This is a valuable feature request for agent data portability. Here's what I found in the source code:
Relevant Areas:
- Agent Model:
backend/app/models/agent.py— Defines agent structure (name, description, config, tools, workspace files, triggers, etc.) - Agent Manager:
backend/app/services/agent_manager.py— Handles agent initialization and file management - API Endpoints:
backend/app/api/routes/agents.py— Exposes agent CRUD operations
What Needs to be Exported:
- Agent metadata (name, description, soul.md, personality)
- Workspace files (focus.md, memory/, workspace/*)
- Skill definitions (skills/ directory)
- Tool configurations and AgentTool links
- Trigger configurations
- Calendar events and other integrations
Implementation Approach:
-
Backend: Create a new endpoint (e.g.,
POST /api/agents/{id}/export) that:- Packages all agent data into a ZIP file (or JSON)
- Includes directory structure for easy re-import
- Optionally encrypts sensitive data (API keys, tokens)
-
Frontend: Add an "Export" button in the Agent Settings panel that:
- Calls the export endpoint
- Downloads the file to the user's device
- Shows a confirmation with file size and contents
-
Import: Extend the existing agent creation flow to accept import files
Challenges:
- Handling sensitive credentials (API keys, auth tokens) during export/import
- Ensuring file paths remain consistent across devices
- Managing tool/trigger dependencies during import
🌐 Language note: To help more community members participate in the discussion, could you please submit issues in English? You're welcome to include a Chinese translation as well. Thank you! 🙏
This analysis was generated by reviewing the Clawith source code. Please let the maintainers confirm the approach before starting implementation.
Thank you for this great suggestion! Agent export/import is definitely on our radar — it would be very useful for migration, backup, and sharing configurations across environments.
However, since the platform is still evolving rapidly, the internal data formats (agent schema, workspace structure, tool bindings, etc.) are not yet fully stabilized. Implementing export/import now would risk producing files that become incompatible with future versions.
Our plan: Once the platform protocols and data schemas are more settled, we will revisit and implement this feature properly with a stable, versioned export format.
We appreciate your interest in contributing and will keep this issue tracked. Thanks again for the feedback!
Thank you for this great suggestion! Agent export/import is definitely on our radar — it would be very useful for migration, backup, and sharing configurations across environments.
However, since the platform is still evolving rapidly, the internal data formats (agent schema, workspace structure, tool bindings, etc.) are not yet fully stabilized. Implementing export/import now would risk producing files that become incompatible with future versions.
Our plan: Once the platform protocols and data schemas are more settled, we will revisit and implement this feature properly with a stable, versioned export format.
We appreciate your interest in contributing and will keep this issue tracked. Thanks again for the feedback!
thanks