← Back to Blog
Guide

AI Chat vs AI Agent: When to Use Each

Jun 14, 2026·5 min read

Two AI tools, two different jobs

When you open the Spinini editor, you have two AI tools available:

1. AI Chat panel — click the chat bubble icon in the left sidebar

2. Spinini AI Agent — the main AI Agent, also in the left sidebar

They're both powered by DeepSeek R1 by default and they both understand your codebase. But they serve fundamentally different purposes. Using the wrong one wastes credits and time.

The AI Chat panel: your thinking partner

The Chat panel is a multi-turn conversational assistant. It doesn't touch your files. It can't create a file, run a command, or change any code. What it does:

  • Answers questions about your code ("What does this useEffect hook actually do?")
  • Explains errors ("Why am I getting CORS errors on POST but not GET?")
  • Discusses architecture ("Should I use JWT or sessions for auth in this app?")
  • Teaches concepts ("Walk me through how React's reconciliation algorithm works")
  • Reviews code you paste in ("Is there a security problem with this SQL query?")

The conversation persists across sessions — your last 3 conversations are shown expanded, older ones collapsed. When you come back to a project, your chat history is right there. This makes it useful as a running log of decisions and explanations for your project.

Use Chat when you want to understand something. It's cheaper than a full agent run for questions, and the conversational format lets you follow up naturally.

The Spinini AI Agent: your builder

The Spinini AI Agent takes action. It reads files, writes files, creates new files, runs terminal commands, installs packages, and fixes errors. It works through your task step by step and shows each action as it happens.

What the agent can do that Chat cannot:

  • Create an entire feature from scratch ("Build a user authentication system with JWT")
  • Edit multiple files at once ("Refactor the API to use async/await instead of callbacks")
  • Run commands ("Install these packages and set up the database schema")
  • Fix bugs by actually changing the code ("The login route is returning 401 — fix it")
  • Build entire apps from a description

Use the Agent when you want something done. Every agent run creates an automatic checkpoint of your project first, so you can always roll back if you don't like the result.

A practical decision tree

Ask yourself: do I want to understand something, or do I want something built?

  • "What is this function doing?" → Chat
  • "Rewrite this function to be more readable" → Agent
  • "Why is my Prisma query slow?" → Chat (to understand), then Agent (to fix it)
  • "Build me a settings page" → Agent
  • "Is this the right approach for handling payments?" → Chat
  • "Add Stripe payment processing to my checkout flow" → Agent
  • "Explain how WebSockets work" → Chat
  • "Add a WebSocket server to my Express app" → Agent

A workflow that uses both

Here's a typical session that combines both tools effectively:

1. You notice a bug. Open Chat: "My /api/orders route returns stale data when two requests come in simultaneously. Why?"

2. Chat explains the race condition and suggests an approach.

3. You open Spinini AI Agent: "Fix the race condition in /api/orders using the mutex approach you just described."

4. The agent edits the file. You check the result in the preview.

5. Back to Chat: "Can you explain what the mutex is doing here? I want to understand this pattern."

The result: you fixed a subtle bug AND you understand why the fix works. That's the combination at its best.

Credits

Chat is generally cheaper than Agent runs because it doesn't read your entire project's files — it only sees what you paste in or what you explicitly reference. Agent runs read files, write files, and sometimes run commands, all of which consume more tokens.

For a quick question, Chat might cost 5–15 credits. An agent task that rewrites a component might cost 50–200 credits. If your question is really just a question, use Chat.

Ready to start building?

Free account includes 100 AI credits/month. No credit card required.

Start for free →