Skip to content

draft: track subagent tokens #4269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

draft: track subagent tokens #4269

wants to merge 3 commits into from

Conversation

wendytang
Copy link
Collaborator

@wendytang wendytang commented Aug 22, 2025

  • Allows user to view what % of total tokens were delegated to subagents
  • Shows approximately how many tokens were freed up from main agent context.

🐶 food

# How to use subagents effectively: 

Subagents are good for delegating small, tight-nit tasks such as gathering context. 

When used effectively, subagents allow you as the operator to command at a higher level and free up tokens from the main agent.

## How to trigger subagents:
To trigger dynamic subagents in goose, use the trigger words 'dynamic tasks'. Note: do not enable taskqueue extension. 

## Examples:

( O)> create two dynamic tasks, each to tell a random fact
I'll create two dynamic tasks, each to tell a random fact.
─── create_task | dynamic_task ──────────────────────────
task_parameters:
    -
        text_instruction: Tell me a random interesting fact
    -
        text_instruction: Tell me a random interesting fact

( O)> create dynamic tasks to explore and understand the code base
I'll create dynamic tasks to explore and understand the codebase. Let me start by creating tasks that will systematically examine different aspects of this Rust project.
─── create_task | dynamic_task ──────────────────────────
task_parameters:
    -
        text_instruction: Explore the main goose crate structure and understand its core functionality by examining the src directory and key files
    -
        text_instruction: Analyze the goose-cli crate to understand how the command line interface works and its relationship to the main goose crate
...

## How to track usage:

Once you've invoked subagents, you should see the total tokens handled by subagents and % of your total session usage.

Context: ●●○○○○○○○○ 15% (29376/200000 tokens)
Delegated: 134925 tokens handled by subagents (75% of total tokens)

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