Skip to content

Rename Dynamic Workers to Dynamic Agents and document tool schema injection - #58

Merged
zby merged 3 commits into
mainfrom
codex/review-dynamic-workers-documentation
Jan 26, 2026
Merged

zby merged 3 commits into
mainfrom
codex/review-dynamic-workers-documentation

Conversation

@zby

@zby zby commented Jan 26, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Use "agent" terminology and clarify runtime behavior for creating/calling generated agents to align naming and dynamic agent flows.

Description

  • Rename task and decision language in tasks/active/dynamic-workers.md to "Dynamic Agents", update relevant context to include llm_do/runtime/tools.py, and change toolset naming from dynamic_workers to dynamic_agents with agent_create/agent_call APIs.
  • Add session-scoped registry wording and require generated_workers_dir in the manifest via generated_workers_dir: str | None = None for created agents.
  • Add a new "Tool Schema Injection" section describing that calling a newly generated agent by name requires the orchestrator to have the agent's tool schema injected into the message history and that the runtime should extend the tool registry after agent_create and include updated tool schemas in subsequent turns.

Testing

  • No automated tests were run because this is a documentation/task-file change only.

Codex Task

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @zby, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the documentation and design specifications for dynamic agent creation and invocation. The primary goal is to standardize terminology by transitioning from 'workers' to 'agents' and to provide clearer guidance on how dynamically generated agents integrate into the runtime, particularly concerning the management and injection of their tool schemas into the session context.

Highlights

  • Terminology Update: Renamed all instances of 'Dynamic Workers' to 'Dynamic Agents' and 'worker' to 'agent' throughout the dynamic-workers.md documentation to align with current AI agent terminology.
  • Toolset API Renaming: The proposed toolset name was changed from dynamic_workers to dynamic_agents, and the associated API calls were updated from worker_create to agent_create and worker_call to agent_call.
  • Tool Schema Injection Documentation: Added a new section detailing 'Tool Schema Injection', explaining that tool schemas for newly generated agents must be injected into the message history and the runtime's tool registry must be extended after agent_create.
  • Runtime Context Clarification: Included llm_do/runtime/tools.py as a relevant file for dynamic agent context and added a decision point clarifying that adding tools during a session is acceptable, but removing them is not.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request is a good step towards standardizing the terminology from 'worker' to 'agent' in the design documentation for dynamic agents. The added section on 'Tool Schema Injection' is a valuable clarification for the implementation. My review focuses on several inconsistencies where the 'worker' terminology still persists. Addressing these will ensure the design document is fully aligned and provides a clear guide for developers.

Comment thread tasks/active/dynamic-workers.md Resolved
Comment on lines +30 to +33
- [ ] `agent_create(name, instructions, description, model?)` - write `.worker` file
- [ ] `agent_call(agent, input, attachments?)` - invoke created agent
- [ ] Session-scoped registry for created agents (in toolset instance)
- [ ] Parse created agents via existing `load_worker_file()` / `build_worker_definition()`

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.

high

While the document is being updated to use "agent" terminology, several references to the old "worker" file format and parsing functions remain. For example:

  • Line 30: agent_create(...) is tasked to write .worker file.
  • Line 33: Parsing is to be done via load_worker_file() / build_worker_definition().
  • Line 58: The implementation note for agent_create also mentions writing a .worker file.

For consistency, should these be updated to use an .agent file format and corresponding function names (e.g., load_agent_file)? If the .worker format is being intentionally retained, it would be helpful to add a note explaining this decision.

@@ -1,36 +1,39 @@
# Dynamic Workers
# Dynamic Agents

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.

medium

The title of the document is now 'Dynamic Agents', but the filename is still dynamic-workers.md. For consistency, consider renaming the file to dynamic-agents.md.

## Context
- Relevant files: `llm_do/runtime/manifest.py`, `llm_do/runtime/worker_file.py`, `llm_do/runtime/registry.py`, `llm_do/runtime/context.py`
- Relevant files: `llm_do/runtime/manifest.py`, `llm_do/runtime/worker_file.py`, `llm_do/runtime/registry.py`, `llm_do/runtime/context.py`, `llm_do/runtime/tools.py`
- Design note: `docs/notes/dynamic-workers-runtime-design.md`

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.

medium

The linked design note still points to docs/notes/dynamic-workers-runtime-design.md. This file and its contents should likely also be updated to reflect the new 'agent' terminology to maintain consistency across the documentation.

Suggested change
- Design note: `docs/notes/dynamic-workers-runtime-design.md`
- Design note: `docs/notes/dynamic-agents-runtime-design.md`

Comment thread tasks/active/dynamic-workers.md Resolved
zby and others added 2 commits January 26, 2026 18:45
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@zby
zby merged commit bceb555 into main Jan 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant