agentica 0.22.0 → 0.24.0

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- https://github.com/user-attachments/assets/5326cc59-5129-470d-abcb-c3f458b5c488 -->
4
4
 
5
- ![Logo](https://wrtnlabs.io/agentica/og.jpg?refresh)
5
+ ![Logo](https://wrtnlabs.io/agentica/og.jpg)
6
6
 
7
7
  [![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wrtnlabs/agentica/blob/master/LICENSE)
8
8
  [![NPM Version](https://img.shields.io/npm/v/@agentica/core.svg)](https://www.npmjs.com/package/@agentica/core)
@@ -26,7 +26,7 @@ Are you a TypeScript developer? Then you're already an AI developer. Familiar wi
26
26
  <!-- eslint-skip -->
27
27
 
28
28
  ```typescript
29
- import { Agentica, assertHttpLlmApplication } from "@agentica/core";
29
+ import { Agentica, assertHttpController } from "@agentica/core";
30
30
  import OpenAI from "openai";
31
31
  import typia from "typia";
32
32
 
@@ -40,24 +40,23 @@ const agent = new Agentica({
40
40
  controllers: [
41
41
  // functions from TypeScript class
42
42
  {
43
- protocol: "http",
43
+ protocol: "class",
44
+ name: "filesystem",
44
45
  application: typia.llm.application<MobileFileSystem, "chatgpt">(),
45
46
  execute: new MobileFileSystem(),
46
47
  },
47
48
  // functions from Swagger/OpenAPI
48
- {
49
- protocol: "http",
50
- application: assertHttpLlmApplication({
51
- model: "chatgpt",
52
- document: await fetch(
53
- "https://shopping-be.wrtn.ai/editor/swagger.json",
54
- ).then(r => r.json()),
55
- }),
49
+ assertHttpController({
50
+ name: "shopping",
51
+ model: "chatgpt",
52
+ document: await fetch(
53
+ "https://shopping-be.wrtn.ai/editor/swagger.json",
54
+ ).then(r => r.json()),
56
55
  connection: {
57
56
  host: "https://shopping-be.wrtn.ai",
58
57
  headers: { Authorization: "Bearer ********" },
59
58
  },
60
- },
59
+ }),
61
60
  ],
62
61
  });
63
62
  await agent.conversate("I wanna buy MacBook Pro");
package/dist/index.mjs CHANGED
@@ -93,4 +93,4 @@ execute: new ${s}Service(),
93
93
  `)),e=Tt({content:a,importCode:s,connectorCode:r}),o=await Ot(e);await ht(i,o),await Ue({projectPath:u,apiKeys:[{key:"OPENAI_API_KEY",value:t.openAIKey??""},{key:"API_PORT",value:t.port?.toString()??"3000"},...t.envList??[]]}),fe.success("\u2705 .env created"),await ze({packageManager:t.packageManager,projectAbsolutePath:u,services:t.services}),await vi({packageManager:t.packageManager,projectAbsolutePath:u})}async function Ai({projectAbsolutePath:u,context:t}){await je({template:"react",project:u}),fe.success("\u2705 Template downloaded"),await Ue({projectPath:u,apiKeys:[{key:"OPENAI_API_KEY",value:t.openAIKey??""},{key:"VITE_AGENTICA_WS_URL",value:`ws://localhost:${t.port}/chat`}]}),fe.success("\u2705 .env created"),await ze({packageManager:t.packageManager,projectAbsolutePath:u,services:t.services})}async function bu({projectAbsolutePath:u,context:t}){await je({template:"react-native",project:u}),fe.success("\u2705 Template downloaded"),await Ue({projectPath:u,apiKeys:[{key:"OPENAI_API_KEY",value:t.openAIKey??""}]}),fe.success("\u2705 .env created"),await ze({packageManager:t.packageManager,projectAbsolutePath:u,services:t.services})}async function _u({template:u}){ss("Agentica Start Wizard");const t=await Fu({template:u}),{projectAbsolutePath:s}=t;switch(t.template){case"standalone":await yu({projectAbsolutePath:s,context:t});break;case"nodejs":await gr({projectAbsolutePath:s,context:t});break;case"nestjs":await Cr({projectAbsolutePath:s,context:t});break;case"react":await Ai({projectAbsolutePath:s,context:t});break;case"react-native":await bu({projectAbsolutePath:s,context:t});break;case"nestjs+react":await Cr({projectAbsolutePath:be(s,"server"),context:t}),await Ai({projectAbsolutePath:be(s,"client"),context:t});break;case"nodejs+react":await gr({projectAbsolutePath:be(s,"server"),context:t}),await Ai({projectAbsolutePath:be(s,"client"),context:t});break;default:throw t.template,new Error(`\u274C Template ${t.template} not supported`)}Fn(`
94
94
  \u{1F389} Project ${s} created
95
95
  \u26A0\uFE0F ${pe.yellow("Note:")} Please implement constructor values for each controller generated in index.ts
96
- `)}const wu="0.22.0",nt=new An;nt.version(wu),nt.command("start").description("Start a new project").addOption(new Sn("-p, --project <project>","The project type").choices(Cu)).action(async u=>{ss(`\u{1F680} ${pe.blueBright("Agentica")} Setup Wizard`),await _u({template:u.project})});function vu(){nt.parse(ae.argv)}export{nt as program,vu as run};
96
+ `)}const wu="0.24.0",nt=new An;nt.version(wu),nt.command("start").description("Start a new project").addOption(new Sn("-p, --project <project>","The project type").choices(Cu)).action(async u=>{ss(`\u{1F680} ${pe.blueBright("Agentica")} Setup Wizard`),await _u({template:u.project})});function vu(){nt.parse(ae.argv)}export{nt as program,vu as run};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentica",
3
3
  "type": "module",
4
- "version": "0.22.0",
4
+ "version": "0.24.0",
5
5
  "description": "Agentic AI Library specialized in LLM Function Calling",
6
6
  "author": "Wrtn Technologies",
7
7
  "license": "MIT",