Sirji Save

Sirji is a framework to build & run custom AI agents for your everyday dev tasks.

Project README

Sirji Logo

Sirji is a framework to build & run custom AI agents for your everyday dev tasks.

Built with ❤️ by True Sparrow

GitHub License GitHub commit activity GitHub Open Issues GitHub Closed Issues

GitHub Repo stars GitHub forks GitHub watchers

Sirji

Sirji is a framework designed to build and run custom AI agents for your everyday development tasks.

Sirji has two main product components: Sirji Studio and Sirji VS Code Extension.

Sirji Studio

We have built the framework that allows the developer community to build custom agents simply by writing pseudocode in plain English.

Custom agents help capture and convey the developer's code writing style and domain knowledge to Sirji. They performs a specific task based on a custom pseudocode. The community can create a custom agent either by modifying an existing agent or by writing an entirely new agent with a different pseudocode.

Sirji VS Code Extension

We have build and released the VS Code Extension on the Visual Studio Marketplace.

This extension has the following features implemented:

  • Interactive chat interface allows user to submit their problem statements and give feedback to Sirji.
  • Messaging protocol implements the allowed response templates for messages exchanged between various agents.
  • Orchestrator enables requirement gathering, recipe selection, recipe execution by invoking agents
  • Executor makes these functionalities accessible to the agents: file system access, search, find & replace, insert text in project files, install packages, execute commands, run code, run test cases.
  • Agent Sessions provide the ability to invoke an agent with a fresh LLM conversation or continue on an existing LLM conversation.
  • Logs and Token Usage Summary are displayed alongside the interactive chat interface.

Installation

You can start using Sirji by installing this extension from the Visual Studio Marketplace.

Make sure you have installed all of the following prerequisites on your machine:

  • Visual Studio Code (>= 1.80.2)
  • Node.js (>= 18) and npm (>= 8.19)
  • Python (>= 3.10) - Make sure python --version runs without error.
  • tee command - Make sure which tee runs without error.

Also, you will need an OpenAI API key to access the GPT-4o model.

Demo Video

Here's a three-minute demo. We tasked Sirji with creating a new API and its test cases in an existing Node.js repository. Sirji uses these custom agents we developed:

  • Code Planner: Generates an implementation guide with steps and code snippets based on domain knowledge.
  • Test Planner: Generates an implementation guide for test cases, following the existing framework and conventions.
  • Code Writer: Implements the code changes specified in the guides.

Watch on YouTube: https://www.youtube.com/watch?v=NA7uPIvcvmg

Custom Agents for Creating a New API and Test Cases in an Existing Node.js Repository

Architecture

Let's go step by step in understanding the architecture.

Agent

An Agent in the Sirji framework is a modular AI component that performs a specific task based on a custom pseudo code.

An agent defines its skills in an agent.yml file. This file lists the skills of the agent and the pseudo code to follow for each skill. It also specifies the LLM provider and model to be used for inference. Additionally, it lists the sub-agents that can be invoked from within the agent to complete certain parts of the task.

Recipe (recipe.json)

A Recipe is a file that lists prescribed tasks and tips for solving a particular problem. It also indicates which agent should perform each task. The tips provide guidance for addressing issues that arise when tasks are performed out of the prescribed order. Each tip specifies the task and the agent responsible for it.

Orchestrator

The Orchestrator is the central component in the Sirji framework, responsible for following:

  • Gathering requirement from the user.
  • Showing list of available recipes to the user and asking for their choice.
  • Reading the selected recipe and managing the flow & execution of prescribed tasks from the selected recipe.

Agent Sessions

An agent can be invoked in either a fresh session or asked to continue an existing session. When invoked in a new session, it starts with a new system prompt and does not retain the context from the previous session. Sessions help keep the context focused on specific tasks.

Messaging Protocol

The messaging protocol defines how the response from an LLM inference for an agent should appear. It specifies the recipient-specific allowed Response Templates. These Response Templates also adhere to an interface that mandates the presence of keys: FROM, TO, BODY, SUMMARY, and ACTION. The BODY may contain an ACTION-specific information schema.

Project Folder

The Project Folder is the primary directory for accessing all user-specific project files, including code files, documentation, and other relevant resources. When initializing Sirji, the user selects this folder as the primary workspace for the project.

Agent Output Folder

The Agent Output Folder is designated for storing the results and data outputs generated by the agents. This folder is different from the project folder and this ensures that operational data is kept separate from project files.

Agent Output Index

The Agent Output Index is an index file for the Agent Output Folder that keeps track of all files written by agents in that folder along with the a brief description of the file contents.

PyPI Packages

We have published following 3 PyPI packages, implementing different responsibilities. These packages are invoked by Python Adapter Scripts, which are spawned by the extension.

sirji-agents Sirji Agents on PyPI

sirji-agents (located in the agents folder of this monorepo) is a PyPI package that implements the following components of the Sirji AI agentic framework:

  • Orchestrator: The Orchestrator is the central component in the Sirji framework, responsible for managing the flow and execution of tasks across different agents.
  • Generic Agent: Run time composable class providing the agent functionality as per the pseudo code provided in the agent.yml file.
  • Research Agent: Utilizes RAG (Retrieval-Augmented Generation) and gets trained on URLs and search terms.

sirji-messages Sirji Messages on PyPI

sirji-messages (located in the messages folder of this monorepo) is a PyPI package that implements the Sirji messaging protocol with the following highlights:

  • Message Factory: A factory that provides a Message class for a given action.
  • Message Parser: Parse structured message strings into Python dictionaries for easy access to the message components.
  • Allowed Response Templates: Provides the part of the system prompt describing allowed Response Templates for a given agent pair.
  • Custom Exceptions: A set of custom exceptions thrown by the message parser.
  • Enums for Agents and Actions: Provides easy auto-completion while writing code.

sirji-tools Sirji Tools on PyPI

sirji-tools (located in the tools folder of this monorepo) implements these tools:

  • Crawling (downloading web pages to markdown files)
  • Searching on Google
  • Custom Logging

Architecture Diagram

Sirji - Architecture Diagram

Roadmap

We are calling our next release the ‘Core’ Release (ONGOING).

Here is the link to the ‘Core’ release’s roadmap: https://github.com/orgs/sirji-ai/projects/5

This is a significant release focused on the following key areas:

  • User accounts: Users will be required to create an account with Sirji. They can either bring their own LLM key or subscribe to a free but rate-limited Developer plan.
  • Improve reliability: The first version of the VS Code extension improved usability, but after using it ourselves for a while, we identified several issues and limitations ranging from incomplete solutions to a lack of web debugging capabilities. We are addressing these issues to make Sirji more reliable in solving software problems.
  • Custom agents and recipes: We are developing the framework to enable users to create and use custom agents and recipes (instructions on how the agents interact). This involves enhancing the orchestration functionality and refactoring existing base agents.

Contributing

We welcome contributions to Sirji! If you're interested in helping improve this VS Code extension, please take a look at our Contributing Guidelines for more information on how to get started.

Thank you for considering contributing to Sirji. We look forward to your contributions!

Reporting Issues

If you run into any issues or have suggestions, please report them by following our issue reporting guidelines. Your reports help us make Sirji better for everyone.

Stay In Touch

Office Hours

License

Distributed under the MIT License. See LICENSE for more information.

Open Source Agenda is not affiliated with "Sirji" Project. README Source: sirji-ai/sirji
Stars
63
Open Issues
36
Last Commit
5 days ago
Repository
License
MIT
Homepage

Open Source Agenda Badge

Open Source Agenda Rating