Skip to content

Repository files navigation

DataRobot Logo

af-component-base

Homepage · Documentation · Support

Latest Release License Slack #applications

The base component required for all AF built apps

af-component-base is a copier template that provides the foundational scaffold for every application built with the DataRobot App Framework. It is the first component applied to any new App Framework project.

When applied, it walks you through a short configuration wizard (template name, description, copyright year, and whether to include the shared core library), then writes the base project structure and answers file that all other App Framework components build on top of. Answers are stored in .datarobot/answers/base.yml and reused by subsequent copier update runs.

This component is intended for app developers starting a new App Framework project or bringing an existing project up to the standard structure.

Table of contents

Prerequisites

  • Python 3.11+
  • uv installed
  • dr installed

A DataRobot account and environment are required to deploy the resulting application. See DataRobot getting started for account setup.

Quick start

Run the following command in your project directory:

dr component add https://github.com/datarobot-community/af-component-base .

If you need additional control, you can run this to use copier directly:

uvx copier copy datarobot-community/af-component-base .

The wizard prompts for:

  • Template name—human-readable display name (e.g. My Sales Assistant).
  • Template code name—auto-derived lowercase slug; override if needed.
  • Template description—Markdown-compatible description shown in the App Framework gallery.
  • Copyright year—defaults to the current year.
  • Include core library—whether to include the shared core package for multi-component recipes (default: yes).

Component dependencies

af-component-base has no required component dependencies. It is the root of the App Framework component graph — all other components build on top of it.

Local development

af-component-base is a copier template, not a runnable service. All source files live under template/, which copier renders into the target project directory at apply time.

The copier.yml at the repo root defines all template questions and their defaults. The answers file path is .datarobot/answers/base.yml in the target project. See AGENTS.md for an agent-oriented orientation to this repo.

Prerequisites

  • uv — provides uvx copier
  • Task — task runner (brew install go-task/tap/go-task or see installation)
  • yamlfmt — install with go install github.com/google/yamlfmt/cmd/yamlfmt@latest
  • dr — the DataRobot CLI (used to run the rendered project's own checks the way end users will)

Validating a change

The repo root has a Taskfile.yaml that renders the template into mytemplate/ (with the optional core library) and mytemplate-no-core/, then runs the same checks CI does. The single command to run everything is:

task validate

This renders both include_core=true and include_core=false variants, runs yamlfmt -lint on each, and then runs the rendered project's own dr task install, dr task <ns>:lint-check, and dr task <ns>:test|unit for the appropriate components. CI (.github/workflows/validate-template.yaml) runs the same command across Python 3.11, 3.12, and 3.13.

For fast iteration, run individual subtasks:

task render:with-core        # render mytemplate/ with include_core=true
task render:no-core          # render mytemplate-no-core/ with include_core=false
task lint:yaml               # yamlfmt -lint on both rendered outputs
task validate:with-core      # install + lint-check + test in mytemplate via dr task
task validate:no-core        # install + lint-check + test in mytemplate-no-core via dr task
task clean                   # rm -rf mytemplate mytemplate-no-core

For a one-off render outside the Taskfile (e.g. to manually inspect generated output), copier can be invoked directly:

uvx copier copy . /tmp/my-test-app

Updating

All components should be regularly updated to pick up bug fixes, new features, and compatibility with the latest DataRobot App Framework.

For automatic updates to the latest version, run the following command in your project directory:

dr component update .datarobot/answers/base.yml

If you need more fine grained control and prefer using copier directly, you can run this to have more control over the process:

uvx copier update -a .datarobot/answers/base.yml -A

Troubleshooting

This section covers common issues when applying or updating the component.

copier asks questions I already answered

.datarobot/answers/base.yml may be missing or out of date. Run the update command with -A to skip interactive prompts and use saved answers:

uvx copier update -a .datarobot/answers/base.yml -A

dr component add is not found

Install or update the DataRobot CLI. See cli.datarobot.com for installation instructions.

Template conflicts after copier update

Copier shows a diff for any file with local modifications. Review each conflict, keep your changes where appropriate, and commit the result.

Next steps and cross-links

After applying this component, add further functionality by layering additional App Framework components on top.

Contributing, changelog, support, and legal

Contributing: Fork the repository and open a pull request. See CONTRIBUTING.md for the full guide, including how to report bugs and the maintainer response SLA.

Getting help: Open a GitHub Issue for bugs and feature requests. For security vulnerabilities, email the maintainers directly or contact oss-community-management@datarobot.com.

License: This project is licensed under the terms in LICENSE.

About

DataRobot App Framework base component for af.datarobot.com built agentic applications

Topics

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages