Skip to content

feat(agent): IMicroAgenticaConfig.throw - #517

Merged
samchon merged 1 commit into
mainfrom
feat/throw
Jan 7, 2026
Merged

feat(agent): IMicroAgenticaConfig.throw#517
samchon merged 1 commit into
mainfrom
feat/throw

Conversation

@samchon

@samchon samchon commented Jan 7, 2026

Copy link
Copy Markdown
Member

This pull request introduces a configurable error handling mechanism to the MicroAgentica agent framework, allowing users to choose whether execution failures should throw exceptions or be handled silently. The main changes include the addition of a throw option in the agent configuration, implementation of the error assertion logic, and documentation updates to guide users on this new behavior.

Error handling improvements:

  • Added a throw property to the IMicroAgenticaConfig interface, allowing users to specify if exceptions should be thrown on execution failure.
  • Implemented the assertExecuteFailure utility function in assertExecuteFailure.ts to throw errors when execution fails, and integrated it into the main agent execution flow in MicroAgentica.ts. [1] [2] [3]

Documentation updates:

  • Expanded the documentation in micro.mdx to explain the new error handling behavior, provide usage examples, and reference the new throw option.
  • Clarified the default value and usage of the describe property in IMicroAgenticaExecutor.

@samchon samchon self-assigned this Jan 7, 2026
Copilot AI review requested due to automatic review settings January 7, 2026 05:20
@samchon samchon added this to WrtnLabs Jan 7, 2026
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 7, 2026
@samchon
samchon merged commit 0965538 into main Jan 7, 2026
11 of 16 checks passed
@samchon
samchon deleted the feat/throw branch January 7, 2026 05:22

Copilot AI 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.

Pull request overview

This PR introduces a configurable error handling mechanism to the MicroAgentica agent framework. Users can now control whether execution failures should throw exceptions or be handled silently through a new throw configuration option.

  • Adds a throw property to IMicroAgenticaConfig for controlling error handling behavior
  • Implements assertExecuteFailure utility function to throw errors when execution fails
  • Updates documentation with usage examples and guidance on the new error handling feature

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/core/src/structures/IMicroAgenticaConfig.ts Adds the throw configuration property with comprehensive JSDoc documentation
packages/core/src/utils/assertExecuteFailure.ts New utility function that throws appropriate errors based on execution history failure types
packages/core/src/MicroAgentica.ts Integrates error assertion into the conversate flow and refactors describe agent condition check
packages/core/src/structures/IMicroAgenticaExecutor.ts Adds @default false annotation to the describe property documentation
website/content/docs/core/micro.mdx Adds comprehensive Error Handling section with code examples and usage guidance

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

Comment on lines 55 to +58
* @param ctx Context of the agent
* @param executes List of function calling results
* @returns List of prompts generated by the describer
* @default false

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

The @default false annotation is misleading. The describe property is optional (can be undefined), and when not provided, it defaults to undefined, not false. The behavior in the actual implementation (line 177 in MicroAgentica.ts) treats undefined differently from false. Consider removing this annotation or clarifying that the default is "not set" or "undefined".

Suggested change
* @param ctx Context of the agent
* @param executes List of function calling results
* @returns List of prompts generated by the describer
* @default false
* When this property is not provided, it is treated as not set
* (`undefined`), which may be handled differently from `false`.
*
* @param ctx Context of the agent
* @param executes List of function calling results
* @returns List of prompts generated by the describer
* @default undefined (not set)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants