Skip to content

.debug()


AgentForceAgent Optional Chainable

Enable debug logging for the agent to output configuration details and runtime information. Currently logs agent name, provider, and model configuration.

debug(): AgentForceAgent

Returns the AgentForceAgent instance for method chaining.

import { AgentForceAgent } from '@agentforce/adk';
const agent = new AgentForceAgent({
name: "MyAgent"
})
.useLLM("ollama", "gemma3:4b")
.systemPrompt("You are a helpful assistant")
.debug() // Logs: name, provider, model
.prompt("Hello world");
const response = await agent.output("text");

The debug() method supports fluent chaining and can be placed anywhere in the chain:

const agent = new AgentForceAgent({ name: "ChainedAgent" })
.debug() // Can be called early
.useLLM("ollama", "phi4-mini:latest")
.systemPrompt("You are an assistant")
.debug() // Or called multiple times
.prompt("Test prompt");