@agentica/core 0.19.1 → 0.21.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 +115 -413
- package/lib/MicroAgentica.js +4 -1
- package/lib/MicroAgentica.js.map +1 -1
- package/lib/context/AgenticaOperation.d.ts +3 -4
- package/lib/context/internal/AgenticaOperationComposer.js +1 -1
- package/lib/context/internal/AgenticaOperationComposer.js.map +1 -1
- package/lib/context/internal/AgenticaOperationComposer.spec.js +39 -10
- package/lib/context/internal/AgenticaOperationComposer.spec.js.map +1 -1
- package/lib/functional/assertHttpLlmApplication.js +168 -168
- package/lib/functional/assertMcpController.d.ts +24 -0
- package/lib/functional/assertMcpController.js +1699 -0
- package/lib/functional/assertMcpController.js.map +1 -0
- package/lib/functional/validateHttpLlmApplication.js +148 -148
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1999 -406
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/call.js +1 -1
- package/lib/orchestrate/call.js.map +1 -1
- package/lib/orchestrate/execute.js +13 -7
- package/lib/orchestrate/execute.js.map +1 -1
- package/lib/orchestrate/initialize.js +60 -60
- package/lib/structures/IAgenticaController.d.ts +8 -4
- package/lib/structures/IAgenticaExecutor.d.ts +10 -6
- package/lib/structures/IMicroAgenticaExecutor.d.ts +4 -1
- package/lib/structures/mcp/index.d.ts +0 -2
- package/lib/structures/mcp/index.js +0 -2
- package/lib/structures/mcp/index.js.map +1 -1
- package/package.json +3 -3
- package/src/MicroAgentica.ts +3 -1
- package/src/context/AgenticaOperation.ts +5 -6
- package/src/context/internal/AgenticaOperationComposer.spec.ts +45 -14
- package/src/context/internal/AgenticaOperationComposer.ts +9 -2
- package/src/functional/assertMcpController.ts +48 -0
- package/src/index.ts +1 -1
- package/src/orchestrate/call.ts +14 -4
- package/src/orchestrate/execute.ts +13 -7
- package/src/structures/IAgenticaController.ts +9 -4
- package/src/structures/IAgenticaExecutor.ts +16 -8
- package/src/structures/IMicroAgenticaExecutor.ts +10 -4
- package/src/structures/mcp/index.ts +0 -2
- package/lib/functional/assertMcpLlmApplication.d.ts +0 -18
- package/lib/functional/assertMcpLlmApplication.js +0 -74
- package/lib/functional/assertMcpLlmApplication.js.map +0 -1
- package/lib/structures/mcp/IMcpLlmApplication.d.ts +0 -9
- package/lib/structures/mcp/IMcpLlmApplication.js +0 -3
- package/lib/structures/mcp/IMcpLlmApplication.js.map +0 -1
- package/lib/structures/mcp/IMcpLlmFunction.d.ts +0 -17
- package/lib/structures/mcp/IMcpLlmFunction.js +0 -3
- package/lib/structures/mcp/IMcpLlmFunction.js.map +0 -1
- package/src/functional/assertMcpLlmApplication.ts +0 -32
- package/src/structures/mcp/IMcpLlmApplication.ts +0 -10
- package/src/structures/mcp/IMcpLlmFunction.ts +0 -19
package/README.md
CHANGED
|
@@ -1,463 +1,165 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agentica, AI Function Calling Framework
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- https://github.com/user-attachments/assets/5326cc59-5129-470d-abcb-c3f458b5c488 -->
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
[](https://www.npmjs.com/package/@agentica/core)
|
|
7
|
-
[](https://www.npmjs.com/package/@agentica/core)
|
|
8
|
-
[](https://github.com/wrtnlabs/agentica/actions?query=workflow%3Abuild)
|
|
9
|
-
|
|
10
|
-
The simplest **Agentic AI** library, specialized in **LLM Function Calling**.
|
|
11
|
-
|
|
12
|
-
Don't compose complicate agent graph or workflow, but just deliver **Swagger/OpenAPI** documents or **TypeScript class** types linearly to the `@agentica/core`. Then `@agentica/core` will do everything with the function calling.
|
|
13
|
-
|
|
14
|
-
Look at the below demonstration, and feel how `@agentica/core` is easy and powerful.
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
import { Agentica } from "@agentica/core";
|
|
18
|
-
import typia from "typia";
|
|
19
|
-
|
|
20
|
-
const agent = new Agentica({
|
|
21
|
-
controllers: [
|
|
22
|
-
await fetch(
|
|
23
|
-
"https://shopping-be.wrtn.ai/editor/swagger.json",
|
|
24
|
-
).then(r => r.json()),
|
|
25
|
-
typia.llm.application<ShoppingCounselor>(),
|
|
26
|
-
typia.llm.application<ShoppingPolicy>(),
|
|
27
|
-
typia.llm.application<ShoppingSearchRag>(),
|
|
28
|
-
],
|
|
29
|
-
});
|
|
30
|
-
await agent.conversate("I wanna buy MacBook Pro");
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
> https://github.com/user-attachments/assets/01604b53-aca4-41cb-91aa-3faf63549ea6
|
|
34
|
-
>
|
|
35
|
-
> Demonstration video of Shopping AI Chatbot
|
|
36
|
-
|
|
37
|
-
## How to Use
|
|
38
|
-
|
|
39
|
-
### Setup
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm install @agentica/core @samchon/openapi typia
|
|
43
|
-
npx typia setup
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Install not only `@agentica/core`, but also [`@samchon/openapi`](https://github.com/samchon/openapi) and [`typia`](https://github.com/samchon/typia).
|
|
47
|
-
|
|
48
|
-
`@samchon/openapi` is an OpenAPI specification library which can convert Swagger/OpenAPI document to LLM function calling schema. And `typia` is a transformer (compiler) library which can compose LLM function calling schema from a TypeScript class type.
|
|
49
|
-
|
|
50
|
-
By the way, as `typia` is a transformer library analyzing TypeScript source code in the compilation level, it needs additional setup command `npx typia setup`. Also, if you're not using non-standard TypeScript compiler (not `tsc`) or developing the agent in the frontend environment, you have to setup [`@ryoppippi/unplugin-typia`](https://typia.io/docs/setup/#unplugin-typia) too.
|
|
51
|
-
|
|
52
|
-
### Chat with Backend Server
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
import { Agentica, validateHttpLlmApplication } from "@agentica/core";
|
|
56
|
-
import { IHttpLlmApplication } from "@samchon/openapi";
|
|
57
|
-
import OpenAI from "openai";
|
|
58
|
-
import { IValidation } from "typia";
|
|
59
|
-
|
|
60
|
-
async function main(): Promise<void> {
|
|
61
|
-
// LOAD SWAGGER DOCUMENT, AND CONVERT TO LLM APPLICATION SCHEMA
|
|
62
|
-
const application: IValidation<IHttpLlmApplication<"chatgpt">>
|
|
63
|
-
= validateHttpLlmApplication({
|
|
64
|
-
model: "chatgpt",
|
|
65
|
-
document: await fetch("https://shopping-be.wrtn.ai/editor/swagger.json").then(
|
|
66
|
-
r => r.json()
|
|
67
|
-
),
|
|
68
|
-
});
|
|
69
|
-
if (application.success === false) {
|
|
70
|
-
console.error(application.errors);
|
|
71
|
-
throw new Error("Type error on the target swagger document");
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// CREATE AN AGENT WITH THE APPLICATION
|
|
75
|
-
const agent: Agentica<"chatgpt"> = new Agentica({
|
|
76
|
-
model: "chatgpt",
|
|
77
|
-
vendor: {
|
|
78
|
-
api: new OpenAI({
|
|
79
|
-
apiKey: "YOUR_OPENAI_API_KEY",
|
|
80
|
-
}),
|
|
81
|
-
model: "gpt-4o-mini",
|
|
82
|
-
},
|
|
83
|
-
controllers: [
|
|
84
|
-
{
|
|
85
|
-
protocol: "http",
|
|
86
|
-
name: "shopping",
|
|
87
|
-
application: application.data,
|
|
88
|
-
connection: {
|
|
89
|
-
host: "https://shopping-be.wrtn.ai",
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
config: {
|
|
94
|
-
locale: "en-US",
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// ADD EVENT LISTENERS
|
|
99
|
-
agent.on("select", async (select) => {
|
|
100
|
-
console.log("selected function", select.operation.function.name);
|
|
101
|
-
});
|
|
102
|
-
agent.on("execute", async (execute) => {
|
|
103
|
-
consoe.log("execute function", {
|
|
104
|
-
function: execute.operation.function.name,
|
|
105
|
-
arguments: execute.arguments,
|
|
106
|
-
value: execute.value,
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// CONVERSATE TO AI CHATBOT
|
|
111
|
-
await agent.conversate("What you can do?");
|
|
112
|
-
}
|
|
113
|
-
main().catch(console.error);
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Just load your swagger document, and put it into the `@agentica/core`.
|
|
5
|
+

|
|
117
6
|
|
|
118
|
-
|
|
7
|
+
[](https://github.com/wrtnlabs/agentica/blob/master/LICENSE)
|
|
8
|
+
[](https://www.npmjs.com/package/@agentica/core)
|
|
9
|
+
[](https://www.npmjs.com/package/@agentica/core)
|
|
10
|
+
[](https://github.com/wrtnlabs/agentica/actions?query=workflow%3Abuild)
|
|
11
|
+
[](https://wrtnlabs.io/agentica/)
|
|
12
|
+
[](https://discord.gg/aMhRmzkqCx)
|
|
119
13
|
|
|
120
|
-
|
|
14
|
+
Agentic AI framework specialized in AI Function Calling.
|
|
121
15
|
|
|
122
|
-
|
|
16
|
+
Don't be afraid of AI agent development. Just list functions from three protocols below. This is everything you should do for AI agent development.
|
|
123
17
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
import typia, { tags } from "typia";
|
|
128
|
-
|
|
129
|
-
class BbsArticleService {
|
|
130
|
-
/**
|
|
131
|
-
* Create a new article.
|
|
132
|
-
*
|
|
133
|
-
* Writes a new article and archives it into the DB.
|
|
134
|
-
*
|
|
135
|
-
* @param props Properties of create function
|
|
136
|
-
* @returns Newly created article
|
|
137
|
-
*/
|
|
138
|
-
public async create(props: {
|
|
139
|
-
/**
|
|
140
|
-
* Information of the article to create
|
|
141
|
-
*/
|
|
142
|
-
input: IBbsArticle.ICreate;
|
|
143
|
-
}): Promise<IBbsArticle>;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Update an article.
|
|
147
|
-
*
|
|
148
|
-
* Updates an article with new content.
|
|
149
|
-
*
|
|
150
|
-
* @param props Properties of update function
|
|
151
|
-
* @param input New content to update
|
|
152
|
-
*/
|
|
153
|
-
public async update(props: {
|
|
154
|
-
/**
|
|
155
|
-
* Target article's {@link IBbsArticle.id}.
|
|
156
|
-
*/
|
|
157
|
-
id: string & tags.Format<"uuid">;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* New content to update.
|
|
161
|
-
*/
|
|
162
|
-
input: IBbsArticle.IUpdate;
|
|
163
|
-
}): Promise<void>;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
async function main(): Promise<void> {
|
|
167
|
-
const api: OpenAI = new OpenAI({
|
|
168
|
-
apiKey: "YOUR_OPENAI_API_KEY",
|
|
169
|
-
});
|
|
170
|
-
const agent: Agentica<"chatgpt"> = new Agentica({
|
|
171
|
-
model: "chatgpt",
|
|
172
|
-
vendor: {
|
|
173
|
-
api: new OpenAI({
|
|
174
|
-
apiKey: "YOUR_OPENAI_API_KEY",
|
|
175
|
-
}),
|
|
176
|
-
model: "gpt-4o-mini",
|
|
177
|
-
},
|
|
178
|
-
controllers: [
|
|
179
|
-
{
|
|
180
|
-
protocol: "class",
|
|
181
|
-
name: "vectorStore",
|
|
182
|
-
application: typia.llm.application<
|
|
183
|
-
BbsArticleService,
|
|
184
|
-
"chatgpt"
|
|
185
|
-
>(),
|
|
186
|
-
execute: new BbsArticleService(),
|
|
187
|
-
},
|
|
188
|
-
],
|
|
189
|
-
});
|
|
190
|
-
await agent.conversate("I wanna write an article.");
|
|
191
|
-
}
|
|
192
|
-
main().catch(console.error);
|
|
193
|
-
```
|
|
18
|
+
- TypeScript Class
|
|
19
|
+
- Swagger/OpenAPI Document
|
|
20
|
+
- MCP (Model Context Protocol) Server
|
|
194
21
|
|
|
195
|
-
|
|
22
|
+
Wanna make an e-commerce agent? Bring in e-commerce functions. Need a newspaper agent? Get API functions from the newspaper company. Just prepare any functions that you need, then it becomes an AI agent.
|
|
196
23
|
|
|
197
|
-
|
|
24
|
+
Are you a TypeScript developer? Then you're already an AI developer. Familiar with backend development? You're already well-versed in AI development. Anyone who can make functions can make AI agents.
|
|
198
25
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
### Multi Agent Orchestration
|
|
26
|
+
<!-- eslint-skip -->
|
|
202
27
|
|
|
203
28
|
```typescript
|
|
204
|
-
import { Agentica } from "@agentica/core";
|
|
29
|
+
import { Agentica, assertHttpLlmApplication } from "@agentica/core";
|
|
205
30
|
import OpenAI from "openai";
|
|
206
31
|
import typia from "typia";
|
|
207
32
|
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Retrieve Vector DB with RAG.
|
|
211
|
-
*
|
|
212
|
-
* @param props Properties of Vector DB retrievelance
|
|
213
|
-
*/
|
|
214
|
-
public query(props: {
|
|
215
|
-
/**
|
|
216
|
-
* Keywords to look up.
|
|
217
|
-
*
|
|
218
|
-
* Put all the keywords you want to look up. However, keywords
|
|
219
|
-
* should only be included in the core, and all ambiguous things
|
|
220
|
-
* should be excluded to achieve accurate results.
|
|
221
|
-
*/
|
|
222
|
-
keywords: string;
|
|
223
|
-
}): Promise<IVectorStoreQueryResult>;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
async function main(): Promise<void> {
|
|
227
|
-
const api: OpenAI = new OpenAI({
|
|
228
|
-
apiKey: "YOUR_OPENAI_API_KEY",
|
|
229
|
-
});
|
|
230
|
-
const agent: Agentica<"chatgpt"> = new Agentica({
|
|
231
|
-
model: "chatgpt",
|
|
232
|
-
context: {
|
|
233
|
-
api: new OpenAI({
|
|
234
|
-
apiKey: "YOUR_OPENAI_API_KEY",
|
|
235
|
-
}),
|
|
236
|
-
model: "gpt-4o-mini",
|
|
237
|
-
},
|
|
238
|
-
controllers: [
|
|
239
|
-
{
|
|
240
|
-
protocol: "class",
|
|
241
|
-
name: "vectorStore",
|
|
242
|
-
application: typia.llm.application<
|
|
243
|
-
OpenAIVectorStoreAgent,
|
|
244
|
-
"chatgpt"
|
|
245
|
-
>(),
|
|
246
|
-
execute: new OpenAIVectorStoreAgent({
|
|
247
|
-
api,
|
|
248
|
-
id: "YOUR_OPENAI_VECTOR_STORE_ID",
|
|
249
|
-
}),
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
});
|
|
253
|
-
await agent.conversate("I wanna research economic articles");
|
|
254
|
-
}
|
|
255
|
-
main().catch(console.error);
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
In the `@agentica/core`, you can implement multi-agent orchestration super easily.
|
|
259
|
-
|
|
260
|
-
Just develop a TypeScript class which contains agent feature like Vector Store, and just deliver the TypeScript class type to the `@agentica/core` like above. The `@agentica/core` will centralize and realize the multi-agent orchestration by LLM function calling strategy to the TypeScript class.
|
|
261
|
-
|
|
262
|
-
### If you want drastically improves function selection speed
|
|
263
|
-
|
|
264
|
-
Use the [@agentica/pg-vector-selector](../pg-vector-selector/README.md)
|
|
265
|
-
|
|
266
|
-
Just initialize and set the config
|
|
267
|
-
when use this adapter, you should run the [connector-hive](https://github.com/wrtnlabs/connector-hive)
|
|
268
|
-
|
|
269
|
-
```typescript
|
|
270
|
-
import { Agentica } from "@agentica/core";
|
|
271
|
-
import { AgenticaPgVectorSelector } from "@agentica/pg-vector-selector";
|
|
272
|
-
import typia from "typia";
|
|
273
|
-
|
|
274
|
-
// Initialize with connector-hive server
|
|
275
|
-
const selectorExecute = AgenticaPgVectorSelector.boot<"chatgpt">(
|
|
276
|
-
"https://your-connector-hive-server.com"
|
|
277
|
-
);
|
|
33
|
+
import { MobileFileSystem } from "./services/MobileFileSystem";
|
|
278
34
|
|
|
279
35
|
const agent = new Agentica({
|
|
280
|
-
model: "chatgpt",
|
|
281
36
|
vendor: {
|
|
37
|
+
api: new OpenAI({ apiKey: "********" }),
|
|
282
38
|
model: "gpt-4o-mini",
|
|
283
|
-
api: new OpenAI({
|
|
284
|
-
apiKey: process.env.CHATGPT_API_KEY,
|
|
285
|
-
}),
|
|
286
39
|
},
|
|
287
40
|
controllers: [
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
41
|
+
// functions from TypeScript class
|
|
42
|
+
{
|
|
43
|
+
protocol: "http",
|
|
44
|
+
application: typia.llm.application<MobileFileSystem, "chatgpt">(),
|
|
45
|
+
execute: new MobileFileSystem(),
|
|
46
|
+
},
|
|
47
|
+
// 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
|
+
}),
|
|
56
|
+
connection: {
|
|
57
|
+
host: "https://shopping-be.wrtn.ai",
|
|
58
|
+
headers: { Authorization: "Bearer ********" },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
294
61
|
],
|
|
295
|
-
config: {
|
|
296
|
-
executor: {
|
|
297
|
-
select: selectorExecute,
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
62
|
});
|
|
301
63
|
await agent.conversate("I wanna buy MacBook Pro");
|
|
302
64
|
```
|
|
303
65
|
|
|
304
|
-
##
|
|
66
|
+
## 📦 Setup
|
|
305
67
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
deactivate Agent
|
|
330
|
-
loop Candidate functions exist
|
|
331
|
-
activate Agent
|
|
332
|
-
Agent->>Caller: Deliver conversation text
|
|
333
|
-
activate Caller
|
|
334
|
-
alt Contexts are enough
|
|
335
|
-
Note over Caller: Call fulfilled functions
|
|
336
|
-
Caller->>Describer: Function call histories
|
|
337
|
-
deactivate Caller
|
|
338
|
-
activate Describer
|
|
339
|
-
Describer->>Agent: Describe function calls
|
|
340
|
-
deactivate Describer
|
|
341
|
-
Agent->>User: Conversate:<br/>agent describes
|
|
342
|
-
activate User
|
|
343
|
-
deactivate User
|
|
344
|
-
else Contexts are not enough
|
|
345
|
-
break
|
|
346
|
-
Caller->>Agent: Request more information
|
|
347
|
-
end
|
|
348
|
-
Agent->>User: Conversate:<br/>agent requests
|
|
349
|
-
activate User
|
|
350
|
-
deactivate User
|
|
351
|
-
end
|
|
352
|
-
deactivate Agent
|
|
353
|
-
end
|
|
68
|
+
```bash
|
|
69
|
+
$ npx agentica start <directory>
|
|
70
|
+
|
|
71
|
+
----------------------------------------
|
|
72
|
+
Agentica Setup Wizard
|
|
73
|
+
----------------------------------------
|
|
74
|
+
? Package Manager (use arrow keys)
|
|
75
|
+
> npm
|
|
76
|
+
pnpm
|
|
77
|
+
yarn (berry is not supported)
|
|
78
|
+
? Project Type
|
|
79
|
+
NodeJS Agent Server
|
|
80
|
+
> NestJS Agent Server
|
|
81
|
+
React Client Application
|
|
82
|
+
Standalone Application
|
|
83
|
+
? Embedded Controllers (multi-selectable)
|
|
84
|
+
(none)
|
|
85
|
+
Google Calendar
|
|
86
|
+
Google News
|
|
87
|
+
> Github
|
|
88
|
+
Reddit
|
|
89
|
+
Slack
|
|
90
|
+
...
|
|
354
91
|
```
|
|
355
92
|
|
|
356
|
-
|
|
93
|
+
The setup wizard helps you create a new project tailored to your needs.
|
|
357
94
|
|
|
358
|
-
|
|
95
|
+
For reference, when selecting a project type, any option other than "Standalone Application" will implement the [WebSocket Protocol](https://wrtnlabs.io/agentica/docs/websocket/) for client-server communication.
|
|
359
96
|
|
|
360
|
-
|
|
97
|
+
For comprehensive setup instructions, visit our [Getting Started](https://wrtnlabs.io/agentica/docs/) guide.
|
|
361
98
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
```typescript
|
|
365
|
-
import { FunctionCall } from "pseudo";
|
|
366
|
-
import { ILlmFunction, IValidation } from "typia";
|
|
367
|
-
|
|
368
|
-
export function correctFunctionCall(p: {
|
|
369
|
-
call: FunctionCall;
|
|
370
|
-
functions: Array<ILlmFunction<"chatgpt">>;
|
|
371
|
-
retry: (reason: string, errors?: IValidation.IError[]) => Promise<unknown>;
|
|
372
|
-
}): Promise<unknown> {
|
|
373
|
-
// FIND FUNCTION
|
|
374
|
-
const func: ILlmFunction<"chatgpt"> | undefined
|
|
375
|
-
= p.functions.find(f => f.name === p.call.name);
|
|
376
|
-
if (func === undefined) {
|
|
377
|
-
// never happened in my experience
|
|
378
|
-
return p.retry(
|
|
379
|
-
"Unable to find the matched function name. Try it again.",
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
// VALIDATE
|
|
384
|
-
const result: IValidation<unknown> = func.validate(p.call.arguments);
|
|
385
|
-
if (result.success === false) {
|
|
386
|
-
// 1st trial: 50% (gpt-4o-mini in shopping mall chatbot)
|
|
387
|
-
// 2nd trial with validation feedback: 99%
|
|
388
|
-
// 3nd trial with validation feedback again: never have failed
|
|
389
|
-
return p.retry(
|
|
390
|
-
"Type errors are detected. Correct it through validation errors",
|
|
391
|
-
{
|
|
392
|
-
errors: result.errors,
|
|
393
|
-
},
|
|
394
|
-
);
|
|
395
|
-
}
|
|
396
|
-
return result.data;
|
|
397
|
-
}
|
|
398
|
-
```
|
|
99
|
+
## 💻 Playground
|
|
399
100
|
|
|
400
|
-
|
|
101
|
+
Experience Agentica firsthand through our [interactive playground](https://wrtnlabs.io/agentica/playground) before installing.
|
|
401
102
|
|
|
402
|
-
|
|
103
|
+
Our demonstrations showcase the power and simplicity of Agentica's function calling capabilities across different integration methods.
|
|
403
104
|
|
|
404
|
-
|
|
105
|
+
- [TypeScript Class](https://wrtnlabs.io/agentica/playground/bbs)
|
|
106
|
+
- [Swagger/OpenAPI Document](https://wrtnlabs.io/agentica/playground/swagger)
|
|
107
|
+
- [Enterprise E-commerce Agent](https://wrtnlabs.io/agentica/playground/shopping)
|
|
405
108
|
|
|
406
|
-
|
|
109
|
+
<!--
|
|
110
|
+
@todo this section would be changed after making tutorial playground
|
|
111
|
+
-->
|
|
407
112
|
|
|
408
|
-
|
|
113
|
+
## 📚 Documentation Resources
|
|
409
114
|
|
|
410
|
-
|
|
411
|
-
| --------------------------------------------------------------------------------------------------------------------------- | ------- | --------- | ----- | ------- | ----- | ------ | --- |
|
|
412
|
-
| **Easy to use** | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
413
|
-
| [Object (simple)](https://github.com/samchon/typia/blob/master/test/src/structures/ObjectSimple.ts) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
|
414
|
-
| [Object (hierarchical)](https://github.com/samchon/typia/blob/master/test/src/structures/ObjectHierarchical.ts) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
|
415
|
-
| [Object (recursive)](https://github.com/samchon/typia/blob/master/test/src/structures/ObjectRecursive.ts) | ✔ | ❌ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
|
416
|
-
| [Object (union, implicit)](https://github.com/samchon/typia/blob/master/test/src/structures/ObjectUnionImplicit.ts) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
417
|
-
| [Object (union, explicit)](https://github.com/samchon/typia/blob/master/test/src/structures/ObjectUnionExplicit.ts) | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |
|
|
418
|
-
| [Object (additional tags)](https://github.com/samchon/typia/#comment-tags) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
|
419
|
-
| [Object (template literal types)](https://github.com/samchon/typia/blob/master/test/src/structures/TemplateUnion.ts) | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ |
|
|
420
|
-
| [Object (dynamic properties)](https://github.com/samchon/typia/blob/master/test/src/structures/DynamicTemplate.ts) | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ |
|
|
421
|
-
| [Array (rest tuple)](https://github.com/samchon/typia/blob/master/test/src/structures/TupleRestAtomic.ts) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
422
|
-
| [Array (hierarchical)](https://github.com/samchon/typia/blob/master/test/src/structures/ArrayHierarchical.ts) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
|
423
|
-
| [Array (recursive)](https://github.com/samchon/typia/blob/master/test/src/structures/ArrayRecursive.ts) | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |
|
|
424
|
-
| [Array (recursive, union)](https://github.com/samchon/typia/blob/master/test/src/structures/ArrayRecursiveUnionExplicit.ts) | ✔ | ✔ | ❌ | ✔ | ✔ | ❌ |
|
|
425
|
-
| [Array (R+U, implicit)](https://github.com/samchon/typia/blob/master/test/src/structures/ArrayRecursiveUnionImplicit.ts) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
426
|
-
| [Array (repeated)](https://github.com/samchon/typia/blob/master/test/src/structures/ArrayRepeatedNullable.ts) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
427
|
-
| [Array (repeated, union)](https://github.com/samchon/typia/blob/master/test/src/structures/ArrayRepeatedUnionWithTuple.ts) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
428
|
-
| [**Ultimate Union Type**](https://github.com/samchon/typia/blob/master/test/src/structures/UltimateUnion.ts) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
115
|
+
Find comprehensive resources at our [official website](https://wrtnlabs.io/agentica).
|
|
429
116
|
|
|
430
|
-
|
|
117
|
+
- [Home](https://wrtnlabs.io/agentica)
|
|
118
|
+
- [Guide Documents](https://wrtnlabs.io/agentica/docs)
|
|
119
|
+
- [Tutorial](https://wrtnlabs.io/agentica/tutorial)
|
|
120
|
+
- [API Documents](https://wrtnlabs.io/agentica/api)
|
|
121
|
+
- [Youtube](https://www.youtube.com/@wrtnlabs)
|
|
122
|
+
- [Paper](https://wrtnlabs.io/agentica/paper)
|
|
431
123
|
|
|
432
|
-
|
|
124
|
+
## 🌟 Why Agentica?
|
|
433
125
|
|
|
434
126
|
```mermaid
|
|
435
127
|
flowchart
|
|
436
|
-
subgraph "
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
128
|
+
subgraph "JSON Schema Specification"
|
|
129
|
+
schemav4("JSON Schema v4 ~ v7") --upgrades--> emended[["OpenAPI v3.1 (emended)"]]
|
|
130
|
+
schema2910("JSON Schema 2019-03") --upgrades--> emended
|
|
131
|
+
schema2020("JSON Schema 2020-12") --emends--> emended
|
|
440
132
|
end
|
|
441
|
-
subgraph "
|
|
442
|
-
emended --
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
133
|
+
subgraph "Agentica"
|
|
134
|
+
emended --"Artificial Intelligence"--> fc{{"AI Function Calling"}}
|
|
135
|
+
fc --"OpenAI"--> chatgpt("ChatGPT")
|
|
136
|
+
fc --"Google"--> gemini("Gemini")
|
|
137
|
+
fc --"Anthropic"--> claude("Claude")
|
|
138
|
+
fc --"High-Flyer"--> deepseek("DeepSeek")
|
|
139
|
+
fc --"Meta"--> llama("Llama")
|
|
140
|
+
chatgpt --"3.1"--> custom(["Custom JSON Schema"])
|
|
141
|
+
gemini --"3.0"--> custom(["Custom JSON Schema"])
|
|
142
|
+
claude --"3.1"--> standard(["Standard JSON Schema"])
|
|
143
|
+
deepseek --"3.1"--> standard
|
|
144
|
+
llama --"3.1"--> standard
|
|
448
145
|
end
|
|
449
146
|
```
|
|
450
147
|
|
|
451
|
-
|
|
148
|
+
Agentica enhances AI function calling by the following strategies:
|
|
452
149
|
|
|
453
|
-
|
|
150
|
+
- [**Compiler Driven Development**](https://wrtnlabs.io/agentica/docs/concepts/compiler-driven-development): constructs function calling schema automatically by compiler skills without hand-writing.
|
|
151
|
+
- [**JSON Schema Conversion**](https://wrtnlabs.io/agentica/docs/core/vendor/#schema-specification): automatically handles specification differences between LLM vendors, ensuring seamless integration regardless of your chosen AI model.
|
|
152
|
+
- [**Validation Feedback**](https://wrtnlabs.io/agentica/docs/concepts/function-calling#validation-feedback): detects and corrects AI mistakes in argument composition, dramatically reducing errors and improving reliability.
|
|
153
|
+
- [**Selector Agent**](https://wrtnlabs.io/agentica/docs/concepts/function-calling#orchestration-strategy): filtering candidate functions to minimize context usage, optimize performance, and reduce token consumption.
|
|
454
154
|
|
|
455
|
-
|
|
155
|
+
Thanks to these innovations, Agentica makes AI function calling easier, safer, and more accurate than before. Development becomes more intuitive since you only need to prepare functions relevant to your specific use case, and scaling your agent's capabilities is as simple as adding or removing functions.
|
|
456
156
|
|
|
457
|
-
|
|
157
|
+
In 2023, when OpenAI announced function calling, many predicted that function calling-driven AI development would become the mainstream. However, in reality, due to the difficulty and instability of function calling, the trend in AI development became agent workflow. Agent workflow, which is inflexible and must be created for specific purposes, has conquered the AI agent ecosystem.
|
|
158
|
+
By the way, as Agentica has resolved the difficulty and instability problems of function calling, the time has come to embrace function-driven AI development once again.
|
|
458
159
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
160
|
+
| Type | Workflow | Vanilla Function Calling | Agentica Function Calling |
|
|
161
|
+
| ----------- | ------------- | ------------------------ | ------------------------- |
|
|
162
|
+
| Purpose | ❌ Specific | 🟢 General | 🟢 General |
|
|
163
|
+
| Difficulty | ❌ Difficult | ❌ Difficult | 🟢 Easy |
|
|
164
|
+
| Stability | 🟢 Stable | ❌ Unstable | 🟢 Stable |
|
|
165
|
+
| Flexibility | ❌ Inflexible | 🟢 Flexible | 🟢 Flexible |
|
package/lib/MicroAgentica.js
CHANGED
|
@@ -97,6 +97,7 @@ class MicroAgentica {
|
|
|
97
97
|
*/
|
|
98
98
|
conversate(content) {
|
|
99
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
var _a, _b, _c, _d;
|
|
100
101
|
const talk = (0, histories_1.createTextHistory)({
|
|
101
102
|
role: "user",
|
|
102
103
|
text: content,
|
|
@@ -114,7 +115,9 @@ class MicroAgentica {
|
|
|
114
115
|
});
|
|
115
116
|
const histories = yield (0, orchestrate_1.call)(ctx, this.operations_.array);
|
|
116
117
|
const executes = histories.filter(p => p.type === "execute");
|
|
117
|
-
if (executes.length
|
|
118
|
+
if (executes.length
|
|
119
|
+
&& ((_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.executor) === null || _b === void 0 ? void 0 : _b.describe) !== null
|
|
120
|
+
&& ((_d = (_c = ctx.config) === null || _c === void 0 ? void 0 : _c.executor) === null || _d === void 0 ? void 0 : _d.describe) !== false) {
|
|
118
121
|
histories.push(...yield (0, orchestrate_1.describe)(ctx, executes));
|
|
119
122
|
}
|
|
120
123
|
this.histories_.push(talk, ...histories);
|
package/lib/MicroAgentica.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MicroAgentica.js","sourceRoot":"","sources":["../src/MicroAgentica.ts"],"names":[],"mappings":";;;;;;;;;;;;AAcA,qEAAkE;AAClE,4FAAyF;AACzF,kGAA+F;AAC/F,6CAAuE;AACvE,mDAAwD;AACxD,+CAA+C;AAC/C,0FAAuF;AACvF,mDAAgD;AAChD,uFAAoF;AACpF,mDAAuG;AAEvG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,aAAa;IAMxB;;kEAE8D;IAC9D;;;;OAIG;IACH,YAAoC,KAAiC;;QAAjC,UAAK,GAAL,KAAK,CAA4B;QACnE,IAAI,CAAC,WAAW,GAAG,qDAAyB,CAAC,OAAO,CAAC;YACnD,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,CAAC,MAAA,KAAK,CAAC,SAAS,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CACpD,uDAA0B,CAAC,SAAS,CAAC;YACnC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK;YAClC,OAAO,EAAE,KAAK;SACf,CAAC,CAC8B,CAAC;QACnC,IAAI,CAAC,UA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