Open in the interactive docs · markdown for agents: https://neuraldeep.tech/docs/drift-api.md

Drift · personal agent via API

Drift — our self-hosted AI agent with memory, a sandbox, skills, and Google/Telegram integrations. Usually you talk to it at neuraldeep.ru/driftagent or via the Telegram bot. But you can also go through the public API — from curl, the Python SDK, Cursor/Cline/Continue, your own bots, or CI.

Access: only with a paid Drift (Starter / Pro). Trial and admin-grant — no. Limits: inherited from the Hub account's plan (RPM / parallel / session / week — see limits below). Source label: every request via the API is stamped as source=api — visible in the dashboard and admin logs (web / api / telegram / scheduler).

1 · Issue a token

Open the Dashboard → the "🤖 Drift API tokens" section → "+ create token". The name is for your own notes ("cursor", "my-bot", etc.). The plaintext value (dft_*) is shown once at creation — copy it right away. Limit of 5 active tokens per user. You can revoke it at any time with the "revoke" button.

2 · Send a message

OpenAI-compatible /v1/chat/completions. Internally it runs a ReAct agent with tools (sandbox shell, web-search, Google, etc.) — the answer may not come immediately, the agent may spin through several iterations. Streaming via stream: true is recommended for long tasks.

curl https://drift.neuraldeep.tech/v1/chat/completions \
  -H "Authorization: Bearer dft_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-oss-120b",
    "messages": [
      {"role": "user", "content": "What do I have scheduled for tomorrow?"}
    ]
  }'
curl -N https://drift.neuraldeep.tech/v1/chat/completions \
  -H "Authorization: Bearer dft_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-oss-120b",
    "messages": [{"role":"user","content":"Read my MEMORY.md and summarize it briefly"}],
    "stream": true
  }'

# the event-stream returns:
#   data: {"choices":[{"delta":{"content":"..."}}],...}
#   data: [DONE]
from openai import OpenAI

# base_url points to Drift, the token is your personal dft_*
client = OpenAI(
    api_key="dft_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    base_url="https://drift.neuraldeep.tech/v1",
)

# Non-stream
r = client.chat.completions.create(
    model="gpt-oss-120b",  # or qwen3.6-35b-a3b — the Hub's two main LLMs
    messages=[{"role": "user", "content": "Save to memory: project Y starts on June 1"}],
)
print(r.choices[0].message.content)

# Stream
stream = client.chat.completions.create(
    model="gpt-oss-120b",
    messages=[{"role": "user", "content": "Show the list of my files and summarize MEMORY.md"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

The model field is which upstream LLM to use inside the agent: gpt-oss-120b (131k ctx, long reasoning, recommended default) or qwen3.6-35b-a3b (256k ctx, native tool-calls). If omitted — fallback to gpt-oss-120b. Don't pass the whole history in messages — Drift pulls memory from its own DB, otherwise you'll get duplication. Send only the latest user prompt.

3 · Manage chats (conversations)

By default all messages go into the user's single default chat. If you want to separate contexts (e.g., work and personal) — create chats explicitly and pass conversation_id.

# list your chats
curl https://drift.neuraldeep.tech/v1/conversations \
  -H "Authorization: Bearer dft_..."

# create a new one
curl -X POST https://drift.neuraldeep.tech/v1/conversations \
  -H "Authorization: Bearer dft_..." \
  -H "Content-Type: application/json" \
  -d '{"title": "Project X — research"}'
# → {"id": 1234, "title": "Project X — research", ...}

# send a message to a specific chat
curl -X POST https://drift.neuraldeep.tech/v1/chat/completions \
  -H "Authorization: Bearer dft_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-oss-120b",
    "messages": [{"role":"user","content":"What's the status on project X?"}],
    "conversation_id": 1234
  }'

# delete a chat
curl -X DELETE https://drift.neuraldeep.tech/v1/conversations/1234 \
  -H "Authorization: Bearer dft_..."

4 · Read the history

curl "https://drift.neuraldeep.tech/v1/history?conversation_id=1234&limit=50" \
  -H "Authorization: Bearer dft_..."
# → {"messages":[{"id":..., "role":"user|assistant", "content":"...", "created_at":..., "source":"api"}, ...]}

The source field in each message shows where it came from: web (neuraldeep.ru/driftagent), api (this endpoint), telegram (bot), scheduler (scheduled background task). Use it if you have mixed sources and need to filter.

What is NOT supported

· editing/regenerating messages (append only) · · branching (forks) · · event webhooks · · multi-image in one message (one — yes, via /v1/files/upload)

Your own tools / skills / MCP servers — supported since 28.05.26. See the "🔌 Your own tools, skills, MCP" section below: you can pass caller-tools (return-to-caller pattern), inline SKILL.md, and connect remote MCP servers right in the request.

Reference sections (markdown for agents)