Skip to content

AI Agent Overview

The NeuralRepo AI agent is a conversational assistant embedded directly in the web app. It can search your ideas, create new ones, discover connections, brainstorm, summarize, and perform advanced analysis — all through natural language, with results rendered as visual artifacts.

The agent is available in two places:

Neural Canvas

A full split-pane view with a chat panel on the left and an artifact canvas on the right. Access it from the Neural Canvas tab in the web dashboard. Best for deep exploration sessions where you want to see multiple artifacts side-by-side.

Mind Map Chat Panel

A floating, draggable chat panel that hovers over the mind map. Tool results animate directly onto the graph — nodes appear, edges draw, and clusters form in real time. Best for exploring your idea graph while conversing with the agent.

The agent supports multiple models. Anthropic models require a BYOK key; Workers AI models are available to all Pro users with no key required.

KeyLabelProviderBYOK RequiredContextNotes
sonnetSonnetAnthropicYes200KDefault; best reasoning
haikuHaikuAnthropicYes200KFaster, lower cost
opusOpusAnthropicYes200KMost capable
qwen-30bQwen 30BWorkers AINo32KCreative tasks, brainstorm sub-agent
llama-70bLlama 70BWorkers AINo128KGeneral purpose
gpt-oss-120bGPT-OSS 120BWorkers AINo128KGeneral purpose
mistral-small-24bMistral Small 24BWorkers AINo32KFast, compact

The model selector appears at the top of both chat interfaces. Your last-used model is remembered in localStorage.

All Anthropic requests are routed through Cloudflare AI Gateway — providing logging, caching, and rate limiting without exposing your key to additional parties.

The agent is a Cloudflare Durable Object (NeuralRepoAgent) built on the Agents SDK AIChatAgent class. It persists conversation history per user across sessions.

Browser → WebSocket → /api/v1/agent/ws
Durable Object (NeuralRepoAgent)
streamText (Vercel AI SDK)
┌─────┴─────────────┐
│ Anthropic (BYOK) │ ← AI Gateway
│ Workers AI │ ← AI binding
└───────────────────┘

Messages stream back over the WebSocket connection. The frontend uses the Agents SDK client to manage the connection and reconstruct streaming state.

Anthropic models support extended thinking — internal reasoning the model performs before responding. In the chat UI, a collapsible “Thought process” block appears above the response when thinking is active. While the model is still generating, an animated neural icon shows it is working.

Each conversation begins with a system prompt that includes:

  • The user’s total idea count
  • 5 most recent ideas (3 for compact-prompt models)
  • Up to 20 tags (10 for compact models)

In Graph Mode (mind map chat panel), the system prompt also includes a note that the graph is the primary output, encouraging the agent to use tools aggressively and keep prose brief.

When using the chat panel embedded in the mind map, tool results animate directly onto the graph:

  • New ideas — nodes appear with a pulse animation
  • New connections — edges draw with an animation along the path
  • Search results — matching nodes highlight
  • Semantic layout — nodes re-cluster with a physics re-heat

Every graph mutation is added to an undo stack. The undo button in the chat panel header reverses the last agent action (deleting created relations, removing created ideas, etc.).

At the top of the Neural Canvas chat, a working memory bar shows a summary of what the agent has loaded in the current session:

  • Number of unique ideas referenced in artifacts
  • Number of connections made
  • Last search query

This gives you a quick sense of the agent’s context without scrolling through the conversation.

Both interfaces show a prompt palette — a set of contextual quick-action chips that update based on what you have selected or what the agent last did:

  • Default chips — “What am I working on?”, “Find missing connections”, “Weekly insights”, “Surprise me”
  • Single selection — Expand, Find related, Brainstorm, Suggest tags, Summarize
  • Multi-selection — Connect these, Compare, Summarize cluster, Visualize
  • Post-action — context-specific follow-ups after brainstorm, search, scoring, etc.

Click any chip to send that prompt immediately.

When you have nodes selected in the mind map, the agent automatically receives a list of selected idea IDs and titles as additional context. This allows prompts like “compare these” or “link these ideas” to work without you naming the ideas explicitly.