import { Agent } from '@mastra/core/agent';
import { createVertex } from '@ai-sdk/google-vertex';
import { Memory } from '@mastra/memory';
import { LibSQLStore, LibSQLVector } from '@mastra/libsql';
import { fastembed } from '@mastra/fastembed';
const vertex = createVertex({
project: PROJECT_ID,
location: 'global',
});
export const testAgent = new Agent({
id: 'testAgent',
name: 'Test Agent',
instructions: 'You are a helpful assistant. Be concise and friendly.',
model: vertex('gemini-2.5-flash'),
memory: new Memory({
storage: new LibSQLStore({ id: 'test-storage', url: 'file:./test-memory.db' }),
vector: new LibSQLVector({ id: 'test-vector', connectionUrl: 'file:./test-vector.db' }),
embedder: fastembed,
options: {
semanticRecall: { topK: 1, messageRange: 0, scope: "thread" }
},
});
});
import { Agent } from '@mastra/core/agent';
import { createVertex } from '@ai-sdk/google-vertex';
import { Memory } from '@mastra/memory';
import { LibSQLStore, LibSQLVector } from '@mastra/libsql';
import { fastembed } from '@mastra/fastembed';
const vertex = createVertex({
project: PROJECT_ID,
location: 'global',
});
export const testAgent = new Agent({
id: 'testAgent',
name: 'Test Agent',
instructions: 'You are a helpful assistant. Be concise and friendly.',
model: vertex('gemini-2.5-flash'),
memory: new Memory({
storage: new LibSQLStore({ id: 'test-storage', url: 'file:./test-memory.db' }),
vector: new LibSQLVector({ id: 'test-vector', connectionUrl: 'file:./test-vector.db' }),
embedder: fastembed,
options: {
semanticRecall: { topK: 1, messageRange: 0, scope: "thread" }
},
});
});