ConsoleKit enables agents to execute complex DeFi transactions on-chain. Any agent with any model can now transact autonomously with battle-tested security guardrails.
- Manage user funds and execute complex operations at scale
- Access modular functions for DeFi primitives: optimal routing, MEV protection, cross-chain liquidity
- Users keep full custody and delegate access to Agents
- Deploy agents on any interface: your website, telegram, or custom frontend
- Enable cross-chain interactions with same programmable account and execution capabilities
- Prevent unauthorized transactions with on-chain policy enforcement
- Skip the complexity: accounts, policies, execution, RPC management all handled
At their core, agents are automated decision-makers that execute your on-chain interactions. They monitor conditions, execute transactions, and manage positions based on predefined logic. Here's what makes them powerful:
- Always-On Execution: Your agent can continuously monitor markets and execute operations
- Programmable Logic: Define sophisticated conditions and actions using ConsoleKit's DeFi primitives
- Built-in Safety: Every agent inherits Console's policy engine, protecting user funds with customizable constraints
While agents execute the strategies, you can enhance their decision-making by connecting them to external intelligence sources:
- Market Intelligence: Connect to price oracles, sentiment analyzers, and trading signal providers
- On-Chain Analytics: Integrate on-chain data providers for wallet behavior, protocol metrics, and liquidity analysis
- Custom AI Models: Plug in your own trained models for specialized strategy execution
These intelligence sources can be powered by AI models. For example, a DCA agent can be made smarter by:
- Using sentiment analysis models to adjust buy amounts based on social media trends and news
- Analyzing whale wallet movements to detect accumulation/distribution patterns
- Learning from historical market behavior to optimize entry timing across different market conditions
ConsoleKit handles the secure execution while you focus on integrating these intelligence systems.
DeFi agents often involve complex parameters and operations. Make them accessible through natural language interfaces so users can interact conversationally instead of setting technical parameters.
Turn "Set a DCA strategy for 1000 USDC into ETH over 30 days with increased buys during high sentiment periods" into executable actions.
Check out these examples demonstrating how to interface ConsoleKit agents with popular AI frameworks like openAi SDK, and langChain or directly as MCP server:
The System Architecture & Core Concepts documentation provides a comprehensive overview of ConsoleKit's design principles, components, and terminology. This section is essential reading for developers to understand:
- Core architectural components and their interactions
- Key terminologies and concepts used throughout the SDK
- Security model and policy engine fundamentals
- Integration patterns and best practices
We recommend reviewing this documentation before starting development to ensure a solid foundation in ConsoleKit's principles.
To install the SDK, use npm or yarn:
npm install brahma-console-kit
or
yarn add brahma-console-kit
To quickly bootstrap your ConsoleKit project, you can use our scaffold agent repository
The scaffold repository includes a collection of example implementations showcasing how to build autonomous DeFi agents using ConsoleKit. This repository demonstrates integration patterns ranging from LLM-powered execution to automated DeFi workflows.
ConsoleKit
is the main class that provides access to the core functionalities of the SDK. It requires an API key and a base URL for initialization.
Example:
import ConsoleKit from "brahma-console-kit";
const apiKey = "your-api-key";
const baseURL = "https://api.consolekit.com";
const consoleKit = new ConsoleKit(apiKey, baseURL);
CoreActions
provides core DeFi functions such as sending tokens and swapping assets, as well as fetching user information.
Example:
const coreActions = consoleKit.coreActions;
async function fetchAccounts(eoa: string) {
const accounts = await coreActions.fetchExistingAccounts(eoa);
console.log(accounts);
}
PublicDeployer
handles executor subscription and brahma account deployments directly through EOAs in a gasless manner.
Example:
const publicDeployer = consoleKit.publicDeployer;
async function deployStrategy(
owner: string,
chainId: number,
feeToken: string
) {
const preComputeData = await publicDeployer.fetchPreComputeData(
owner,
chainId,
feeToken
);
console.log(preComputeData);
}
AutomationContext
manages automation services, including subscribing to, updating, and canceling automated tasks.
Example:
const automationContext = consoleKit.automationContext;
async function subscribeToAutomation(params: any) {
const response = await automationContext.subscribeToAutomation(params);
console.log(response);
}
The fetchAutomationSubscriptions
function retrieves subscriptions associated with a given account address and blockchain network. You can specify a custom metadata type, or use the default structure.
ConsoleKit provides flexible functions to fetch automation subscriptions with customizable metadata. This allows you to tailor the metadata structure to your specific needs.
- Default Metadata: If no template is provided, the metadata will include only
baseToken
andevery
. See the BaseMetadata type definition. - Custom Metadata: Specify a template to include additional fields. See the CustomMetadata type definition.
Example:
// Default metadata
const subscriptions = await automationContext.fetchAutomationSubscriptions(
accountAddress,
chainId
);
// Custom metadata
type CustomMetadata = { customField1?: string; customField2?: number };
const customSubscriptions =
await automationContext.fetchAutomationSubscriptions<CustomMetadata>(
accountAddress,
chainId
);
The fetchSubscriptionsByRegistryID
function retrieves subscriptions for a specific externally owned account (EOA) and registry ID. Similar to the previous function, you can specify a custom metadata type.
Example:
// Default metadata
const subscriptions = await automationContext.fetchSubscriptionsByRegistryID(
eoa,
registryId
);
// Custom metadata
type CustomMetadata = { customField1?: string; customField2?: number };
const customSubscriptions =
await automationContext.fetchSubscriptionsByRegistryID<CustomMetadata>(
eoa,
registryId
);
This overview provides a basic understanding of how to initialize and use the main classes in the ConsoleKit
SDK. For more detailed usage, refer to the documentation or explore the source code.
Security audits performed on Brahma accounts. Please refer to the following reports for detailed security analysis and findings:
This project is licensed under the MIT License.
Safe Agenthon api-key: 65832024-c1f4-48d2-81e6-3460f2722600
and url: https://dev.console.fi/