
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@defai.digital/core
Advanced tools
Core orchestration engine for AutomatosX.
pnpm add @ax/core
This package provides the core functionality for AutomatosX:
import {
AgentLoader,
AgentRegistry,
AgentExecutor,
selectAgent,
selectAgentWithReason,
} from '@ax/core/agent';
// Load agents from directory
const loader = new AgentLoader();
const agents = await loader.loadFromDirectory('.automatosx/agents');
// Register agents
const registry = new AgentRegistry();
registry.registerMany(agents);
// Execute tasks
const executor = new AgentExecutor(registry, router);
const result = await executor.execute('backend', 'Create a REST API');
// Auto-select agent based on task
const selection = selectAgentWithReason('Build a React component', registry);
console.log(selection.agent.name); // 'frontend'
console.log(selection.reason); // 'Matched keywords: react, component'
import { MemoryManager } from '@ax/core/memory';
const memory = new MemoryManager({
dbPath: '.automatosx/memory/memories.db',
maxEntries: 10000,
});
// Add memory
const id = memory.add({
agent: 'backend',
type: 'conversation',
content: 'Designed REST API for users',
metadata: { task: 'api-design' },
});
// Search with full-text search
const results = memory.search('REST API', { limit: 10 });
// Clear old memories
memory.clear({ before: new Date('2024-01-01') });
// Get statistics
const stats = memory.getStats();
import { SessionManager } from '@ax/core/session';
const sessions = new SessionManager({
sessionsDir: '.automatosx/sessions',
});
// Create session
const session = await sessions.create({
primaryAgent: 'product',
task: 'Design authentication system',
});
// Add task to session
await sessions.addTask(session.id, {
agent: 'backend',
description: 'Implement API endpoints',
});
// Complete session
await sessions.complete(session.id, {
summary: 'Auth system designed and implemented',
});
import { ProviderRouter } from '@ax/core/router';
const router = new ProviderRouter(providers, {
onFallback: (from, to, reason) => {
console.log(`Switched from ${from} to ${to}: ${reason}`);
},
});
// Route request to best available provider
const response = await router.route(request, {
preferredProvider: 'claude',
enableFallback: true,
});
import { ConfigLoader } from '@ax/core/config';
const loader = new ConfigLoader();
const config = await loader.load('ax.config.json');
// Access typed config
console.log(config.providers.default);
console.log(config.execution.timeout);
import {
AutomatosXError,
AgentNotFoundError,
ProviderUnavailableError,
MemoryError,
findSimilar,
} from '@ax/core';
try {
registry.getOrThrow('backnd'); // typo
} catch (error) {
if (error instanceof AgentNotFoundError) {
console.log(error.suggestion); // 'Did you mean: backend?'
}
}
Apache-2.0
FAQs
Core orchestration engine for AutomatosX
We found that @defai.digital/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.