@@ -90,12 +90,12 @@ type ElicitationRequestHandler func(ctx context.Context, message string, schema
9090
9191// Runtime defines the contract for runtime execution
9292type Runtime interface {
93+ // CurrentAgentInfo returns information about the currently active agent
94+ CurrentAgentInfo (ctx context.Context ) CurrentAgentInfo
9395 // CurrentAgentName returns the name of the currently active agent
9496 CurrentAgentName () string
9597 // SetCurrentAgent sets the currently active agent for subsequent user messages
9698 SetCurrentAgent (agentName string ) error
97- // CurrentAgentCommands returns the commands for the active agent
98- CurrentAgentCommands (ctx context.Context ) types.Commands
9999 // CurrentAgentTools returns the tools for the active agent
100100 CurrentAgentTools (ctx context.Context ) ([]tools.Tool , error )
101101 // EmitStartupInfo emits initial agent, team, and toolset information for immediate display
@@ -118,6 +118,12 @@ type Runtime interface {
118118 Summarize (ctx context.Context , sess * session.Session , additionalPrompt string , events chan Event )
119119}
120120
121+ type CurrentAgentInfo struct {
122+ Name string
123+ Description string
124+ Commands types.Commands
125+ }
126+
121127type ModelStore interface {
122128 GetModel (ctx context.Context , modelID string ) (* modelsdev.Model , error )
123129}
@@ -372,6 +378,16 @@ func (r *LocalRuntime) CurrentAgentName() string {
372378 return r .currentAgent
373379}
374380
381+ func (r * LocalRuntime ) CurrentAgentInfo (context.Context ) CurrentAgentInfo {
382+ currentAgent := r .CurrentAgent ()
383+
384+ return CurrentAgentInfo {
385+ Name : currentAgent .Name (),
386+ Description : currentAgent .Description (),
387+ Commands : currentAgent .Commands (),
388+ }
389+ }
390+
375391func (r * LocalRuntime ) SetCurrentAgent (agentName string ) error {
376392 // Validate that the agent exists in the team
377393 if _ , err := r .team .Agent (agentName ); err != nil {
0 commit comments