
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@frontegg/ai-sdk
Advanced tools
The Frontegg AI Agents SDK provides AI Agent developers with tools and utilities to easily empower AI agents within their applications. This SDK seamlessly integrates with the Frontegg platform, enabling advanced tool authentication, authorization, and id
The Frontegg AI Agents SDK provides AI Agent developers with tools and utilities to easily empower AI agents within their applications. This SDK seamlessly integrates with the Frontegg platform, enabling advanced tool authentication, authorization, and identity management capabilities for AI Agents.
Ensure that your environment meets the following requirements:
npm install @frontegg/ai-sdk
# or
yarn add @frontegg/ai-sdk
Initialize the Frontegg AI client to connect with your tenant environment:
// frontegg.config.ts
import { Environment, FronteggAiClient } from '@frontegg/ai-sdk';
export const fronteggClient = await FronteggAiClient.getInstance({
agentId: process.env.FRONTEGG_AGENT_ID!,
clientId: process.env.FRONTEGG_CLIENT_ID!,
clientSecret: process.env.FRONTEGG_CLIENT_SECRET!,
environment: Environment.EU,
});
Fetch user-specific tools from Frontegg and dynamically construct a LangChain agent:
public async processRequest(request: string, userJwt: string): Promise<any> {
if (!this.fronteggAiClient) {
throw new Error('Frontegg client not initialized');
}
await this.fronteggAiClient.setUserContextByJWT(userJwt);
const tools = await this.fronteggAiClient.getToolsAsLangchainTools();
const messages = [
{
role: 'system',
content: this.fronteggAiClient.addUserContextToSystemPrompt(this.systemMessage),
},
...this.conversationHistory,
new MessagesPlaceholder('agent_scratchpad'),
];
const prompt = ChatPromptTemplate.fromMessages(messages);
const openAIFunctionsAgent = await createOpenAIFunctionsAgent({
llm: this.model as any,
tools: tools as any,
prompt: prompt as any,
});
this.agent = new AgentExecutor({
agent: openAIFunctionsAgent as any,
tools: tools as any,
verbose: true,
});
const result = await this.agent.invoke({ input: request });
return result;
}
For detailed documentation, please visit our official documentation.
Check out our example project for sample implementations and use cases.
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Frontegg is a powerful user management platform that provides everything modern apps need beyond authentication.
FAQs
The Frontegg AI Agents SDK provides AI Agent developers with tools and utilities to easily empower AI agents within their applications. This SDK seamlessly integrates with the Frontegg platform, enabling advanced tool authentication, authorization, and id
We found that @frontegg/ai-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.