You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sirji is an AI agentic framework designed as a VS Code extension to aid developers in solving a range of software development problems.
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.
Example agent.yml file
id: NODE_JS_API_CODERname: Node JS API Coderllm:
provider: openaimodel: gpt-4osub_agents:
- id: CODE_PLANNER
- id: CODE_WRITERskills:
- skill: "Developing robust backend REST APIs using Node.js and Express, integrating Sequelize ORM with PostgreSQL databases, and implementing Redis for efficient caching solutions."pseudo_code: | 1. INVOKE_AGENT CODE_PLANNER to analyze problem statements, identify relevant files, thoroughly review their contents, identify relevant dependencies, thoroughly review their contents too, and create a detailed implementation guide. 2. INVOKE_AGENT CODE_WRITER to read the implementation guide, extract necessary file changes, apply these modifications to the project files. 3. Respond back to the agent who invoked you, detailing your actions in the BODY.
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.
Example Recipe File
{
"prescribed_tasks": [
{
"task": "Write epics and user stories.",
"agent": "PRODUCT_MANAGER"
},
{
"task": "Write architecture components.",
"agent": "ARCHITECT"
},
{
"task": "Implement the epic & user stories using the architecture components.",
"agent": "CODER"
}
],
"tips": [
{
"deviation": "Architecture components are not in sync with the epics and user stories.",
"agent": "PRODUCT_MANAGER",
"task": "Make the epics and user stories consistent with the architecture components."
}
]
}
Recipe Index
The Recipe Index is a file that stores metadata about all the recipes in the Sirji framework. It contains details such as the description of each recipe and its file path.
[
{
"description": "Description of the recipe",
"file": "Path to the recipe file"
}
]
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.
Orchestrator and User-Driven Configuration
The Orchestrator is the central component in the Sirji framework, responsible for managing the flow and execution of tasks across different agents. It coordinates the execution of tasks and ensures user-driven customization is integrated effectively.
Workflow
Problem Statement Analysis: The Orchestrator first asks the user for a problem statement. Depending on the requirements, such as a GitHub issue URL, it gathers necessary information by fetching issue content and cloning the repository. It then documents the detailed problem statement in the Shared Resources.
Recipe Selection and Customization: The Orchestrator selects the appropriate recipe for the session. If the user opts to reuse a previously loaded recipe and agents, it skips automatic recipe selection. Otherwise, it uses the Recipe Index and the problem statement to determine the most suitable recipe, storing the selected recipe.json file in the "active_recipe" folder. Additionally, it stores the agent.json files in the "active_recipe/agents" folder. This directory also contains a README file that explains various terminologies, provides descriptions of each file, and offers instructions on how to customize the recipes and agents, as well as guidance on publishing custom recipes and agents by making pull requests to the Sirji GitHub repository.
User Customization: Users can edit the files within the "active_recipe" folder to tailor the setup to their specific needs.
User Confirmation: Once the user finalizes their modifications in the "active_recipe" folder, they notify Sirji to proceed. Sirji then copies the whole "active_recipe" folder to the current session's folder to maintain a reference of the configurations used.
Configuration Preservation: The config.json file inside the "active_recipe" folder includes a retain_changes setting (defaults to false). If set to true, Sirji preserves these customizations and skips auto-selection in future sessions.
Task Execution and Management: The Orchestrator interprets the active recipe to identify and assign tasks to the appropriate agent. It also uses the "tips" in the recipe to handle deviations from the prescribed task order, ensuring smooth progression.
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.
Example Shared Resources index.json file
{
"SIRJI/problem.txt": {
"description": "Problem statement from the SIRJI_USER.",
"created_by": "SIRJI"
},
"CODE_PLANNER/implementation_guide.md": {
"description": "This file contains a detailed implementation guide for developing the ...",
"created_by": "CODE_PLANNER"
}
}
The text was updated successfully, but these errors were encountered:
Sirji is an AI agentic framework designed as a VS Code extension to aid developers in solving a range of software development problems.
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.
Example agent.yml file
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.
Example Recipe File
Recipe Index
The Recipe Index is a file that stores metadata about all the recipes in the Sirji framework. It contains details such as the description of each recipe and its file path.
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.
Orchestrator and User-Driven Configuration
The Orchestrator is the central component in the Sirji framework, responsible for managing the flow and execution of tasks across different agents. It coordinates the execution of tasks and ensures user-driven customization is integrated effectively.
Workflow
config.json
file inside the "active_recipe" folder includes aretain_changes
setting (defaults to false). If set to true, Sirji preserves these customizations and skips auto-selection in future sessions.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.
Example Shared Resources index.json file
The text was updated successfully, but these errors were encountered: