メインコンテンツまでスキップ

Class: AnthropicAgent

Hierarchy

Constructors

constructor

new AnthropicAgent(params): AnthropicAgent

Parameters

NameType
paramsAnthropicAgentParams

Returns

AnthropicAgent

Overrides

AgentRunner<Anthropic>.constructor

Defined in

packages/core/src/agent/anthropic.ts:39

Properties

#chatHistory

Private #chatHistory: ChatMessage<ToolCallLLMMessageOptions>[]

Inherited from

AgentRunner.#chatHistory

Defined in

packages/core/src/agent/base.ts:292


#llm

Private Readonly #llm: Anthropic

Inherited from

AgentRunner.#llm

Defined in

packages/core/src/agent/base.ts:287


#runner

Private Readonly #runner: AgentWorker<Anthropic, {}, ToolCallLLMMessageOptions>

Inherited from

AgentRunner.#runner

Defined in

packages/core/src/agent/base.ts:293


#systemPrompt

Private Readonly #systemPrompt: null | MessageContent = null

Inherited from

AgentRunner.#systemPrompt

Defined in

packages/core/src/agent/base.ts:291


#tools

Private Readonly #tools: BaseToolWithCall[] | (query: MessageContent) => Promise<BaseToolWithCall[]>

Inherited from

AgentRunner.#tools

Defined in

packages/core/src/agent/base.ts:288


createStore

createStore: () => object = AgentRunner.defaultCreateStore

Type declaration

▸ (): object

Returns

object

Overrides

AgentRunner.createStore

Defined in

packages/core/src/agent/anthropic.ts:55


taskHandler

Static taskHandler: TaskHandler<Anthropic>

Defined in

packages/core/src/agent/anthropic.ts:70

Accessors

chatHistory

get chatHistory(): ChatMessage<AdditionalMessageOptions>[]

Returns

ChatMessage<AdditionalMessageOptions>[]

Inherited from

AgentRunner.chatHistory

Defined in

packages/core/src/agent/base.ts:319


llm

get llm(): AI

Returns

AI

Inherited from

AgentRunner.llm

Defined in

packages/core/src/agent/base.ts:315

Methods

chat

chat(params): Promise<AgentChatResponse<ToolCallLLMMessageOptions>>

Parameters

NameType
paramsChatEngineParamsNonStreaming

Returns

Promise<AgentChatResponse<ToolCallLLMMessageOptions>>

Overrides

AgentRunner.chat

Defined in

packages/core/src/agent/anthropic.ts:57

chat(params): Promise<never>

Parameters

NameType
paramsChatEngineParamsStreaming

Returns

Promise<never>

Overrides

AgentRunner.chat

Defined in

packages/core/src/agent/anthropic.ts:60


createTask

createTask(message, stream?): Promise<ReadableStream<TaskStepOutput<Anthropic, {}, ToolCallLLMMessageOptions>>>

Parameters

NameTypeDefault value
messageMessageContentundefined
streambooleanfalse

Returns

Promise<ReadableStream<TaskStepOutput<Anthropic, {}, ToolCallLLMMessageOptions>>>

Inherited from

AgentRunner.createTask

Defined in

packages/core/src/agent/base.ts:347


getTools

getTools(query): BaseToolWithCall[] | Promise<BaseToolWithCall[]>

Parameters

NameType
queryMessageContent

Returns

BaseToolWithCall[] | Promise<BaseToolWithCall[]>

Inherited from

AgentRunner.getTools

Defined in

packages/core/src/agent/base.ts:327


reset

reset(): void

Returns

void

Inherited from

AgentRunner.reset

Defined in

packages/core/src/agent/base.ts:323


defaultCreateStore

defaultCreateStore(): object

Returns

object

Inherited from

AgentRunner.defaultCreateStore

Defined in

packages/core/src/agent/base.ts:298


shouldContinue

shouldContinue<AI, Store, AdditionalMessageOptions>(task): boolean

Type parameters

NameType
AIextends LLM<object, object>
Storeextends object = {}
AdditionalMessageOptionsextends object = AI extends LLM<object, AdditionalMessageOptions> ? AdditionalMessageOptions : never

Parameters

NameType
taskReadonly<TaskStep<AI, Store, AdditionalMessageOptions>>

Returns

boolean

Inherited from

AgentRunner.shouldContinue

Defined in

packages/core/src/agent/base.ts:333