Skip to main content

Prerequisites

  • OpenAI API key
  • Node.js 18+ or Python 3.8+

1. Get API Key

  1. Sign in to console.openfiles.ai with GitHub
  2. Go to API Keys Tab
  3. Click “Create API Key”
  4. Copy the key (starts with oa_)

2. Install SDK

3. Set Environment Variables

4. Update Your Code

Replace your OpenAI import and add the OpenFiles API key:

5. Run Your Code

Your AI can now create, read, and edit files automatically. The agent will use file operations when it determines they’re needed based on the user’s request.

Verify It Works

Try these prompts to test file operations:

What Just Happened?

  1. OpenFiles injected 8 file operation tools into your AI
  2. The AI chose which tools to use based on your requests
  3. Files are stored with automatic versioning
  4. Your existing code works exactly the same way

Next Steps

OpenAI Integration Guide

Learn advanced OpenAI features and configuration

Tools Integration

Use OpenFiles with Anthropic Claude and other AI providers