Skip to main content
A workflow package is a folder containing everything CodeMachine needs to run your workflow: configuration, prompts, and workflow definitions.
New to building workflows? Use the built-in Ali workflow for step-by-step guidance.

Folder Structure

Every workflow package follows this structure:
my-workflow-codemachine
codemachine.json
config
main.agents.js
sub.agents.js
modules.js
placeholders.js
agent-characters.json
templates
workflows
example.workflow.js
A minimum workflow requires only three files: codemachine.json, main.agents.js, and a .workflow.js file. Everything else is optional.

Required Files

Optional Files


Manifest File

Every workflow package must have a codemachine.json manifest at its root:
codemachine.json
The name field must be unique. When importing, CodeMachine uses this to identify the package.

Real Examples


Importing Packages

Once your package has a valid manifest, you can import it using the CLI or TUI:
Or from within CodeMachine:

Import Workflows

Learn about all import sources: local paths, GitHub repos, and more

Next Steps

Build Agents

Learn how to configure agents in main.agents.js