Skip to content

Drakezair/kitagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

KitAgent

KitAgent is a workflow-based API framework powered by YAML and AI agents. Create extensible tools, workflows, and intelligent agents with zero boilerplate.

KitAgent Banner

πŸš€ Getting Started

The easiest way to get started with KitAgent is to use our CLI tool:

# Create a new project
npx create-kitagent my-kitagent-project

# Navigate to the project directory
cd my-kitagent-project

# Copy .env.example to .env and add your OpenAI API key
cp .env.example .env

# Start the development server
npm run dev

πŸ“ Description

KitAgent is a modern backend framework designed to create AI-powered applications with minimal effort. It leverages YAML for configuration and provides a clean architecture for developing tools, workflows, and agents. KitAgent enables developers to focus on business logic rather than boilerplate code.

✨ Why Use KitAgent?

  • 🧰 Tools System: Create reusable and composable tools with a simple API
  • πŸ”„ Workflow Engine: Define complex workflows with YAML
  • πŸ€– AI Agent Integration: Seamlessly integrate AI models into your applications
  • πŸ“¨ HTTP Interface: Expose your workflows and agents via HTTP endpoints
  • 🧩 Model Context Protocol: Support for the Model Context Protocol (MCP) for better interoperability
  • πŸ”Œ Extensible: Easy to extend with custom functionality

🧠 Philosophy

KitAgent follows these core principles:

  1. Declarative over Imperative: Use YAML to declare workflows instead of writing procedural code
  2. Convention over Configuration: Follow simple patterns to get started quickly
  3. Modular Architecture: Build applications with reusable components
  4. AI-First Approach: Designed with AI integration in mind from the beginning
  5. Developer Experience: Focus on making the framework easy to use and understand

πŸ—οΈ Architecture

KitAgent is built around several key components:

Tools

A tool is a reusable function that performs a specific task. Tools can be composed together to create more complex functionality.

Example of a tool:

// weatherTool.ts
import { z } from 'zod';
import { registerTool } from 'kitagent';

registerTool({
  name: 'weather',
  description: 'Get current weather for a location',
  parameters: {
    location: z.string().describe('The city and country')
  },
  execute: async ({ params }) => {
    // Implementation to fetch weather
    return { temperature: 22, conditions: 'Sunny' };
  }
});

Workflows

Workflows define a sequence of steps that can include tools or agents. They are defined using YAML files.

Example of a workflow:

# travel-planner.wf.yml
name: travel-planner
steps:
  - name: getWeather
    tool: weather
  - name: suggestActivities
    agent: activities
http:
  method: post
  path: /api/travel-planner

Agents

Agents are AI-powered components that can use tools to accomplish tasks. They are defined similar to tools but with additional AI capabilities.

Example of an agent:

// activitiesAgent.ts
import { z } from 'zod';
import { registerAgent } from 'kitagent';

registerAgent({
  name: 'activities',
  description: 'Suggests activities based on weather',
  parameters: {
    weather: z.object({
      temperature: z.number(),
      conditions: z.string()
    })
  },
  tools: ['googleMaps', 'tripAdvisor'],
  task: async ({ params, tools, context }) => {
    // Use AI to suggest activities based on weather
    return { activities: ['Visit the park', 'Go to a cafe'] };
  }
});

Chat Interface

KitAgent provides a chat interface for interactive AI experiences.

Example of a chat configuration:

# travel-assistant.chat.yml
name: travel-assistant
type: chat
client: openai
tools:
  - weather
  - activities
http:
  path: /api/chat/travel-assistant

Model Context Protocol (MCP)

Support for the Model Context Protocol enables better integration with different AI models.

Example of an MCP configuration:

// travelPlanner.mcp.ts
import { registerMCP } from 'kitagent';

registerMCP({
  name: 'travel-planner',
  description: 'A travel planning assistant',
  version: '1.0.0',
  path: '/api/mcp/travel-planner',
  tools: ['weather', 'activities'],
  server: async ({ server }) => {
    // Configure MCP server
  }
});

πŸ” Use Cases

KitAgent is ideal for:

  • πŸ€– AI-powered APIs: Create endpoints that leverage AI models
  • πŸ”„ Workflow Automation: Automate complex business processes
  • πŸ’¬ Chatbots and Assistants: Build intelligent conversational agents
  • 🧩 API Orchestration: Combine multiple APIs into cohesive workflows
  • πŸ” Data Processing Pipelines: Process and transform data with AI augmentation

πŸ› οΈ Tools & Resources

  • create-kitagent: Our official CLI tool for scaffolding new projects
  • Ticket Manager Template: A complete ticket management system example included in the CLI
  • Documentation: Coming soon!

πŸ›£οΈ Roadmap

  • Build a CLI for scaffolding new KitAgent projects
  • Create simple interface for integration with OpenAI
  • Create simple interface for integration with different AI models and chat providers
  • Develop a visual UI for creating workflows, MCP, and chat systems with drag-and-drop functionality
  • Add real-time capabilities with WebSocket support
  • Implement database adapters for persistent storage
  • Create a plugin system for extending functionality
  • Add authentication and authorization mechanisms
  • Develop comprehensive testing utilities
  • Create deployment templates for various cloud providers

πŸ“š Examples

Check out the examples directory for complete samples of:

  • Tools implementation
  • Workflow definitions
  • Agent configurations
  • Chat setups
  • MCP implementations

Or simply create a new project with our CLI to see a fully implemented ticket management system:

npx create-kitagent ticket-system

πŸ“„ License

KitAgent is open source software licensed under the MIT license.

πŸ‘₯ Contributing

We welcome contributions! Please see our Contributing Guide for details on how to get started.

πŸ™ Acknowledgements

KitAgent is inspired by frameworks like Express, NestJS, and Langchain, aiming to combine the best aspects of these tools with a focus on AI integration.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published