Show HN: Automatically Enable Function Calling with Just TypeScript Objects

github.com

3 points by kakasoo 15 hours ago

https://github.com/wrtnlabs/agentica

Agentica is a library that makes it easy to automate agent development using predefined schemas. Instead of writing JSON schemas manually for tool calling, you can simply use your existing TypeScript objects or Swagger definitions to get Function Calling up and running right away.

Normally, integrating tool calling would require you to manually define JSON schemas, which can be tedious and error-prone. Developers often had to keep separate schemas for APIs they had already defined elsewhere.

Agentica streamlines this process by using TypeScript interfaces and comments. It automatically converts your API definitions into a format that works with Tool Calling. Plus, you can define tools using TypeScript classes and even use the member functions of those classes as tools.

Key features:

Just plug in Swagger, and all your APIs are automatically ready for Function Calling Use TypeScript objects directly without the need for separate JSON schemas Convert comments, parameters, and return types into tool prompts at compile time Automatically define tools using TypeScript classes, and use the member functions of class instances as tools One of the best things about Agentica is that it uses Typia to validate parameters at compile time. This way, you can check if the function arguments are valid before actually running the Function Calling or Tool Calling.

Typia also gives you incredibly detailed validation feedback, so after your first try, Function Calls almost always succeed without issues.

Check it out on GitHub:

https://github.com/wrtnlabs/agentica