@agentica/core

中文文档
0.45.1发布于 2026/05/20MITTypeScriptESM + CJS构建来源已验证近 30 天下载 2439

Agentic AI Library specialized in LLM Function Calling

原始使用文档
文档目录6 节
  1. 📦 Setup
  2. 💻 Playground
  3. 📚 Documentation Resources
  4. 🌟 Why Agentica?
  5. 💬 Community & Support
  6. ⚖️ License

Agentica, AI Function Calling Framework

Agentica - ReadMe Diagram

MIT License NPM Version NPM Downloads Newsletter Top #6 Build Status

YouTube   Discord

  

Agentic AI framework specialized in AI Function Calling.

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.

  • TypeScript Class
  • Swagger/OpenAPI Document
  • MCP (Model Context Protocol) Server

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.

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.


import { Agentica, assertHttpController } from "@agentica/core";
import OpenAI from "openai";
import typia from "typia";

import { MobileFileSystem } from "./services/MobileFileSystem";

const agent = new Agentica({
  vendor: {
    api: new OpenAI({ apiKey: "********" }),
    model: "gpt-4o-mini",
  },
  controllers: [
    // functions from TypeScript class
    typia.llm.controller<MobileFileSystem>(
      "filesystem",
      new MobileFileSystem(),
    ),
    // functions from Swagger/OpenAPI
    assertHttpController({
      name: "shopping",
      model: "chatgpt",
      document: await fetch(
        "https://shopping-be.wrtn.ai/editor/swagger.json",
      ).then(r => r.json()),
      connection: {
        host: "https://shopping-be.wrtn.ai",
        headers: { Authorization: "Bearer ********" },
      },
    }),
  ],
});
await agent.conversate("I wanna buy MacBook Pro");

📦 Setup

$ npx agentica start <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
    ...

The setup wizard helps you create a new project tailored to your needs.

For reference, when selecting a project type, any option other than "Standalone Application" will implement the WebSocket Protocol for client-server communication.

For comprehensive setup instructions, visit our Getting Started guide.

💻 Playground

Experience Agentica firsthand through our interactive playground before installing.

Our demonstrations showcase the power and simplicity of Agentica's function calling capabilities across different integration methods.

E-commerce Agent Demo

📚 Documentation Resources

Find comprehensive resources at our official website.

https://github.com/user-attachments/assets/2f2a4cdc-6cf1-4304-b82d-04a8ed0be0dd

Tutorial Videos: https://www.youtube.com/@wrtnlabs

🌟 Why Agentica?

flowchart
  subgraph "JSON Schema Specification"
    schemav4("JSON Schema v4 ~ v7") --upgrades--> emended[["OpenAPI v3.1 (emended)"]]
    schema2910("JSON Schema 2019-03") --upgrades--> emended
    schema2020("JSON Schema 2020-12") --emends--> emended
  end
  subgraph "Agentica"
    emended --"Artificial Intelligence"--> fc{{"AI Function Calling"}}
    fc --"OpenAI"--> chatgpt("ChatGPT")
    fc --"Google"--> gemini("Gemini")
    fc --"Anthropic"--> claude("Claude")
    fc --"High-Flyer"--> deepseek("DeepSeek")
    fc --"Meta"--> llama("Llama")
    chatgpt --"3.1"--> custom(["Custom JSON Schema"])
    gemini --"3.0"--> custom(["Custom JSON Schema"])
    claude --"3.1"--> standard(["Standard JSON Schema"])
    deepseek --"3.1"--> standard
    llama --"3.1"--> standard
  end

Agentica enhances AI function calling by the following strategies:

  • Compiler Driven Development: constructs function calling schema automatically by compiler skills without hand-writing.
  • JSON Schema Conversion: automatically handles specification differences between LLM vendors, ensuring seamless integration regardless of your chosen AI model.
  • Validation Feedback: detects and corrects AI mistakes in argument composition, dramatically reducing errors and improving reliability.
  • Selector Agent: filtering candidate functions to minimize context usage, optimize performance, and reduce token consumption.

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.

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.

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.

TypeWorkflowVanilla Function CallingAgentica Function Calling
Purpose❌ Specific🟢 General🟢 General
Difficulty❌ Difficult❌ Difficult🟢 Easy
Stability🟢 Stable❌ Unstable🟢 Stable
Flexibility❌ Inflexible🟢 Flexible🟢 Flexible

💬 Community & Support

For support, questions, or to provide feedback, join our Discord community:

Discord

⚖️ License

Agentica is open-source and available under the MIT License.

Wrtn Labs Logo

Agentica is maintained by Wrtn Technologies — Empowering developers to transform TypeScript functions and OpenAPI specs into powerful AI agents.

版本与发布记录

@agentica/core 共发布 152 个版本,首次发布于 2025/02/24;过去 12 个月发布了 29 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.45.1latest2026/05/205 个月前
0.45.02026/04/276 个月前
0.45.0-dev.20260426next2026/04/266 个月前
0.44.12026/03/157 个月前
0.44.02026/03/137 个月前
0.44.0-dev.20260313-22026/03/137 个月前

其他发布通道:dev → 0.12.2-dev.20250314,next → 0.45.0-dev.20260426。

关于 @agentica/core 的常见问题

@agentica/core 是什么?

Agentic AI Library specialized in LLM Function Calling

如何安装 @agentica/core?

在项目目录运行 npm install @agentica/core,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:openai(^6.38.0)、typia(^12.0.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@agentica/core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@agentica/core 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@agentica/core 可以商用吗?

@agentica/core 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@agentica/core 的下载量有多少?

根据 npm 官方下载统计,@agentica/core 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,439 次,日均约 81 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@agentica/core 还在维护吗?

最新版本 0.45.1 发布于 2026/05/20(5 个月前);至今共发布 152 个版本,其中过去 12 个月发布了 29 个;首次发布于 2025/02/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。