For: AI coding agents, skills, and human developers. Purpose: Build correct, deployable UiPath activity packages. Maintained by: Humans and AI agents — if a task fails due to missing/incorrect guidance, update the relevant file.
Every UiPath activity has three parts:
Activity (Runtime) — what happens when the workflow runs
↕ property names must match
ViewModel (Design-Time) — how the activity looks in Studio
↕ referenced by
Metadata (JSON) — links activity ↔ ViewModel, defines display name/icon/category
Key rule: Property names on the ViewModel MUST exactly match the Activity's property names.
These are the most common sources of bugs. Every agent should know these:
-
Context dies after
await— Read ALLInArgumentvalues and extensions fromActivityContextBEFORE the firstawait. The context is disposed after that point. → core/activity-context.md -
Property name mismatch — ViewModel properties must match Activity properties by exact name. A mismatch silently breaks serialization. → design/viewmodel.md
-
InArgument<T>defaults are NOT null —InArgument<int>.Get(context)returns0(notnull) when unset. Null-coalescing (?? default) never triggers for value types. Initialize defaults in the property declaration. → runtime/activity-code.md -
[DefaultValue]required for new properties — Adding a property to an existing activity without[DefaultValue]breaks all existing.xamlworkflows that use it. → core/best-practices.md -
PrivateAssets="All"misuse — Use it for host-provided packages (UiPath SDK). Do NOT use it for third-party runtime dependencies, or the activity will getFileNotFoundExceptionat runtime. → core/project-structure.md
| Task | Start here | Then read |
|---|---|---|
| Create a new activity | core/project-structure.md | runtime/activity-code.md → design/viewmodel.md → design/metadata.md → design/localization.md → examples/complete-example.md |
| Refactor an activity | core/best-practices.md | core/activity-context.md → topic file for the area being refactored |
| Add/change a widget | design/widgets/index.md | Individual widget file if needed |
| Add Orchestrator integration | runtime/orchestrator.md | design/bindings.md |
| Write tests | testing/activity-testing.md | testing/viewmodel-testing.md |
| Code review | core/best-practices.md | core/activity-context.md |
| Use Activities SDK | advanced/sdk-framework.md | Only when DI, telemetry, or bindings are needed |
| Topic | File |
|---|---|
| Architecture, platform context, Studio Desktop vs Web | core/architecture.md |
| ActivityContext, WF4, "read before await" | core/activity-context.md |
| Project layout, .csproj, packaging, NuGet | core/project-structure.md |
| Best practices, versioning, compatibility | core/best-practices.md |
| Activity base classes, arguments, attributes | runtime/activity-code.md |
| IExecutorRuntime, IWorkflowRuntime, feature detection | runtime/platform-api.md |
| Orchestrator version detection, API patterns | runtime/orchestrator.md |
| ViewModel lifecycle, properties, partial classes | design/viewmodel.md |
| Widget types and implementation | design/widgets/index.md |
| DataSource patterns (static, dynamic, enum) | design/datasources.md |
| Rules and reactive dependencies | design/rules-and-dependencies.md |
| Menu actions, mode switching | design/menu-actions.md |
| Validation (property, model, preview) | design/validation.md |
| Metadata JSON, SDK registration | design/metadata.md |
| Localization / Resources.resx | design/localization.md |
| Bindings (Orchestrator, connections) | design/bindings.md |
| Project settings (ArgumentSetting) | design/project-settings.md |
| Solutions vs project scope | design/solutions.md |
| Activity testing (3 levels) | testing/activity-testing.md |
| ViewModel testing (4 approaches) | testing/viewmodel-testing.md |
| Advanced patterns (NativeActivity, bookmarks) | advanced/patterns.md |
| FilterBuilder widget | design/widgets/filter-builder.md |
| Activities SDK (DI, telemetry, bindings) | advanced/sdk-framework.md |
| Service access quick reference | reference/service-access.md |
| Compilation constants | reference/compilation-constants.md |
| Design feature flags | reference/feature-flags.md |
| Complete worked example (all files) | examples/complete-example.md |
When an AI agent encounters a problem not covered here, or finds incorrect guidance:
- Identify the right file using the topic table above
- Add a "Troubleshooting" entry at the bottom of that file with:
- What went wrong
- Why it went wrong
- The correct approach
- Keep entries concrete — include code snippets, not just prose
- Cross-reference other files when the fix spans multiple topics