teta.so

AI Agent

The AI agent is the core of the Teta development experience. It is powered by Claude and runs inside your project's sandbox as a full-featured coding assistant that can read, write, and execute code on your behalf.

What the AI agent is

The agent is an instance of Claude Code CLI running inside your E2B sandbox. It is not a simple chatbot that suggests code snippets — it is an autonomous agent with direct access to your project's file system, terminal, and development tools. When you send a message, the agent can:

  • Read and understand your existing codebase.
  • Create new files and edit existing ones.
  • Run terminal commands (install packages, start servers, run tests).
  • Search the web for documentation and solutions.
  • Generate images using AI.
  • Take screenshots of your running app and read console logs.

The agent operates through the Claude Code CLI via a proxy, using the Agent SDK V1 query() API. This gives it access to the full set of Model Context Protocol (MCP) tools configured in the sandbox.

How it works

When you send a message in the chat panel, here is what happens:

  1. Your message is sent to the backend, which forwards it to the agent session running in your sandbox.
  2. The agent receives your message along with the conversation history and its system prompt.
  3. Claude analyzes your request and decides which tools to use — it might read files to understand context, then edit code, then run a build to verify the changes work.
  4. Each tool call and its result is streamed back to the frontend in real time, so you can watch the agent work.
  5. The agent continues making tool calls until it has completed your request, then sends a final summary message.

The agent sees everything in your project: source files, configuration, package.json, build output, and error logs. This means it can make informed decisions about how to implement your requests.

Tool approval modes

Teta offers two modes for how the agent interacts with your project:

Auto mode

In auto mode, the agent works autonomously. It reads files, writes code, runs commands, and makes changes without asking for permission. This is the fastest way to work and is ideal when you trust the agent to make good decisions — for example, when scaffolding a new feature or fixing a straightforward bug.

Supervised mode

In supervised mode, every destructive action requires your explicit approval. When the agent wants to write a file, edit code, or run a terminal command, it pauses and shows you exactly what it plans to do. You can:

  • Approve the action (press Enter) to let the agent proceed.
  • Reject the action (press Escape) to block it and let the agent try a different approach.

Supervised mode is useful when you want to review each change carefully, learn from the agent's approach, or work on sensitive parts of your codebase.

You can switch between auto and supervised mode at any time using the toggle in the chat panel. The mode applies per session and does not affect other chat tabs.

What the agent can do

The agent has a broad set of capabilities through its MCP tools:

Capability Description
Create and edit files Write new files or modify existing ones anywhere in your project.
Run terminal commands Execute any shell command — install packages, run builds, start servers, run tests.
Search and read code Use glob patterns and regex search to find and read files across your codebase.
Search the web Look up documentation, find solutions to errors, research libraries.
Fetch web content Retrieve and analyze content from URLs — useful for API docs and references.
Generate images Create images using AI (Gemini 3.1 Flash) and save them to your project as optimized WebP files.
Take screenshots Capture screenshots of your running app to verify visual changes.
Read console logs Check browser console output for errors and warnings.

The agent's context

The agent is aware of more than just your current message. Its context includes:

  • Project files — The full file system of your SvelteKit project, including source code, configuration files, and dependencies.
  • Conversation history — All previous messages in the current chat session, so the agent remembers what you discussed and what changes it has already made.
  • Build output — Error messages, warnings, and logs from the SvelteKit dev server, helping the agent diagnose and fix build issues.
  • System prompt — Instructions that define the agent's behavior, coding standards, and knowledge of the Teta platform.

This rich context means you can have natural, ongoing conversations. You can say "fix that error" without explaining which error, or "add a dark mode toggle to the component you just created" without repeating details.

Multi-chat sessions

Teta supports multiple chat tabs within a single project. Each chat tab runs its own independent agent session:

  • Separate conversation history — Each tab maintains its own message thread. The agent in tab A does not see messages from tab B.
  • Independent execution — Agents in different tabs can work concurrently. One tab can be generating a new page while another is fixing a bug.
  • Shared file system — All tabs operate on the same sandbox file system, so changes made in one chat are visible to the agent in another chat (once it reads the files).

Multi-chat is useful for parallel workflows: use one tab for building features and another for debugging, or keep a long-running conversation for the overall project while opening short-lived tabs for specific tasks.

How the agent handles complex tasks

Not every request is a one-step change. When you ask for something substantial, the agent uses structured strategies to break the work into manageable steps and give you control over the process. Each strategy has its own dedicated page:

  • Plan Mode — The agent explores your codebase and presents a step-by-step plan for your approval before writing any code.
  • Sub-Agent Execution — Each step is handled by a fresh, focused sub-agent with review checkpoints between steps.
  • Parallel Execution — Split work across multiple chat tabs, with one agent implementing and another reviewing.

In practice, the agent combines these strategies: it plans first, then executes using sub-agents, and suggests splitting independent work across chat tabs when it makes sense.

Tips for working with the agent

Be specific about what you want. Instead of "make the homepage better," try "add a hero section with a headline, subtext, and a call-to-action button to the homepage." The more context you provide, the better the result.

Iterate in small steps. Rather than asking for an entire application in one message, build incrementally. Start with the layout, then add functionality, then polish the design. This gives you more control and makes it easier to course-correct.

Use supervised mode for learning. If you want to understand how the agent approaches a problem, switch to supervised mode and review each step. You will see exactly which files it reads, what changes it makes, and what commands it runs.

Reference existing code. If you have a pattern you want the agent to follow, mention it: "Use the same card component style as the pricing page" or "Follow the same data fetching pattern as the dashboard."

Let the agent fix its own errors. If a build fails after a change, the agent can see the error output. Simply say "fix the build error" and it will read the error message, diagnose the issue, and apply a fix.

Start a new chat for unrelated tasks. If you are switching to a completely different task, open a new chat tab. This keeps conversation history focused and avoids confusing the agent with unrelated context.

FAQ

Does the agent remember previous chat sessions?

The agent remembers all messages within the current chat tab session. However, once you close a chat tab and open a new one, the agent starts fresh without memory of previous conversations. Your chat history is saved and visible in the UI, but a new agent session does not automatically load old messages as context.

Can the agent break my project?

The agent can make changes that introduce bugs or build errors, just like any developer. If this happens, you can ask the agent to fix the issue, undo recent changes, or use supervised mode to review changes before they are applied. The sandbox also provides isolation — nothing the agent does affects your production deployment until you explicitly deploy.

How does the agent decide which tools to use?

Claude analyzes your request and determines the best approach based on its training and the available tools. For example, if you ask to "add a contact form," it might first use Glob and Read to understand your project structure, then use Write/Edit to create or modify components, then check the build output to ensure everything compiles. The tool selection is automatic and adaptive.

Is there a limit to how much the agent can do in one message?

There is no hard limit on the number of tool calls per message. The agent will continue working until it considers the task complete. For very large tasks, it may summarize progress and suggest next steps rather than trying to do everything in a single pass.

Can I use my own AI API key instead of the built-in one?

Currently, the AI agent uses Teta's managed Claude infrastructure. Bringing your own API key is not supported at this time, but it is something we are considering for future releases.