Skip to content

Latest commit

 

History

History
92 lines (64 loc) · 1.96 KB

README.md

File metadata and controls

92 lines (64 loc) · 1.96 KB

Agent Starter

A starter project to help you get started with OpenServ Labs SDK - a powerful TypeScript framework for building non-deterministic AI agents with advanced cognitive capabilities.

This starter provides a minimal setup to help you understand the basics of the SDK. For more advanced features like tasks, file operations, and inter-agent collaboration, check out the SDK documentation.

Setup

  1. Clone this repository
  2. Install dependencies:
npm install
  1. Copy .env.example to .env and fill in your configuration:
cp .env.example .env
  1. Update the environment variables in .env:
    • OPENSERV_API_KEY: Your OpenServ Labs API key

Example Agent

The starter includes a simple example agent that can perform basic arithmetic:

// Example usage
const response = await agent.process({
  messages: [
    {
      role: 'user',
      content: 'add 13 and 29'
    }
  ]
})

Development

Run the development server with hot reload:

npm run dev

Code Quality

The project uses ESLint and Prettier for code quality and formatting:

# Run ESLint
npm run lint

# Fix ESLint issues
npm run lint:fix

# Format code with Prettier
npm run format

Building

Build the project:

npm run build

Run the built version:

npm start

Notes

  • The project is set up with TypeScript, ts-node-dev for development, and includes VS Code debugging configuration
  • Environment variables are validated using Zod
  • ESLint and Prettier are configured for consistent code style
  • The agent uses natural language processing to understand and execute commands

Next Steps

Once you're comfortable with the basics, explore more advanced features in the OpenServ Labs SDK:

  • Tasks and workflows
  • Chat interactions
  • File operations
  • Custom capabilities
  • Inter-agent collaboration