Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 1.5 KB

File metadata and controls

65 lines (45 loc) · 1.5 KB

AI Agent Prototype

This is a TypeScript-based AI agent prototype that has memory and can process user messages and execute various tools based on natural language input.

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn package manager
  • OpenAI API key

Setup

  1. Clone the repository:
git clone <repository-url>
cd ai-agent-prototype
  1. Install dependencies:
npm install
  1. Configure environment variables: Create or modify the .env file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here

Project Structure

  • index.ts - Main entry point of the application
  • src/ - Source code directory containing agent implementation and tools
  • types.ts - TypeScript type definitions
  • db.json - Local database file for storing data

Running the Application

To run the AI agent, use the following command:

npm start "<your-message>"

Replace <your-message> with the instruction or query you want to send to the agent.

Example:

npm start "What is the current time?"

Development

The project uses TypeScript and is configured with ESM modules. Key dependencies include:

  • openai - For AI model interactions
  • lowdb - Local JSON database
  • zod - Runtime type checking
  • dotenv - Environment variable management

To modify or extend the agent's capabilities, explore the src/tools directory where various tools are implemented.

License

This project is proprietary and confidential. All rights reserved.