Core / Agent

Agent Modes

Three operational modes with different capabilities and safety levels.

The agent type is defined in apps/thesis/src/server/types/agent.ts:

type AgentMode = 'agent' | 'plan' | 'ask';

Ask Mode

Ask mode is the safest option for exploration and questions. The agent can only read information - it cannot modify your notebook or execute code.

Available tools (4):

  • list_dir - List directory contents
  • read_file - Read file contents
  • read_notebook - Read notebook cells
  • web_search - Search the web (if enabled)

Capabilities:

  • Answer questions about code
  • Explain notebook content
  • Search for documentation
  • Explore file structure

Constraints:

  • Cannot create, edit, or delete cells
  • Cannot execute code
  • Cannot modify files

Plan Mode

Plan mode adds the ability to create structured plans. Use this when you want the agent to research and outline an approach before execution.

Available tools (5):

  • All Ask mode tools, plus:
  • create_plan - Create step-by-step task plans

Capabilities:

  • Everything in Ask mode
  • Create detailed implementation plans
  • Break down complex tasks into steps
  • Track progress with status markers

Constraints:

  • Cannot execute plans automatically
  • Cannot modify notebooks or files

Agent Mode

Agent mode (default) gives the agent full capabilities for autonomous task execution.

Available tools (13):

  • All Plan mode tools, plus:
  • exec_local_shell - Execute shell commands
  • add_notebook_cell - Add new cells
  • create_notebook - Create new notebooks
  • delete_notebook_cells - Remove cells
  • edit_notebook_cell - Modify cell content
  • run_notebook_cell - Execute cells
  • read_notebook_cell_output - Read execution output
  • read_notebook_cell - Read individual cells

Capabilities:

  • Full notebook manipulation
  • Code execution and debugging
  • File system operations
  • Multi-step workflow automation

Choosing a Mode

Use the --mode flag with the CLI:

# Read-only exploration
thesis exec "What does this notebook do?" --mode ask

# Create a plan first
thesis exec "Plan a data analysis pipeline" --mode plan

# Full execution (default)
thesis exec "Analyze this dataset and create visualizations"

Tip

Start with ask mode to understand your notebook, use plan mode for complex tasks, then switch to agent mode for execution.

Reasoning Effort

Each mode has a different base reasoning effort that affects how much the model "thinks" before responding:

ModeBase EffortToken Range
AskLow800-1200 tokens
PlanMedium1500-2500 tokens
AgentHigh2000-4000 tokens

The effort is dynamically adjusted based on message complexity - longer messages or those containing ML/data science keywords automatically receive higher reasoning allocation.