Basics
Local SDK Overview
AI-assisted coding in your local environment
The Local
class is the primary entry point for using the cloudcode Python SDK in your projects.
This Class is the lowest level sdk you’ll need to create an AI Coding agent.
Key Features
- AI-Powered Code Modification: Transform code with natural language prompts using leading AI models like GPT-4 and Claude
- File Management: Create, read, modify, and search files in your local environment
- Cost Tracking: Monitor and manage your API usage with detailed cost reporting
- Git Integration: Optional tracking of changes via git for easy review and rollback
- Asynchronous Processing: Run long coding tasks in the background with headless mode
- Architect Mode: Use a two-model approach for better efficiency and performance
When to Use Local SDK
The Local SDK is ideal when you want to:
- Integrate AI-assisted coding into your own applications or workflows
- Work with code in your existing local environment
- Maintain control over your files and version control
- Track costs and manage API usage programmatically
Quick Start Example
Run the real Quick Start script included in the examples:
This script will:
- Create
src/calculator.py
- Add
multiply
anddivide
functions with zero-division handling - Print the diff and updated file content
Here’s the core snippet from quick-start.py
:
For installation instructions, see Installation.
To understand the configuration options, see Configuration.