{"id":25141135,"url":"https://github.com/subeshb1/agenite","last_synced_at":"2025-04-24T05:45:58.793Z","repository":{"id":274286702,"uuid":"922465399","full_name":"subeshb1/agenite","owner":"subeshb1","description":"🤖 Build powerful AI agents with TypeScript. Agenite makes it easy to create, compose, and control AI agents with first-class support for tools, streaming, and multi-agent architectures. Switch seamlessly between providers like OpenAI, Anthropic, AWS Bedrock, and Ollama.","archived":false,"fork":false,"pushed_at":"2025-04-11T06:14:13.000Z","size":3641,"stargazers_count":55,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T05:45:48.037Z","etag":null,"topics":["agent","agentic-ai","ai","ai-agents","ai-assistant","aisdk","anthropic","aws-bedrock","chat","genai","generative-ai","gpt","llm","mcp","mcp-client","mcp-server","ollama","openai","typescript"],"latest_commit_sha":null,"homepage":"http://docs.agenite.com","language":"MDX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subeshb1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-26T09:36:41.000Z","updated_at":"2025-04-23T11:59:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"42acffa1-aaf9-4f64-b4f2-c85d83347232","html_url":"https://github.com/subeshb1/agenite","commit_stats":null,"previous_names":["subeshb1/agenite"],"tags_count":148,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subeshb1%2Fagenite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subeshb1%2Fagenite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subeshb1%2Fagenite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subeshb1%2Fagenite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subeshb1","download_url":"https://codeload.github.com/subeshb1/agenite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573301,"owners_count":21452343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agentic-ai","ai","ai-agents","ai-assistant","aisdk","anthropic","aws-bedrock","chat","genai","generative-ai","gpt","llm","mcp","mcp-client","mcp-server","ollama","openai","typescript"],"created_at":"2025-02-08T18:17:40.628Z","updated_at":"2025-04-24T05:45:58.787Z","avatar_url":"https://github.com/subeshb1.png","language":"MDX","funding_links":[],"categories":["📚 Projects (2474 total)"],"sub_categories":["MCP Servers"],"readme":"# 🤖 Agenite\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./apps/docs/images/hero-dark.png\" alt=\"Agenite Logo\"  height=\"200\"/\u003e\n  \u003cp\u003e\u003cstrong\u003eA modern, modular, and type-safe framework for building AI agents using typescript\u003c/strong\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \n[![GitHub license](https://img.shields.io/github/license/subeshb1/agenite)](https://github.com/subeshb1/agenite/blob/main/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@agenite/agent.svg)](https://www.npmjs.com/package/@agenite/agent)\n[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-blue)](https://www.typescriptlang.org/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/subeshb1/agenite/pulls)\n\n\u003c/div\u003e\n\n## What is Agenite?\n\nAgenite is a powerful TypeScript framework designed for building sophisticated AI agents. It provides a modular, type-safe, and flexible architecture that makes it easy to create, compose, and control AI agents with advanced capabilities.\n\n## ✨ Key features\n\n- **Type safety and developer experience**\n  - Built from the ground up with TypeScript\n  - Robust type checking for tools and agent configurations\n  - Excellent IDE support and autocompletion\n\n- **Tool integration**\n  - First-class support for function calling\n  - Built-in JSON Schema validation\n  - Structured error handling\n  - Easy API integration\n\n- **Provider agnostic**\n  - Support for OpenAI, Anthropic, AWS Bedrock, and Ollama\n  - Consistent interface across providers\n  - Easy extension for new providers\n\n- **Advanced architecture**\n  - Bidirectional flow using JavaScript generators\n  - Step-based execution model\n  - Built-in state management with reducers\n  - Flexible middleware system\n\n- **Model context protocol (MCP)**\n  - Standardized protocol for connecting LLMs to data sources\n  - Client implementation for interacting with MCP servers\n  - Access to web content, filesystem, databases, and more\n\n## 📦 Available packages\n\n| Package | Description | Installation |\n|---------|-------------|--------------|\n| **Core packages** | | |\n| `@agenite/agent` | Core agent orchestration framework for managing LLM interactions, tool execution, and state management | `npm install @agenite/agent` |\n| `@agenite/tool` | Tool definition framework with type safety, schema validation, and error handling | `npm install @agenite/tool` |\n| `@agenite/llm` | Base provider interface layer that enables abstraction across different LLM providers | `npm install @agenite/llm` |\n| **Provider packages** | | |\n| `@agenite/openai` | Integration with OpenAI's API for GPT models with function calling support | `npm install @agenite/openai` |\n| `@agenite/anthropic` | Integration with Anthropic's API for Claude models | `npm install @agenite/anthropic` |\n| `@agenite/bedrock` | AWS Bedrock integration supporting Claude and other models | `npm install @agenite/bedrock` |\n| `@agenite/ollama` | Integration with Ollama for running models locally | `npm install @agenite/ollama` |\n| **MCP package** | | |\n| `@agenite/mcp` | Model Context Protocol client for connecting to standardized data sources and tools | `npm install @agenite/mcp` |\n| **Middleware packages** | | |\n| `@agenite/pretty-logger` | Colorful console logging middleware for debugging agent execution | `npm install @agenite/pretty-logger` |\n\nFor a typical setup, you'll need the core packages and at least one provider:\n\n```bash\n# Install core packages\nnpm install @agenite/agent @agenite/tool @agenite/llm\n\n# Install your preferred provider\nnpm install @agenite/openai\n# OR\nnpm install @agenite/bedrock\n```\n\n## 🚀 Quick start\n\n```typescript\nimport { Agent } from '@agenite/agent';\nimport { Tool } from '@agenite/tool';\nimport { BedrockProvider } from '@agenite/bedrock';\nimport { prettyLogger } from '@agenite/pretty-logger';\n\n// Create a calculator tool\nconst calculatorTool = new Tool\u003c{ expression: string }\u003e({\n  name: 'calculator',\n  description: 'Perform basic math operations',\n  inputSchema: {\n    type: 'object',\n    properties: {\n      expression: { type: 'string' },\n    },\n    required: ['expression'],\n  },\n  execute: async ({ input }) =\u003e {\n    try {\n      const result = new Function('return ' + input.expression)();\n      return { isError: false, data: result.toString() };\n    } catch (error) {\n      if (error instanceof Error) {\n        return { isError: true, data: error.message };\n      }\n      return { isError: true, data: 'Unknown error' };\n    }\n  },\n});\n\n// Create an agent\nconst agent = new Agent({\n  name: 'math-buddy',\n  provider: new BedrockProvider({\n    model: 'anthropic.claude-3-5-sonnet-20240620-v1:0',\n  }),\n  tools: [calculatorTool],\n  instructions: 'You are a helpful math assistant.',\n  middlewares: [prettyLogger()],\n});\n\n// Example usage\nconst result = await agent.execute({\n  messages: [\n    {\n      role: 'user',\n      content: [{ type: 'text', text: 'What is 1234 * 5678?' }],\n    },\n  ],\n});\n```\n\n## 🏗️ Core concepts\n\n### Agents\n\nAgents are the central building blocks in Agenite. An agent:\n- Orchestrates interactions between LLMs and tools\n- Manages conversation state and context\n- Handles tool execution and results\n- Supports nested execution for complex workflows\n- Provides streaming capabilities for real-time interactions\n\n### Tools\n\nTools extend agent capabilities by providing specific functionalities:\n- Strong type safety with TypeScript\n- JSON Schema validation for inputs\n- Flexible error handling\n- Easy API integration\n\n### Providers\n\nCurrently supported LLM providers:\n- OpenAI API (GPT models)\n- Anthropic API (Claude models)\n- AWS Bedrock (Claude, Titan models)\n- Local models via Ollama\n\n### Model Context Protocol (MCP)\n\nMCP is a standardized protocol for connecting LLMs to data sources:\n- Client implementation for interacting with MCP servers\n- Access to web content, filesystem, databases, and more\n- Similar to how USB-C provides universal hardware connections\n\n## 🔄 Advanced features\n\n### Multi-agent systems\n\n```typescript\n// Create specialist agents\nconst calculatorAgent = new Agent({\n  name: 'calculator-specialist',\n  provider,\n  tools: [calculatorTool],\n  description: 'Specializes in mathematical calculations',\n});\n\nconst weatherAgent = new Agent({\n  name: 'weather-specialist',\n  provider,\n  tools: [weatherTool],\n  description: 'Provides weather information',\n});\n\n// Create a coordinator agent\nconst coordinatorAgent = new Agent({\n  name: 'coordinator',\n  provider,\n  agents: [calculatorAgent, weatherAgent],\n  instructions: 'Coordinate between specialist agents to solve complex problems.',\n});\n```\n\n### Step-based execution\n\n```typescript\n// Create an iterator for fine-grained control\nconst iterator = agent.iterate({\n  messages: [{ role: 'user', content: [{ type: 'text', text: 'Calculate 25 divided by 5, then multiply by 3' }] }],\n  stream: true,\n});\n\n// Process the stream with custom handling\nfor await (const chunk of iterator) {\n  switch (chunk.type) {\n    case 'agenite.llm-call.streaming':\n      console.log(chunk.content);\n      break;\n    case 'agenite.tool-call.params':\n      console.log('Using tool:', chunk.toolUseBlocks);\n      break;\n    case 'agenite.tool-result':\n      console.log('Tool result:', chunk.result);\n      break;\n  }\n}\n```\n\n## 📚 Documentation\n\nFor comprehensive documentation, visit [docs.agenite.com](https://docs.agenite.com):\n\n- [Introduction](https://docs.agenite.com/introduction)\n- [Quick start guide](https://docs.agenite.com/quickstart)\n- [Core concepts](https://docs.agenite.com/core-concepts/overview)\n- [Examples](https://docs.agenite.com/examples)\n- [API reference](https://docs.agenite.com/api-reference/agent)\n\n## 🤝 Community\n\n- [GitHub Discussions](https://github.com/subeshb1/agenite/discussions)\n- [Discord Community](https://discord.gg/v3TXcD6tUH)\n\n## 🛠️ Development\n\n```bash\ngit clone https://github.com/subeshb1/agenite.git\ncd agenite\npnpm install\npnpm build\n```\n\n## 📄 License\n\nMIT\n\n## 🌟 Star history\n\n[![Star History Chart](https://api.star-history.com/svg?repos=subeshb1/agenite\u0026type=Date)](https://star-history.com/#subeshb1/agenite\u0026Date)\n\n```\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubeshb1%2Fagenite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubeshb1%2Fagenite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubeshb1%2Fagenite/lists"}