Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Logger Enhancement, Parent Lineage + Usage summary #9

@javidsegura

Description

@javidsegura

Enhancement Description

I suggest we introduce to the logger these 2 new features:

  • Parent lineage
    • For each prompt we could add parent lineage of the model, referring to parent structure of the given agent instance. This would be able to identify the logs of an agent and the parent who invoked it (and possibly, the parent who invoked that parent...!)
  • Usage summary
    • Some final logs with total token consumption, time running, number of running cycles per agent

Current Behavior

No current display of either. Usage summary currently only logs individual-agents-usage (time + token). Would be good if we an object that reflected the summary of all the running agents for a given script.

Proposed Improvement

  • Parent: should be done from scratch, no improvment cause its a feature
  • Summary log: capture individual usage summary, for a general system-wide usage summary

Benefits

No response

Affected Components

No response

Code Example

For parent lineage, we would add on the `AIAgent`'s `prompt`

                with add_context_to_log(agent_name=self.agent_name, model_name=self.model_name, prompt_attempt=attempt_number, parent_lineage=parent_lineage):

Enhancement Category

Logging/Monitoring

Impact Level

Low - Minor improvement

Migration Considerations

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions