Skip to content

Interface

GLLM Agent Interface.

AgentInterface

Bases: Protocol, Generic[AgentInput, AgentOutput]

Agent interface.

ainvoke(input, event_emitter=None) async

Invoke the agent asynchronously.

Parameters:

Name Type Description Default
input AgentInput

The input to the agent.

required
event_emitter EventEmitter | None

The event emitter to emit the event. Defaults to None.

None

Returns:

Name Type Description
AgentOutput AgentOutput

The output of the agent.

invoke(input)

Invoke the agent synchronously.

Parameters:

Name Type Description Default
input AgentInput

The input to the agent.

required

Returns:

Name Type Description
AgentOutput AgentOutput

The output of the agent.