Templates
Render deterministic Handlebars text from flow payloads and message envelopes.
A Greentic component is a portable WebAssembly component that implements Greentic’s component ABI and runs inside the Greentic runtime. Components are the executable building blocks called from flows: they render templates, call APIs, transform data, create Adaptive Cards, route work, and encapsulate custom business logic.
Components are:
.ygtc flows and reusable across packs.The component docs are ordered by the surfaces most teams touch first:
Templates
Render deterministic Handlebars text from flow payloads and message envelopes.
Adaptive Cards
Store card JSON in packs, render and validate it, then deliver native or transformed UI through messaging extensions.
QA
Define setup, update, remove, and validation questions for components and extensions.
After those, the section covers existing components and tools such as fast2flow, cards2pack, flow2flow, component-llm-openai, and component-script-rhai.
Use the top-level launcher when the component is part of an application or extension pack:
gtc wizard --schemagtc wizard --answers pack-with-component.answers.jsongtc wizard delegates to the pack wizard, and the pack wizard can delegate component creation through component_wizard_answers. This keeps the pack manifest, component files, flows, doctor checks, and build steps aligned.
Use the component wizard directly when you are working in a component project:
greentic-component wizard --schemagreentic-component wizard --answers component-create-answers.jsonThe current direct create answer shape is:
{ "wizard_id": "greentic-component.wizard.run", "schema_id": "greentic-component.wizard.run", "schema_version": "1.0.0", "answers": { "mode": "create", "fields": { "component_name": "research-analyst", "output_dir": "./components/research-analyst", "advanced_setup": true, "abi_version": "0.6.0", "operation_names": "answer,score_sources", "filesystem_mode": "none", "http_client": true, "http_server": false, "messaging_inbound": true, "messaging_outbound": true, "events_inbound": false, "events_outbound": false, "secrets_enabled": true, "secret_keys": "openai_api_key", "secret_format": "text", "state_read": true, "state_write": true, "state_delete": false, "telemetry_scope": "node", "config_fields": "model:string,temperature:number" } }, "locks": {}}Do not copy this blindly for future versions. Ask the agent or developer workflow to run greentic-component wizard --schema first and fill the current schema.
greentic-component wizard supports these modes:
| Mode | Purpose |
|---|---|
create | Scaffold a component project. |
add-operation | Add a new user operation to an existing component. |
update-operation | Rename or update operation metadata. |
build-test | Run build/test-oriented wizard steps. |
doctor | Run validation-oriented wizard steps. |
Use validate for a no-side-effect plan and apply for execution:
greentic-component wizard validate --answers component-create-answers.jsongreentic-component wizard apply --answers component-create-answers.jsonThe CLI also supports --emit-answers for capturing a reusable AnswerDocument.
The current Rust template generates a component project with Greentic conventions:
research-analyst/├── Cargo.toml├── component.manifest.json├── Makefile├── assets/│ └── i18n/│ ├── en.json│ └── locales.json├── schemas/│ └── component.schema.json├── src/│ ├── i18n.rs│ ├── i18n_bundle.rs│ ├── lib.rs│ └── qa.rs└── tests/ └── conformance.rsThe generated files cover:
component.manifest.json0.6.0 by defaultCapabilities describe what the component may ask the runtime to provide. Declare only what the component actually needs:
| Capability | Use it when |
|---|---|
| HTTP client | The component calls external APIs. |
| Messaging inbound/outbound | The component reads or emits channel message envelopes. |
| Events inbound/outbound | The component receives or emits event envelopes. |
| State read/write/delete | The component stores session, tenant, or workflow state. |
| Secrets | The component needs runtime secrets such as API keys. |
| Filesystem | The component reads from or writes to a permitted filesystem mount. |
| Telemetry | The component emits spans/logs under tenant, pack, or node scope. |
| Page | What it is for |
|---|---|
| Templates | Handlebars text rendering with payload and msg context. |
| Adaptive Cards | Card assets, rendering, validation, transformation, and complex card flows. |
| QA | Component setup/update/remove questions and answer validation. |
| fast2flow | Intent routing and flow dispatch. |
| cards2pack | Convert Adaptive Card directories into pack assets and flows. |
| flow2flow | Flow-to-flow routing patterns. |
| LLM OpenAI | LLM call patterns for OpenAI-compatible models. |
| Script Rhai | Lightweight script-style logic in flows. |
From a wizard-generated component:
make wasmgreentic-component doctor ./dist/research-analyst__0_6_0.wasmYou can also call the component CLI directly:
greentic-component build --manifest ./component.manifest.jsongreentic-component test \ --wasm ./dist/research-analyst__0_6_0.wasm \ --op answer \ --input ./tests/fixtures/answer.jsongtc wizard --schema or greentic-component wizard --schema.--answers so the work is reproducible.doctor before packaging.