Skip to Content

Boilerplate

Terminal
npx agentica start <directory>

You can start @agentica development from boilerplate composition CLI.

If you run npx agentica start <directory> command, the CLI (Command Line Interface) prompt will ask what type of package manager you want to adapt, and which type of project you wanna create. And then it will fill some useful controllers (embedded functions) into the project.

Terminal
$ npx agentica start my-project-directory ---------------------------------------- Agentica Setup Wizard ---------------------------------------- ? Package Manager (use arrow keys) > npm pnpm yarn (berry is not supported) ? Project Type NodeJS Agent Server > NestJS Agent Server React Client Application Standalone Application ? Embedded Controllers (multi-selectable) (none) Google Calendar Google News > Github Reddit Slack ...

About the project types, there are four options you can choose.

The first NodeJS server is an Agentic AI server built in NodeJS with WebSocket protocol. And the second NestJS server is the same thing with NodeJS server, but composing backend server with NestJS  and Nestia . The third React client application is a frontend application built in React connecting to the previous WebSocket server.

When you’ve determined the project type as “NodeJS server” or “NestJS server”, the CLI will ask you to select embedded controllers. The embedded controllers are the pre-built functions you can use in your agent like “Google Calender” or “Github” cases. You can embed multiple pre-built controllers unless you select “Nothing”.

⚠️
Warning

Standalone frontend application.

The last standalone option constructs a frontend application that composing the agent in the frontend environment without any backend server interaction.

It must be not for production, but only for the testing environment. If you distribute the standalone to the production, your LLM API key would be exposed to the public.

Core Library

Terminal
npm install @agentica/core @samchon/openapi typia npx typia setup

To install @agentica/core, you also have to install @samchon/openapi and typia.

@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.

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.

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 too.

WebSocket Protocol

NodeJS Server

Terminal
npm install @agentica/core @samchon/openapi typia npm install @agentica/rpc tgrid npx typia setup

When developing #WebSocket server in NodeJS environment, you need to install tgrid and @agentica/rpc packages additionally.

tgrid is an RPC (Remote Procedure Call) framework supporting websocket protocol, and @agentica/rpc is a wrapper library of @agentica/core following the RPC paradigm of the tgrid.

NestJS Server

Terminal
npm install @agentica/core @samchon/openapi npm install @nestjs/common @nestjs/core @nestjs/platform-express npm install @agentica/rpc tgrid npm install -D nestia npx nestia setup

If you want to develop #WebSocket server in NestJS framework, you can do it with nestia.

Install @agentica/rpc, tgrid and NestJS packages first.

And then setup nestia with npx nestia setup command. It will setup every required packages for the WebSocket server in NestJS environment.

Client Application

Terminal
npm install @agentica/rpc tgrid

Client application does noot require many packages.

Just install @agentica/rpc and tgrid packages.

Standalone Application

Terminal
npm install @agentica/core @samchon/openapi typia npx typia setup npm install -D @ryoppippi/unplugin-typia

If you want to develop a standalone application which does everything in the frontend environment without any backend server interaction, you need to install above additional packages.

At first, @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.

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, as frontend environment tends to use non-standard TypeScript compiler (not tsc) like Vite, you have to setup @ryoppippi/unplugin-typia package additionally following its setup guide document.

⚠️
Warning

Standalone application, it must be not for production, but only for the testing environment.

If you distribute the standalone to the production, your LLM API key would be exposed to the public.

Last updated on