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.
- Clone this repository
- Install dependencies:
npm install
- Copy
.env.example
to.env
and fill in your configuration:
cp .env.example .env
- Update the environment variables in
.env
:OPENSERV_API_KEY
: Your OpenServ Labs API key
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'
}
]
})
Run the development server with hot reload:
npm run dev
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
Build the project:
npm run build
Run the built version:
npm start
- 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
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