Loading image...Kiro
  • CLI
  • Powers
  • Autonomous agent
  • Enterprise
  • Pricing
  • Docs
SIGN INDOWNLOADS
Loading image...Kiro
Loading image...Kiro
Product
  • About Kiro
  • CLI
  • Pricing
  • Downloads
For
  • Enterprise
  • Startups
Resources
  • Documentation
  • Blog
  • Changelog
  • FAQs
  • Report a bug
  • Suggest an idea
  • Billing support
Social
Site TermsLicenseResponsible AI PolicyLegalPrivacy PolicyCookie Preferences
  1. Docs
  2. Autonomous agent
  3. Sandbox
  4. Devfile

Environment Configuration

On this page
  • Automatic configuration
  • DevFile configuration
  • Example DevFile
  • Dockerfile configuration

You can configure the sandbox environment using either a DevFile or a Dockerfile. Both define your development environment configuration, including dependencies, build commands, and runtime requirements.

Automatic configuration

Kiro autonomous agent looks for configuration files in the root of your repository:

  • devfile.yaml or .devfile.yaml for DevFile configuration
  • Dockerfile for Docker-based configuration

If found, the agent automatically configures the sandbox based on these specifications, ensuring the environment matches your project's requirements.

Info

Kiro autonomous agent only supports publicly available container images. Private registry images are not currently supported.

DevFile configuration

DevFiles let you specify:

  • Container images and base environments
  • Commands to install dependencies
  • Build and test commands
  • Runtime processes and services
  • Environment variables
  • Port mappings

Example DevFile

Here's a basic DevFile for a Node.js project:

yaml
schemaVersion: 2.2.0 metadata: name: nodejs-app version: 1.0.0 components: - name: runtime container: image: node:18 memoryLimit: 1024Mi mountSources: true commands: - id: install exec: component: runtime commandLine: npm install workingDir: ${PROJECT_SOURCE} - id: run exec: component: runtime commandLine: npm start workingDir: ${PROJECT_SOURCE} - id: test exec: component: runtime commandLine: npm test workingDir: ${PROJECT_SOURCE}

See the devfile-samples repository for examples of DevFiles across different languages and frameworks.

Dockerfile configuration

You can also use a standard Dockerfile to configure the sandbox environment. The agent will build and use the Docker image defined in your Dockerfile.

Example Dockerfile:

dockerfile
FROM node:18 WORKDIR /app # Install dependencies COPY package*.json ./ RUN npm install # Copy application code COPY . . # Set environment variables ENV NODE_ENV=production # Expose port EXPOSE 3000 # Start command CMD ["npm", "start"]
Page updated: November 25, 2025
MCP
GitHub