Skip to main content

Architecture

Sirji has a modular architecture for easily creating custom agents and recipes. Let's discuss its components, one by one.

Custom Agent

An Agent in the Sirji framework is a modular AI component that performs specific tasks based on custom pseudocode.

Learn more

Recipe

A recipe is a list of tasks, each assigned to a specific agent.

Learn more

Orchestrator

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

  • Recipe Selection: Displaying the list of recipes from the recipe index file for user selection.
  • Agent Invocation: Invoking agents in the order specified by the recipe to perform tasks.

Executor

The Executor is a non-AI agent with the following capabilities:

  • File system CRUD operations
  • Execute commands
  • Run code
  • Install packages

All agents can access these capabilities via the Executor.

Researcher

The Researcher is an agent based on Retrieval-Augmented Generation (RAG) using the OpenAI Assistants API. It can sync your entire project folder with the OpenAI assistant and answer queries based on the synced files. The project files are uploaded to a vector store, which updates automatically with any changes made by the Sirji framework.

Agent Sessions

Agents can start a new session or continue an existing one. New sessions begin with a fresh system prompt without retaining previous context.

Messaging Protocol

Sirji implements a custom messaging protocol defining how LLM-based agents instruct the Executor or Researcher to perform actions. Read more

How It Works

  1. Orchestrator Invokes Recipe Selector: The Recipe Selector agent reads recipes/index.json to list available recipes.

  2. User Selects a Recipe: The Recipe Selector saves the chosen recipe in the Agent Output Folder.

  3. Orchestrator Reads the Selected Recipe: The Orchestrator retrieves the selected recipe from the Agent Output Folder.

  4. Orchestrator Invokes Agents: The Orchestrator invokes agents in the order specified in the recipe to perform tasks.

  5. Agent Execution: Each agent follows its pseudocode step-by-step.

  6. Agent Invokes Sub-Agents: Agents can optionally invoke other agents for sub-tasks.

Architecture Diagram

Sirji Architecture