Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/agent/src/agents/graphs/core-graph/agent.graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export class Graph {
// Initialize database
await initializeDatabase(this.snakAgent.getDatabaseCredentials());
this.toolsList = await initializeToolsList(this.agentConfig);
console.log(`Tools list length: ${this.toolsList.length}`);
// Initialize RAG agent if enabled
if (this.agentConfig.rag?.enabled !== false) {
await this.initializeRagAgent();
Expand Down Expand Up @@ -402,6 +403,7 @@ export class Graph {
typeof GraphState.State,
typeof GraphConfigurableAnnotation.State
> {
console.log(`Tools list length: ${this.toolsList.length}`);
const memory = new MemoryGraph(
this.agentConfig.graph.model,
this.agentConfig.memory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class AgentExecutorGraph {
current_directive: state.tasks[state.tasks.length - 1].task?.directive,
success_criteria: state.tasks[state.tasks.length - 1].task?.success_check,
});
console.log(this.toolsList.length);
const modelBind = this.model.bindTools!(this.toolsList);

const result = modelBind.invoke(formattedPrompt);
Expand Down
3 changes: 2 additions & 1 deletion packages/agent/src/services/mcp/src/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class MCP_CONTROLLER {
try {
const tools = await this.client.getTools();
this.tools = tools;
console.log(tools);
logger.info(`Parsed ${tools.length} tools from MCP servers`);
} catch (error) {
throw new Error(`Error getting tools: ${error}`);
Expand All @@ -78,7 +79,7 @@ export class MCP_CONTROLLER {
public initializeConnections = async () => {
try {
await this.client.initializeConnections();
this.parseTools();
await this.parseTools();
logger.info(`MCP connections initialized successfully`);
} catch (error) {
throw new Error(`Error initializing connections: ${error}`);
Expand Down