@yesvara/svara 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -68,7 +68,7 @@ npm install @yesvara/svara
68
68
  ### 2. Create a new project
69
69
 
70
70
  ```bash
71
- npx @yesvara/svara new my-agent
71
+ npx svara new my-agent
72
72
  cd my-agent
73
73
  ```
74
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yesvara/svara",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Build AI agents in 15 lines of code. Multi-channel, RAG-ready, production-grade.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,4 +0,0 @@
1
- # SvaraJS Environment Variables
2
-
3
- # OpenAI
4
- OPENAI_API_KEY=sk-...
@@ -1,3 +0,0 @@
1
- # my-agent Knowledge Base
2
-
3
- Add your documents here for RAG.
@@ -1,19 +0,0 @@
1
- {
2
- "name": "my-agent",
3
- "version": "0.1.0",
4
- "private": true,
5
- "scripts": {
6
- "dev": "tsx watch src/index.ts",
7
- "build": "tsc",
8
- "start": "node dist/index.js"
9
- },
10
- "dependencies": {
11
- "@yesvara/svara": "^0.1.3",
12
- "dotenv": "^16.4.5"
13
- },
14
- "devDependencies": {
15
- "@types/node": "^20.14.2",
16
- "tsx": "^4.15.7",
17
- "typescript": "^5.4.5"
18
- }
19
- }
@@ -1,35 +0,0 @@
1
- import 'dotenv/config';
2
- import { SvaraApp, SvaraAgent, createTool } from '@yesvara/svara';
3
-
4
- /**
5
- * my-agent — powered by SvaraJS
6
- */
7
-
8
- // Define tools
9
- const timeTool = createTool({
10
- name: 'get_time',
11
- description: 'Get the current date and time',
12
- parameters: {},
13
- async run() {
14
- return {
15
- datetime: new Date().toISOString(),
16
- timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
17
- };
18
- },
19
- });
20
-
21
- // Create agent
22
- const agent = new SvaraAgent({
23
- name: 'my-agent',
24
- model: 'gpt-4o',
25
- systemPrompt: 'You are a helpful AI assistant. Be concise and friendly.',
26
- tools: [timeTool],
27
- knowledge: './docs', // Add your documents here for RAG
28
- });
29
-
30
- // Setup channels
31
- const app = new SvaraApp({ cors: true });
32
- app.route('/chat', agent.handler());
33
- app.listen(3000);
34
-
35
- console.log('✨ my-agent is running!');
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "CommonJS",
5
- "moduleResolution": "bundler",
6
- "outDir": "dist",
7
- "rootDir": "src",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true
11
- },
12
- "include": [
13
- "src/**/*"
14
- ],
15
- "exclude": [
16
- "node_modules",
17
- "dist"
18
- ]
19
- }