Alpha preview. Not for production use.
Working anonymously. to save your work permanently.
Reference

Prompts & Tools

Learn about the AI agent's capabilities, available tools, and how to interact with it effectively.

How the AI Agent Works

The AI agent is context-aware and understands your project's language, files, and structure. It uses a system prompt that includes:

  • Project context - Name, language, current file, and file list
  • Language-specific knowledge - Patterns for PuyaTS, Puya, or TEAL
  • Algorand fundamentals - State management, ABI, opcodes, inner transactions
  • Tool capabilities - What actions it can perform
Tip
The agent always reads relevant files before proposing changes. If it proposes something that doesn't fit your codebase, ask it to read the specific file first.

Available Tools

The AI agent has access to several tools that help it assist you:

read_file

Read any file in your project to understand the code before suggesting changes.

Use when: Understanding existing code, checking imports, reviewing structure

list_files

List all files in the project to understand the overall structure.

Use when: Getting oriented in a new project, finding files to modify

propose_edit

Suggest code changes that you review before applying. Shows a diff view.

Use when: Making changes, fixing bugs, implementing features

build

Compile the contract and return results including errors and warnings.

Use when: Verifying changes work, analyzing errors, checking syntax

search_docs

Search Algorand documentation for concepts, patterns, and best practices.

Use when: Learning about features, finding correct syntax, understanding concepts

get_arc

Look up specific ARC (Algorand Request for Comments) standards.

Use when: Implementing standards (ABI, events, metadata)

explain_error

Get detailed explanations and fixes for compiler/runtime errors.

Use when: Understanding error messages, finding fixes

Writing Effective Prompts

Get better results by being specific about what you need:

Be Specific

Less effective "Add a counter"
More effective "Add a counter to the global state that increments each time the increment() method is called"

Provide Context

Less effective "Fix the error"
More effective "The build fails with 'Type uint64 is not assignable to type number' on line 15. How do I fix this?"

Explain Your Goal

Less effective "Add a function"
More effective "I need users to be able to transfer tokens to each other. Add a transfer method that deducts from sender's balance and adds to receiver's balance"

Common Tasks

Implementing Features

Text
1"Add a withdraw method that:
2- Takes an amount parameter
3- Checks the caller has sufficient balance
4- Sends the amount via inner transaction
5- Updates the balance state"

Fixing Errors

Text
1"The build shows this error:
2'Cannot find name GlobalState'
3
4What import am I missing?"

Understanding Code

Text
1"Explain what the optIn method does and when it gets called"

Learning Patterns

Text
1"Show me the correct pattern for storing user data in box storage with a map"

Refactoring

Text
1"The deposit and withdraw methods have duplicated validation logic.
2Extract it into a reusable helper function."

Edit Approval Workflow

When the agent proposes changes, you remain in control:

  1. Agent analyzes your request and reads relevant files
  2. Agent proposes edits with a clear diff view
  3. You review each proposed change
  4. Accept to apply, or reject with feedback
  5. Agent can iterate based on your feedback
Note
The agent tracks pending edits within a session. If it makes multiple changes to the same file, each edit builds on the previous one.

Language-Specific Knowledge

The agent adapts its suggestions based on your project's language:

PuyaTS (TypeScript)

  • Uses uint64 with n suffix for numbers
  • GlobalState, LocalState, BoxMap patterns
  • @abimethod() decorators
  • sendPayment(), sendAssetTransfer() for inner txns

Puya (Python)

  • Uses UInt64, Bytes types
  • GlobalState(), LocalState(), BoxMap()
  • @arc4.abimethod decorators
  • itxn.Payment(), itxn.AssetTransfer() for inner txns

TEAL

  • Stack-based opcodes
  • app_global_get, app_global_put
  • itxn_begin, itxn_field, itxn_submit
  • Method routing patterns

Limitations

  • File size - Very large files are truncated to prevent token limit issues
  • Project scope - Can only access files within the current project
  • Real-time state - Cannot query live blockchain state directly
  • External dependencies - Limited knowledge of third-party libraries
Tip
If the agent seems confused about your code, ask it to read the specific file first. This ensures it has the latest context.