Example usage of karakuri-agent-core
npm install karakuri-agent-exampleThis example demonstrates how to use the karakuri-agent-core library to create and deploy AI agents.
1. Install dependencies:
``bash`
npm install
2. Configure environment variables:
`bash`
cp .env.example .envEdit .env with your configuration
3. Run the example:
`bash`
npm startor for development with hot reload
npm run dev
- npm start - Start the servernpm run dev
- - Start with hot reloadnpm run build
- - Build TypeScript files
Edit .env file to configure:PORT
- - Server port (default: 8080)KANON_LLM_BASE_URL
- - LLM API base URLKANON_LLM_API_KEY
- - Your API keyKANON_LLM_MODEL
- - Model to use (e.g., gpt-4)KANON_USER_NAME
- - User name for Kanon agentKANON_USER_INFO
- - User information for context
Once running, the following endpoints are available:
- GET /v1/models - List available agentsPOST /v1/chat/completions
- - Chat with an agent (OpenAI-compatible)GET /health
- - Health check
`bashList available models
curl http://localhost:8080/v1/models