Skip to content

feat(cli): add init agent support for aigne.yaml#cli#929

Merged
li-yechao merged 2 commits into
mainfrom
feat/cli-init-agent
Jan 20, 2026
Merged

feat(cli): add init agent support for aigne.yaml#cli#929
li-yechao merged 2 commits into
mainfrom
feat/cli-init-agent

Conversation

@li-yechao

@li-yechao li-yechao commented Jan 19, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

Major Changes

  1. feat(cli): add init agent support for aigne.yaml#cli
cli:
  init: init.yaml

Screenshots

Test Plan

Checklist

  • This change requires documentation updates, and I have updated the relevant documentation. If the documentation has not been updated, please create a documentation update issue and link it here
  • The changes are already covered by tests, and I have adjusted the test coverage for the changed parts
  • The newly added code logic is also covered by tests
  • This change adds dependencies, and they are placed in dependencies and devDependencies
  • This change includes adding or updating npm dependencies, and it does not result in multiple versions of the same dependency [check the diff of pnpm-lock.yaml]

Summary by AIGNE

Release Notes

New Feature:

  • Added support for optional initialization agent in CLI configuration
  • CLI now supports aigne.cli.init configuration to run an initialization agent before the main agent execution
  • Initialization agent runs non-interactively while preserving interactive settings for the main agent
  • Enhanced workflow capabilities by allowing pre-execution setup through dedicated initialization agents

This feature enables users to configure automated setup or preparation steps that execute before their main agent workflows, improving automation and workflow orchestration capabilities.

@li-yechao li-yechao requested a review from lban2049 January 19, 2026 02:10
@github-actions

github-actions Bot commented Jan 19, 2026

Copy link
Copy Markdown

Image description AIGNE CodeSmith

Walkthrough

This change introduces support for an optional initialization agent in the CLI workflow. When configured via aigne.cli.init, the system will execute an initialization agent before running the main agent. The initialization agent runs non-interactively while preserving the original interactive setting for the main execution. This enhancement provides better workflow control and setup capabilities for CLI operations.

Changes

Files Summary
packages/cli/src/commands/app/agent.ts Enhanced CLI command to support optional initialization agent execution before main agent, with proper session/user ID reuse and interactive mode handling
packages/core/src/aigne/type.ts Added optional init property of type Agent to AIGNECLIAgents interface
packages/core/src/loader/index.ts Added configuration loader support for aigne.cli.init agent with proper schema validation and object construction

@codecov

codecov Bot commented Jan 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/commands/app/agent.ts 46.15% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lban2049 lban2049 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@li-yechao li-yechao merged commit 32249b3 into main Jan 20, 2026
6 checks passed
@li-yechao li-yechao deleted the feat/cli-init-agent branch January 20, 2026 12:47
@li-yechao li-yechao mentioned this pull request Jan 20, 2026
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.

2 participants