import type { LlmAdapter } from "./llm-types";
import type { ToolRegistry } from "./tool-registry";
import type { AgentState } from "./state";
export interface AgentAction {
    type: "tool_call" | "task_complete" | "task_failed";
    thought: string;
    toolName?: string;
    toolParams?: Record<string, unknown>;
    summary?: string;
    reason?: string;
}
/**
 * Agent Brain — The ReAct (Reason + Act) reasoning engine.
 *
 * This is the core loop:
 *   1. Build context (system prompt + history)
 *   2. Send to LLM
 *   3. Parse the THOUGHT + ACTION from the response
 *   4. Execute the tool
 *   5. Append the observation to history
 *   6. Loop until TASK_COMPLETE, TASK_FAILED, or max iterations
 */
export declare class AgentBrain {
    private llm;
    private tools;
    constructor(llm: LlmAdapter, tools: ToolRegistry);
    /**
     * Run one reasoning step: LLM produces a thought + action.
     */
    think(state: AgentState): Promise<{
        action: AgentAction;
        state: AgentState;
    }>;
    /**
     * Execute a tool call and return the observation.
     */
    act(action: AgentAction, state: AgentState): Promise<{
        observation: string;
        success: boolean;
        state: AgentState;
    }>;
    /**
     * Build the full message array for the LLM.
     */
    private buildMessages;
    /**
     * Parse the THOUGHT + ACTION text format from Ollama responses.
     */
    private parseTextResponse;
    private classifyAction;
}
//# sourceMappingURL=brain.d.ts.map