penguiflow new¶
What it is / when to use it¶
penguiflow new scaffolds a new agent project directory from a curated template set.
Use it when you want a runnable project skeleton with:
- a consistent project layout,
- a starter planner/runtime wiring,
- optional streaming/HITL/A2A/background-task scaffolding toggles.
Non-goals / boundaries¶
- This command does not validate your LLM credentials or tool connectivity (use
penguiflow devandpenguiflow toolsfor that). - The scaffold is a starting point; you are expected to edit prompts, tool definitions, policies, and deployment wiring.
- The command will not overwrite existing files unless you pass
--force.
Contract surface¶
Usage¶
penguiflow new [OPTIONS] NAME
Key options:
--template/-t: which template to use (defaultreact)--output-dir: create the project under a specific directory--dry-run: print what would be created--force: overwrite if files exist- feature flags:
--with-streaming--with-hitl--with-a2a--with-rich-output--with-background-tasks--no-memory
Dependencies / extras¶
penguiflow new requires Jinja2. Install either:
pip install "penguiflow[cli]", orpip install jinja2
Templates (what you get)¶
Templates currently supported by the CLI:
minimal: smallest runnable skeleton (good for learning)react:ReactPlannerbaseline (default)parallel: parallel fan-out + join patternsflow: runtime-first project emphasizing DAGs (no planner by default)controller: controller-style flow wiring and contractsrag_server: retrieval-oriented service skeletonwayfinder: navigation/wayfinding pattern scaffoldanalyst: analysis/reporting pattern scaffoldenterprise: multi-tenant oriented skeleton (HITL, policies, stronger defaults)
Choose based on how you will operate the system:
- planner-driven agents:
react/enterprise - deterministic pipelines:
flow/controller - parallel tool workloads:
parallel
Operational defaults (recommended)¶
- Use
--dry-runin repos to avoid accidental writes. - Prefer
reactunless you already know you’re building a pure runtime DAG. - Prefer envelope-style messaging and
trace_idscoping in production systems (see Messages & envelopes).
Runnable example (typical usage)¶
uv run penguiflow new my-agent --template react --with-streaming
cd my-agent
uv sync
uv run penguiflow dev --project-root .
Failure modes & recovery¶
- “Jinja2 is required for
penguiflow new”: installpenguiflow[cli](orjinja2). - Unknown template: run
penguiflow new --helpto see valid templates. - Files skipped: the target already exists; re-run with
--forceif overwriting is intended. - Permission errors: choose a writable
--output-diror fix filesystem permissions.
Observability¶
This command is pure file I/O. Operational observability starts when you run the generated project via penguiflow dev or your own service runner.
Security / multi-tenancy notes¶
- Treat the scaffold as code you must review; do not assume it is safe for your org by default.
- Keep secrets out of generated config files; prefer
.env(uncommitted) and secret managers.
Troubleshooting checklist¶
- Run
penguiflow new --helpand confirm the template/flag names you expect exist. - If scaffolding works for one developer but not another, confirm you’re using the same venv and that Jinja2 is installed.