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
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.
list_files
List all files in the project to understand the overall structure.
propose_edit
Suggest code changes that you review before applying. Shows a diff view.
build
Compile the contract and return results including errors and warnings.
search_docs
Search Algorand documentation for concepts, patterns, and best practices.
get_arc
Look up specific ARC (Algorand Request for Comments) standards.
explain_error
Get detailed explanations and fixes for compiler/runtime errors.
Writing Effective Prompts
Get better results by being specific about what you need:
Be Specific
Provide Context
Explain Your Goal
Common Tasks
Implementing Features
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
1"The build shows this error:
2'Cannot find name GlobalState'
3
4What import am I missing?"
Understanding Code
1"Explain what the optIn method does and when it gets called"
Learning Patterns
1"Show me the correct pattern for storing user data in box storage with a map"
Refactoring
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:
- Agent analyzes your request and reads relevant files
- Agent proposes edits with a clear diff view
- You review each proposed change
- Accept to apply, or reject with feedback
- Agent can iterate based on your feedback
Language-Specific Knowledge
The agent adapts its suggestions based on your project's language:
PuyaTS (TypeScript)
- Uses
uint64withnsuffix for numbers GlobalState,LocalState,BoxMappatterns@abimethod()decoratorssendPayment(),sendAssetTransfer()for inner txns
Puya (Python)
- Uses
UInt64,Bytestypes GlobalState(),LocalState(),BoxMap()@arc4.abimethoddecoratorsitxn.Payment(),itxn.AssetTransfer()for inner txns
TEAL
- Stack-based opcodes
app_global_get,app_global_putitxn_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