Getting started

Quickstart

This quickstart shows the public integration flow: remember scoped context, then recall it for a task.

Set your API details

export NEUTRON_API_URL="https://neutronai.dev/api"
export NEUTRON_API_TOKEN="<server-issued-token>"
export NEUTRON_TENANT_ID="<tenant-id>"
export NEUTRON_SCOPE_ID="<authorized-scope-id>"

Remember a scoped memory

curl -X POST "$NEUTRON_API_URL/v1/memory/remember" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NEUTRON_API_TOKEN" \
  -d @- <<EOF
{
    "tenantId": "$NEUTRON_TENANT_ID",
    "scopeId": "$NEUTRON_SCOPE_ID",
    "type": "preference",
    "text": "The user prefers concise implementation notes.",
    "privacyClass": "user_private"
}
EOF

Recall memory for a task

curl -X POST "$NEUTRON_API_URL/v1/memory/recall" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NEUTRON_API_TOKEN" \
  -d @- <<EOF
{
    "tenantId": "$NEUTRON_TENANT_ID",
    "scopeIds": ["$NEUTRON_SCOPE_ID"],
    "query": "How should responses be written?"
}
EOF

Request an agent context pack

curl -X POST "$NEUTRON_API_URL/v1/memory/agent-context" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NEUTRON_API_TOKEN" \
  -d @- <<EOF
{
    "tenantId": "$NEUTRON_TENANT_ID",
    "scopeIds": ["$NEUTRON_SCOPE_ID"],
    "agentId": "support_assistant",
    "task": "Draft a concise implementation reply.",
    "tokenBudget": 1200
}
EOF

Next steps