Skip to main content
Version: 1.2

Define Features with AI

Tecton supports AI-assisted feature engineering workflows that help you define production-grade features faster and more intuitively using natural language.

Tecton works with any AI-assisted IDE or coding agent that supports tool calling and MCP.

Examples:

This guide explains how to use Cursor, the Model Context Protocol (MCP), and the Tecton CLI to generate FeatureView definitions, unit tests, and documentation from a single prompt.

For more information on using other supported agents, see the GitHub repository.

When to Use AI Assistance​

Once integrated with Tecton's MCP server and CLI, you can use AI-IDEs or coding agents for things like:

  • Generating feature definitions from natural language or existing feature code
  • Generating feature unit tests
  • Debugging failing features
  • Recommending new feature ideas for your use case
  • Creating end-to-end notebooks that train models
  • Identifying duplicate or similar features
  • Asking any question about how Tecton works (it's your onboarding buddy that never gets tired)

This approach complements, not replaces, your traditional development process.

How It Works​

The AI-assisted workflow is powered by the following tools:

  • Cursor (or a similar coding agent): An AI coding environment that supports agent-based coding workflows
  • MCP (Model Context Protocol): Provides agents with access to Tecton's SDK Reference, documentation, and a large repository of code examples
  • Tecton CLI: Validates your feature definitions and provides helpful error messages to the agent

The workflow follows a feedback loop:

  1. You write a prompt (e.g., "Create a 10-min rolling average of transaction amount")
  2. Coding-agent generates code, tests, and documentation using your repo context
  3. Agent invokes the Tecton CLI to validate the code using tecton plan
  4. Agent iterates through any validation errors

Quickstart​

The following quickstart instructions are specific to Cursor. For other supported agents like Claude Code, please refer to the installation instructions in the GitHub repository README.

1. Prerequisites​

2. Example Prompts​

Open Cursor and use prompts like these:

  • "Create a FeatureView that computes the 10-minute average transaction amount per user"
  • "Query the Tecton MCP server to learn more about stream feature views and real-time feature views. Explain to me how and when to use them"
  • "I've got this existing Java code to calculate a complicated ML feature. Port this over to Tecton: [insert Java code here]"
  • "Scan my feature repo and identify duplicates"
  • "Suggest additional features I should try to identify fraud"
  • "Create a script that trains a model from scratch from Tecton's FeatureService xyz"

Best Practices​

  • Keep SDKs current: Make sure Cursor has access to the latest Tecton SDK for best results
  • Use unit tests: Generated tests improve the feedback loop and validation accuracy
  • Be specific in prompts: Include time windows, join keys, or aggregations when relevant
  • Interrupt the agent: If you notice the agent is barking up the wrong tree, interrupt
  • Explicitly prompt the agent to use the MCP server: Sometimes it's helpful to explicitly ask the agent to use the Tecton MCP server's tools
  • Explicitly prompt the agent to validate: Sometimes the agent doesn't automatically validate your feature repo after making changes. "Use tecton plan and fix any issues" is a helpful prompt to let the agent do the work for you
  • Review everything: Always inspect and validate generated code before deployment

Was this page helpful?