Skip to content

Conversation

@peterj
Copy link
Collaborator

@peterj peterj commented Oct 28, 2025

…ent variables

Fixes #1048

Copilot AI review requested due to automatic review settings October 28, 2025 09:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the kagent deploy command to support loading environment variables from a .env file instead of requiring separate --api-key or --api-key-secret flags. The .env file must contain the model provider API key along with any other environment variables needed by the agent.

Key changes:

  • Replaced --api-key and --api-key-secret flags with a single --env-file flag that accepts a path to a .env file
  • Added validation to check for required environment variables and warn about missing optional variables
  • Implemented automatic deployment restart after updates to ensure environment variable changes take effect

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
go/cli/internal/cli/agent/deploy.go Core implementation: added .env file parsing, validation, secret creation from env vars, and deployment restart functionality
go/cli/cmd/kagent/main.go Updated CLI interface: replaced API key flags with env-file flag and updated command documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@peterj peterj force-pushed the peterj/addenvfile branch from 0c74712 to bb3192b Compare October 28, 2025 10:41
…ent variables

Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
@peterj peterj force-pushed the peterj/addenvfile branch from e716af6 to 3199c51 Compare October 28, 2025 15:34
@EItanya EItanya merged commit 70cbfd1 into main Oct 28, 2025
16 checks passed
@EItanya EItanya deleted the peterj/addenvfile branch October 28, 2025 18:15
killjoycircuit pushed a commit to killjoycircuit/kagent that referenced this pull request Nov 1, 2025
kagent-dev#1063)

…ent variables

Fixes kagent-dev#1048

---------

Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Signed-off-by: killjoycircuit <rutujdhawale@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent with remote mcp server deployed with kagent deploy fails

3 participants