Appearance
Class: Agent
Defined in: agent.ts:522
Single agent with basic tools and MCP support.
Constructors
Constructor
ts
new Agent(
config,
llm,
systemPrompt,
tools): Agent;Defined in: agent.ts:530
Parameters
config
Configuration for the agent.
llm
LLMClient
LLM client used by the agent to generate responses.
systemPrompt
string
tools
Tool[]
Returns
Agent
Properties
contextManager
ts
contextManager: ContextManager;Defined in: agent.ts:526
Manages conversation context, history, and available tools.
events
ts
events: AgentEventsEmitter;Defined in: agent.ts:524
Event emitter for agent lifecycle notifications.
logger
ts
logger: AgentLogger;Defined in: agent.ts:528
Logger instance used for agent-related logging.
Methods
getHistory()
ts
getHistory(): Message[];Defined in: agent.ts:781
Get message history.
Returns
Message[]
run()
ts
run(): Promise<void>;Defined in: agent.ts:553
Execute agent loop until task is complete or max steps reached.
Returns
Promise<void>