Skip to content

Refactored the code, adding simple tool registration and multi-agent loops #11

Open
jllike wants to merge 4 commits into1rgs:masterfrom
jllike:my-feature-fix
Open

Refactored the code, adding simple tool registration and multi-agent loops #11
jllike wants to merge 4 commits into1rgs:masterfrom
jllike:my-feature-fix

Conversation

@jllike
Copy link
Copy Markdown

@jllike jllike commented Jan 21, 2026

Content

I found during use that important multi-agent functionality and adaptation to other LLM APIs were missing.

Key Changes

I detailed the changes in the commit. The core logic is as follows:

  1. The main loop is changed to an event generator, separating rendering output from the actual loop.
  2. New LLM clients can be easily created to enhance compatibility with multiple models.
  3. Added concurrent multi-agent tools.

Notes

Still using the standard library.

- Added @tool decorator for centralized TOOLS mapping.
- Improved compatibility with OpenAI-compatible models (e.g., DeepSeek).
- Refactored main loop into a generator for event-based flow.
- Supported concurrent tool execution via `parallel: bool` parameter.
- Integrated agents as tools for recursive task handling.
- Enforced `done` tool usage: models must call it to return content, otherwise the cycle continues.
- Fixed encoding issues in bash tool by enforcing UTF-8.
- Extended markdown rendering capabilities.
- Added @tool decorator for centralized TOOLS mapping.
- Improved compatibility with OpenAI-compatible models (e.g., DeepSeek).
- Refactored main loop into a generator for event-based flow.
- Supported concurrent tool execution via `parallel: bool` parameter.
- Integrated agents as tools for recursive task handling.
- Enforced `done` tool usage: models must call it to return content, otherwise the cycle continues.
- Fixed encoding issues in bash tool by enforcing UTF-8.
- Extended markdown rendering capabilities.
- Added a unified exit point to simplify redundant code
- Enhanced terminal display aesthetics
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.

1 participant