Class SessionAgentApi
java.lang.Object
com.github.copilot.generated.rpc.SessionAgentApi
API methods for the
agent namespace.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondeselect()Clears the selected custom agent and returns the session to the default agent.Gets the currently selected custom agent for the session.list()Lists agents available to the session.list(SessionAgentListParams params) Lists agents available to the session.reload()Reloads custom agent definitions and returns the refreshed list.select(SessionAgentSelectParams params) Selects a custom agent for subsequent turns in the session.setPrompt(SessionAgentSetPromptParams params) Sets an in-memory authored prompt override for an available agent.
-
Method Details
-
list
Lists agents available to the session. Defaults to custom agents only; pass includeBuiltInAgents to include the effective built-in agents.Invokes the method with no params, applying the runtime defaults.
- Since:
- 1.0.0
-
list
@CopilotExperimental public CompletableFuture<SessionAgentListResult> list(SessionAgentListParams params) Lists agents available to the session. Defaults to custom agents only; pass includeBuiltInAgents to include the effective built-in agents.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
setPrompt
Sets an in-memory authored prompt override for an available agent. For built-in agents, this replaces only the static base prompt while preserving runtime-owned dynamic prompt composition and behavior. The special `general-purpose` agent is not overrideable. Overrides are not persisted; resumed and forked sessions start without them, so the host must re-apply them.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
getCurrent
Gets the currently selected custom agent for the session.- Since:
- 1.0.0
-
select
@CopilotExperimental public CompletableFuture<SessionAgentSelectResult> select(SessionAgentSelectParams params) Selects a custom agent for subsequent turns in the session.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
deselect
Clears the selected custom agent and returns the session to the default agent.- Since:
- 1.0.0
-
reload
Reloads custom agent definitions and returns the refreshed list.- Since:
- 1.0.0
-