Package Exports
- open-agi
- open-agi/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (open-agi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenAGI
Advanced AI-powered coding assistant with direct filesystem access.
Overview
OpenAGI provides developers with a powerful AI assistant capable of directly interacting with files, running commands, and providing intelligent code assistance. This standalone version allows integration with custom language models for maximum flexibility.
Features
- Direct File Operations: Edit, search, and analyze your codebase
- Command Execution: Run commands without leaving the interface
- Model Flexibility: Use Claude, GPT-4, or any custom model
- Smart Code Understanding: Analyze and understand complex codebases
- Multi-Directory Support: Switch working directories with ease
- Cross-Platform: Works on Windows, macOS, and Linux
Installation
Global Installation (Recommended)
npm install -g open-agiThen run it from any directory:
openagiLocal Installation
npm install open-agiUsage
Command Line
# Start OpenAGI in the current directory
openagi
# Start with a specific directory
openagi --dir=/path/to/project
# Run in print-only mode (non-interactive)
openagi -p "Generate a React component for a user profile"
# Enable debug mode
openagi -dProgrammatic Usage
import OpenAGI from 'open-agi';
async function main() {
// Create a new instance with custom configuration
const assistant = new OpenAGI({
model: 'claude-3-opus', // Choose your model
workingDirectory: '/path/to/project', // Set working directory
enableArchitect: true // Enable advanced planning capabilities
});
// Initialize the instance
await assistant.initialize();
// Get available tools
const tools = await assistant.getAvailableTools();
console.log('Available tools:', tools.map(tool => tool.name));
// Execute a tool
const result = await assistant.executeTool('LS', { path: '.' });
console.log('Files in directory:', result);
}
main();Available Tools
OpenAGI provides the following tools:
- Bash: Execute shell commands
- Glob: Find files using glob patterns
- Grep: Search file contents with regex
- LS: List directory contents
- View: Read file contents
- Edit: Make precise edits to files
- Replace: Completely replace file contents
- Notebook: Read and edit Jupyter notebooks
- Think: AI reflection and planning capabilities
- Memory: Store and retrieve information across sessions
Development
To build the project:
npm run build:no-typesTo run the tests:
npm testExamples
See the examples directory for more usage examples, including:
- Basic tool usage
- Creating custom tools
- Working with different models
- Advanced file operations
License
MIT