Agentic - AI Agent Standard Library
Project Overview
Agentic is a standard library of AI functions/tools optimized for both regular TypeScript usage and LLM-based usage. Agentic is compatible with all major TypeScript AI SDKs (including Vercel AI SDK, Mastra, LangChain, LlamaIndex, OpenAI SDK, MCP, etc.).
Project Address: https://github.com/transitive-bullshit/agentic
Core Features
๐ฏ Dual Usage Modes
- Standard TypeScript Classes: Can be used directly as regular TS classes
- LLM Tools: Can be easily integrated into various AI SDKs as tools
๐ง Broad SDK Support
Supports all major TypeScript AI SDKs:
- Vercel AI SDK
- Mastra AI Agent Framework
- LangChain
- LlamaIndex
- OpenAI SDK
- Genkit
- Dexter
- xsAI SDK
- GenAIScript
- MCP (Model Context Protocol)
โจ Key Advantages
- โ
All tools are fully tested in production environments
- โ
Works across all major TS AI SDKs
- โ
Tools are hand-coded and extremely lean
- โ
Provides excellent manual DX and LLM DX via the
@aiFunction decorator
- โ
Uses native
fetch
- โ
Uses
ky to wrap fetch for easy customization of HTTP options, rate limiting, retries, etc.
- โ
Supports tools from any MCP server
- โ
Can generate new Agentic tool clients from OpenAPI specifications
- โ
100% open source, does not sell any products
Usage Examples
Using as a Regular TypeScript Class
import { WeatherClient } from '@agentic/stdlib'
// Requires setting the WEATHER_API_KEY environment variable (available for free from weatherapi.com)
const weather = new WeatherClient()
const result = await weather.getCurrentWeather({
q: 'San Francisco'
})
console.log(result)
Using as an LLM Tool (Vercel AI SDK Example)
// SDK-specific import
import { openai } from '@ai-sdk/openai'
import { generateText } from 'ai'
import { createAISDKTools } from '@agentic/ai-sdk'
// SDK-agnostic import
import { WeatherClient } from '@agentic/stdlib'
const weather = new WeatherClient()
const result = await generateText({
model: openai('gpt-4o-mini'),
// Key line: use the @agentic/ai-sdk adapter
tools: createAISDKTools(weather),
toolChoice: 'required',
prompt: 'What is the weather in San Francisco?'
})
console.log(result.toolResults[0])
Mixing Multiple Tools
import { SerperClient, WikipediaClient, FirecrawlClient } from '@agentic/stdlib'
import { createAIFunction } from '@agentic/core'
import { z } from 'zod'
const googleSearch = new SerperClient()
const wikipedia = new WikipediaClient()
const firecrawl = new FirecrawlClient()
const result = await generateText({
model: openai('gpt-4o-mini'),
// This example uses tools from 4 different sources
tools: createAISDKTools(
googleSearch,
wikipedia,
// Select a single function from the firecrawl client's AI function set
firecrawl.functions.pick('firecrawl_search'),
// Create a custom AI function
createAIFunction({
name: 'think',
description: `Use this tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.`,
inputSchema: z.object({
thought: z.string().describe('A thought to think about.')
}),
execute: ({ thought }) => thought
})
),
prompt: 'What year did Jurassic Park the movie come out, and what else happened that year?'
})
Supported Tools and Services
The project provides 50+ practical tools covering the following categories:
๐ Search and Information Retrieval
| Tool |
Package Name |
Description |
| Brave Search |
@agentic/brave-search |
Brave Search API |
| Bing |
@agentic/bing |
Microsoft Bing Search API |
| DuckDuckGo |
@agentic/duck-duck-go |
DuckDuckGo Search |
| Google Custom Search |
@agentic/google-custom-search |
Google Custom Search |
| Serper |
@agentic/serper |
Serper Search API |
| SerpAPI |
@agentic/serpapi |
SerpAPI Search Service |
| Tavily |
@agentic/tavily |
Tavily Search API |
| Exa |
@agentic/exa |
Exa Search API |
๐ Knowledge and Research
| Tool |
Package Name |
Description |
| Wikipedia |
@agentic/wikipedia |
Wikipedia API |
| Wikidata |
@agentic/wikidata |
Wikidata Access |
| ArXiv |
@agentic/arxiv |
ArXiv Academic Papers |
| Wolfram Alpha |
@agentic/wolfram-alpha |
Wolfram Alpha Computational Engine |
| HackerNews |
@agentic/hacker-news |
Hacker News API |
๐ Web Scraping and Processing
| Tool |
Package Name |
Description |
| Firecrawl |
@agentic/firecrawl |
Web Scraping and Crawling |
| Jina |
@agentic/jina |
Jina Reader |
| Diffbot |
@diffbot |
Web Structure Extraction |
โ๏ธ Cloud Services and Documents
| Tool |
Package Name |
Description |
| Google Drive |
@agentic/google-drive |
Google Drive |
| Google Docs |
@agentic/google-docs |
Google Docs |
| Notion |
@agentic/notion |
Notion API |
| Airtable |
@agentic/airtable |
Airtable Database |
๐ฆ๏ธ Weather and Environment
| Tool |
Package Name |
Description |
| Weather |
@agentic/weather |
Weather API |
| Open Meteo |
@agentic/open-meteo |
Open Weather Data |
๐ผ Business and Data
| Tool |
Package Name |
Description |
| Apollo |
@agentic/apollo |
Apollo Sales Tool |
| Clearbit |
@agentic/clearbit |
Company Data API |
| Hunter |
@agentic/hunter |
Email Finder Tool |
| People Data Labs |
@agentic/people-data-labs |
People Data API |
| Polygon |
@agentic/polygon |
Financial Market Data |
๐จ Creative and Media
| Tool |
Package Name |
Description |
| Midjourney |
@agentic/midjourney |
AI Image Generation |
| YouTube |
@agentic/youtube |
YouTube API |
๐ฑ Social and Communication
| Tool |
Package Name |
Description |
| Twitter |
@agentic/twitter |
Twitter API |
| Slack |
@agentic/slack |
Slack API |
| Twilio |
@agentic/twilio |
Twilio Communication |
| Reddit |
@agentic/reddit |
Reddit API |
๐ป Development and Tools
| Tool |
Package Name |
Description |
| Calculator |
@agentic/calculator |
Math Calculator |
| E2B |
@agentic/e2b |
Code Execution Environment |
| MCP Tools |
@agentic/mcp |
MCP Server Support |
Architecture Design
Core Concepts
- AIFunctionLike: Can be any agentic client instance, a single AIFunction selected from a client's function set, or an AI function manually created via createAIFunction
- AIFunctionSet: A collection of AI functions, providing flexible function management
- Adapter Pattern: Provides a unified interface for different AI SDKs
Extensibility
- Supports automatic generation of tool clients from OpenAPI specifications
- Supports custom AI function creation
- Supports MCP server integration
- Supports function composition and selection
Installation and Usage
# Install the core library
npm install @agentic/core
# Install the standard tool library
npm install @agentic/stdlib
# Install a specific AI SDK adapter
npm install @agentic/ai-sdk # Vercel AI SDK
npm install @agentic/langchain # LangChain
npm install @agentic/llamaindex # LlamaIndex
Summary
Agentic is a powerful and well-designed standard library of AI tools, providing TypeScript developers with a complete toolchain for building AI applications. Its design philosophy is "write once, run anywhere," allowing developers to seamlessly switch between different AI frameworks while providing a rich set of pre-built tools to accelerate AI application development.