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).
- 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.jsonfile.
Python 3.10 or higher is required. Install the necessary dependencies:
pip install -r requirements.txtCurrent tested dependencies:
- google-adk==1.27.2
- a2a-sdk==0.3.25
- google-genai==1.68.0
- pydantic==2.12.5
Create a .env file inside the Agent directory and add your Google API Key:
GOOGLE_API_KEY="AIzaSy..."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"
}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.pyRun the Main Script In a separate terminal, execute the main script to start the generation process:
cd Agent
python main.pyFigmaAgent.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.