agents / Exports / AgentInterface
Interface: AgentInterface
Legacy agent interface for backward compatibility
Deprecated
Use BaseAgentInterface or provider-specific interfaces instead
Hierarchy
BaseAgentInterface
<AgentConfig
,RunOptions
,Message
>↳
AgentInterface
Implemented by
Table of contents
Methods
Methods
configure
▸ configure(config
): Promise
<void
>
Configure the agent with type-safe configuration
Parameters
Name | Type |
---|---|
config | AgentConfig |
Returns
Promise
<void
>
Inherited from
BaseAgentInterface.configure
Defined in
packages/agents/src/interfaces/agent.ts:217
run
▸ run(input
, context?
): Promise
<string
>
Run agent with user input and type-safe context
Parameters
Name | Type |
---|---|
input | string |
context? | RunOptions |
Returns
Promise
<string
>
Inherited from
BaseAgentInterface.run
Defined in
packages/agents/src/interfaces/agent.ts:222
runStream
▸ runStream(input
, context?
): AsyncGenerator
<string
, void
, never
>
Run agent with streaming response and type-safe context
Parameters
Name | Type |
---|---|
input | string |
context? | RunOptions |
Returns
AsyncGenerator
<string
, void
, never
>
Inherited from
BaseAgentInterface.runStream
Defined in
packages/agents/src/interfaces/agent.ts:227
getHistory
▸ getHistory(): Message
[]
Get conversation history with type-safe messages
Returns
Message
[]
Inherited from
BaseAgentInterface.getHistory
Defined in
packages/agents/src/interfaces/agent.ts:232
clearHistory
▸ clearHistory(): void
Clear conversation history
Returns
void
Inherited from
BaseAgentInterface.clearHistory