Neurons API
Neurons are specialized AI cells that process information and execute tasks. They can be connected to reflexes (tools) to extend their capabilities.
List Neurons
Get a list of neurons with optional filtering.
Brain scope required. Include the X-Brain-Id header or configure getBrainId in the public client.
| Header | Type | Description |
|---|
X-Brain-Id | string (UUID) | Required. Brain ID for scoping |
Query Parameters
| Parameter | Type | Description |
|---|
search | string | Search by name or description |
limit | number | Maximum number of results (default: 20) |
offset | number | Offset for pagination |
sortBy | string | Sort field: created_at, updated_at, name |
sortDirection | string | Sort direction: asc or desc |
Example Request
const neurons = await auvy.neurons.list({
is_active: true
})
curl https://api.auvy.ai/v1/neurons?is_active=true \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Brain-Id: YOUR_BRAIN_ID"
Get Neuron
Get a single neuron by ID.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Neuron UUID |
Create Neuron
Create a new neuron.
Request Body
| Field | Type | Required | Description |
|---|
name | string | Yes | Neuron name |
description | string | No | Neuron description |
neuron_config | object | No | Neuron configuration (see below) |
is_active | boolean | No | Active status (default: true) |
is_core | boolean | No | Core neuron flag (default: false) |
synapse_id | string | No | Associated receptor UUID (legacy alias for receptor_id) |
Neuron Configuration
The neuron_config object can include:
| Field | Type | Description |
|---|
recollection_ids | array | Array of recollection UUIDs for memory access (must be valid UUIDs) |
model | string | AI model to use (standard neurons only) |
temperature | number | Model temperature |
max_tokens | number | Maximum tokens |
neuron_type | string | standard (default) or quality_gate |
quality_gate | object | Required when neuron_type is quality_gate (see below) |
Standard neurons run one configured model per invocation.
Quality Gate neurons run the same prompt across multiple models in parallel and return agreement metadata (verdict, confidence, contradictions, consensus). They do not support tools, structured output, or streaming.
When neuron_type is quality_gate, include a quality_gate object:
| Field | Type | Description |
|---|
models | array | At least 2 model configs: { provider: string, model: string } |
prompt | string | The quality gate prompt (e.g. “Evaluate the following.”) |
context | string | Optional extra context for the evaluation |
Note: A recollection is auto-created on neuron creation and added to recollection_ids if not provided. recollection_ids is preserved during updates unless explicitly changed.
Example Request
const neuron = await auvy.neurons.create({
name: 'My Neuron',
description: 'A sample neuron',
neuron_config: {
model: 'gpt-4',
temperature: 0.7
},
is_active: true
})
curl -X POST https://api.auvy.ai/v1/neurons \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Neuron",
"description": "A sample neuron",
"neuron_config": {
"model": "gpt-4",
"temperature": 0.7
},
"is_active": true
}'
Update Neuron
Update an existing neuron.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Neuron UUID |
Request Body
All fields optional:
| Field | Type | Description |
|---|
name | string | Neuron name |
description | string | Neuron description |
neuron_config | object | Neuron configuration |
is_active | boolean | Active status |
is_core | boolean | Core neuron flag |
Delete Neuron
Delete a neuron permanently.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Neuron UUID |
Response
Note: Permanently deletes the neuron and invalidates associated receptor cache.
Neuron Reflexes
List Neuron Reflexes
Get all reflexes associated with a neuron.
GET /v1/neurons/:id/reflexes
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Neuron UUID |
Response
Returns array of reflex objects:
[
{
"id": "reflex-uuid",
"name": "My Reflex",
"type": "sensory",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z"
}
]
Add Reflex to Neuron
Associate a reflex with a neuron.
POST /v1/neurons/:id/reflexes
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Neuron UUID |
Request Body
| Field | Type | Required | Description |
|---|
reflex_id | string | Yes | Reflex UUID |
Example Request
await auvy.neurons.addReflex('neuron-uuid', 'reflex-uuid')
curl -X POST https://api.auvy.ai/v1/neurons/uuid/reflexes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reflex_id": "reflex-uuid"
}'
Remove Reflex from Neuron
Remove a reflex association from a neuron.
DELETE /v1/neurons/:id/reflexes/:reflexId
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Neuron UUID |
reflexId | string | Reflex UUID |
Response
Error Responses
404 - Neuron or reflex not found
409 - Reflex already assigned to neuron (when adding)