A simple walkthrough to set up NEURO locally and start building with autonomous agents.
Installation
Install the NEURO SDK using npm or yarn:
npm install @neuro/sdk # or yarn add @neuro/sdk
Run the Local Agent Simulator
Start the local development environment with the agent simulator:
npx neuro dev # The simulator will start on http://localhost:3402 # Agent dashboard available at http://localhost:3402/dashboard
Interact with the 402 API
Create your first agent and make a payment-required request:
import { NeuroAgent } from '@neuro/sdk';
// Initialize an agent
const agent = new NeuroAgent({
id: 'agent-001',
budget: 1000, // in micro-credits
strategy: 'cost-benefit'
});
// Request a service
const result = await agent.request({
service: 'text-analysis',
endpoint: 'https://api.neuro.network/analyze',
data: { text: 'Hello NEURO' }
});
console.log(result);