Skip to content

feature / simple agent#180

Merged
felix-schultz merged 33 commits intoTM9657:devfrom
simonjanssen:feature/llm-exec-controls
Aug 22, 2025
Merged

feature / simple agent#180
felix-schultz merged 33 commits intoTM9657:devfrom
simonjanssen:feature/llm-exec-controls

Conversation

@simonjanssen
Copy link
Copy Markdown
Collaborator

@simonjanssen simonjanssen commented Aug 15, 2025

Catalog

  • Add new "Agent" catalog section:
image

Nodes

Simple Agent Node

  • Recursive LLM-invokes until no more tool calls are made or recursion limit hit.
  • Effectively, this is an LLM-controlled while loop over an arbitrary number of leaves with back-propagation of leaf outputs into the agent.
  • Keeps track of an internal message queue of tool calls and tool outputs for consistent LLM responses
image

Make Message Node

  • Allow "tool" role setting
  • Dynamic tool call input to associate tool message with previous tool call (id)
image

Chunk From String Node

  • Transform custom input strings into chunk objects that can be pushed as continuous, intermediate results to frontend.
  • Useful when intermediate steps are not LLM tokens but action steps performed by tools etc.
image

History From String Node

  • Create a new History struct with string content as User Message
image

Random Float/Int

  • Added min/max bounds validation

Misc

  • implement Display for History for pretty printing of message chain
  • Getter method for system message

@simonjanssen simonjanssen requested a review from Copilot August 20, 2025 19:57
Copy link
Copy Markdown
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 adds a new "Agent" catalog section with a Simple Agent node and supporting infrastructure. The changes implement recursive LLM execution with tool calls, allowing agents to control their own execution flow until a final response is reached.

Key Changes

  • Introduced Simple Agent node with recursive LLM invocation and tool call management
  • Simplified function call data structures by removing Option wrappers for required fields
  • Added new utility nodes for chunk and history creation from strings
  • Added input validation for random number generation nodes

Reviewed Changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/model-provider/src/response.rs Simplified FunctionCall and ResponseFunction by removing Option wrappers
packages/model-provider/src/history.rs Added Display trait, tool call deserialization, and system prompt getter
packages/catalog/src/utils/json/parse_with_schema.rs Replaced OpenAI-specific types with generic Tool types
packages/catalog/src/ai/generative/agent/simple.rs New Simple Agent node implementation
packages/catalog/src/ai/generative/llm/invoke_with_tools.rs New tool invocation node replacing with_tools
packages/catalog/src/utils/int/random_range.rs Added min/max validation
packages/catalog/src/utils/float/random_range.rs Added min/max validation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

simonjanssen and others added 3 commits August 20, 2025 21:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@simonjanssen simonjanssen marked this pull request as ready for review August 20, 2025 20:02
Copy link
Copy Markdown
Member

@felix-schultz felix-schultz left a comment

Choose a reason for hiding this comment

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

LGTM, nice one!

@felix-schultz felix-schultz merged commit 3db1bc3 into TM9657:dev Aug 22, 2025
0 of 4 checks passed
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.

3 participants