JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q31003F
  • License MIT

Advanced AI-powered coding assistant with filesystem access

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.

OpenAGI Logo

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

npm install -g open-agi

Then run it from any directory:

openagi

Local Installation

npm install open-agi

Usage

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 -d

Programmatic 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-types

To run the tests:

npm test

Examples

See the examples directory for more usage examples, including:

  • Basic tool usage
  • Creating custom tools
  • Working with different models
  • Advanced file operations

License

MIT