@blockroll/gaia-sdk
v1.0.2
Published
Official Node.js SDK for the GAIA AI Workforce Platform
Readme
GAIA SDK
The official Node.js SDK for the GAIA AI Workforce Platform. Integrate autonomous AI agents into your applications with ease using our agent-centric, event-driven architecture.
Installation
npm install @blockroll/gaia-sdkQuick Start
Initialize the Client
import { GaiaClient } from '@blockroll/gaia-sdk';
const client = new GaiaClient({
apiKey: 'your-api-key',
baseUrl: 'https://api.gaia.nexus' // Optional
});Talking to an Agent
Our SDK uses an event-driven pattern for intuitive agent interaction.
// Get an agent by ID
const agent = await client.agents.get('agent-uuid');
// Listen for neural responses
agent.on('message', (response) => {
console.log(`${agent.name} responds:`, response.message);
});
// Send a message
await agent.send("Analyze the latest market trends.");Features
🤖 Agent Lifecycle Management
Manage your entire AI workforce programmatically:
client.agents.list(): Retrieve all provisioned nodes.client.agents.create(data): Deploy a new neural agent.client.agents.get(id): Access a specific agent node.client.agents.delete(id): Terminate an agent instance.
🧠 Event-Driven Communication
The GaiaAgent class extends a standard emitter, allowing you to build reactive UIs and workflows based on agent state changes and incoming messages.
🛡️ Type Safety
Fully written in TypeScript, providing deep IDE completion and build-time safety for your AI integrations.
Environment Variables
For security, we recommend managing your API key via environment variables:
GAIA_API_KEY=your_key_hereLicense
MIT © Blockroll
