Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.24 KB

File metadata and controls

71 lines (51 loc) · 2.24 KB

FSAgent

FSAgent is a multi-agent coding framework that uses Google GenAI models and the A2A (Agent-to-Agent) protocol to generate full-stack applications.

The system reads an input configuration and runs a Frontend Agent and a Backend Agent in parallel to write the codebase. Once generation is complete, an interactive CLI agent starts, allowing the user to interact with the generated code and run terminal commands (e.g., to install dependencies or start the server).

Features

  • Parallel Execution: Frontend and Backend generation tasks run concurrently using asyncio.gather().
  • Interactive CLI: An interactive terminal interface for communicating with the agent after generation.
  • Terminal Execution: The agent has access to a tool to run terminal commands natively.
  • JSON Configuration: Projects are defined using a single input.json file.

Getting Started

1. Prerequisites

Python 3.10 or higher is required. Install the necessary dependencies:

pip install -r requirements.txt

Current tested dependencies:

  • google-adk==1.27.2
  • a2a-sdk==0.3.25
  • google-genai==1.68.0
  • pydantic==2.12.5

2. Configure Environment

Create a .env file inside the Agent directory and add your Google API Key:

GOOGLE_API_KEY="AIzaSy..."

3. Define the Blueprint

Modify input.json located at the root of the project to set the instructions and output directory:

{
  "instructions": "Build a simple user login authentication portal in React with a matching backend.",
  "figma_url": "",
  "output_dir": "../output_codebase"
}

4. Run the Framework

Start the A2A Server The underlying planner requires the Agent-to-Agent MCP endpoint. Run this in a background terminal:

cd Agent
python servers/figma_server.py

Run the Main Script In a separate terminal, execute the main script to start the generation process:

cd Agent
python main.py

Architecture Overview

  • FigmaAgent.py: The architecture planner that constructs the unified JSON blueprint.
  • FrontendAgent.py & BackendAgent.py: The task agents that write the code.
  • UserAgent.py: The interactive CLI agent that takes over after generation.
  • main.py: The entry point that orchestrates the concurrent tasks.