Skip to main content

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.
GET /v1/neurons

Headers

HeaderTypeDescription
X-Brain-Idstring (UUID)Required. Brain ID for scoping

Query Parameters

ParameterTypeDescription
searchstringSearch by name or description
limitnumberMaximum number of results (default: 20)
offsetnumberOffset for pagination
sortBystringSort field: created_at, updated_at, name
sortDirectionstringSort direction: asc or desc

Example Request

const neurons = await auvy.neurons.list({
  is_active: true
})

Get Neuron

Get a single neuron by ID.
GET /v1/neurons/:id

Path Parameters

ParameterTypeDescription
idstringNeuron UUID

Create Neuron

Create a new neuron.
POST /v1/neurons

Request Body

FieldTypeRequiredDescription
namestringYesNeuron name
descriptionstringNoNeuron description
neuron_configobjectNoNeuron configuration (see below)
is_activebooleanNoActive status (default: true)
is_corebooleanNoCore neuron flag (default: false)
synapse_idstringNoAssociated receptor UUID (legacy alias for receptor_id)

Neuron Configuration

The neuron_config object can include:
FieldTypeDescription
recollection_idsarrayArray of recollection UUIDs for memory access (must be valid UUIDs)
modelstringAI model to use (standard neurons only)
temperaturenumberModel temperature
max_tokensnumberMaximum tokens
neuron_typestringstandard (default) or quality_gate
quality_gateobjectRequired 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:
FieldTypeDescription
modelsarrayAt least 2 model configs: { provider: string, model: string }
promptstringThe quality gate prompt (e.g. “Evaluate the following.”)
contextstringOptional 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
})

Update Neuron

Update an existing neuron.
PUT /v1/neurons/:id

Path Parameters

ParameterTypeDescription
idstringNeuron UUID

Request Body

All fields optional:
FieldTypeDescription
namestringNeuron name
descriptionstringNeuron description
neuron_configobjectNeuron configuration
is_activebooleanActive status
is_corebooleanCore neuron flag

Delete Neuron

Delete a neuron permanently.
DELETE /v1/neurons/:id

Path Parameters

ParameterTypeDescription
idstringNeuron UUID

Response

{
  "success": true
}
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

ParameterTypeDescription
idstringNeuron 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

ParameterTypeDescription
idstringNeuron UUID

Request Body

FieldTypeRequiredDescription
reflex_idstringYesReflex UUID

Example Request

await auvy.neurons.addReflex('neuron-uuid', 'reflex-uuid')

Remove Reflex from Neuron

Remove a reflex association from a neuron.
DELETE /v1/neurons/:id/reflexes/:reflexId

Path Parameters

ParameterTypeDescription
idstringNeuron UUID
reflexIdstringReflex UUID

Response

{
  "success": true
}

Error Responses

  • 404 - Neuron or reflex not found
  • 409 - Reflex already assigned to neuron (when adding)