Skip to content

Acquarts/A2A-MCP-Multiagent-Smart-RFP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart RFP/Proposal Agent

Multi-agent system that automates the creation of professional commercial and technical proposals using A2A (Agent-to-Agent) orchestration and MCP (Model Context Protocol).

Python Anthropic MCP Pydantic Tavily httpx python-docx Streamlit License


DEMO LIVE: https://a2a-mcp-multiagent-smart-rfp.streamlit.app/

What Problem Does It Solve?

Writing commercial and technical proposals is a time-consuming, repetitive process that involves:

  • Researching the prospective client (company profile, key decision-makers, industry context)
  • Analyzing RFP documents to extract requirements, budget constraints, and evaluation criteria
  • Searching internal records for relevant past projects and case studies
  • Estimating costs based on team composition, complexity, and project scope
  • Writing a structured, professional proposal that ties everything together

This system automates the entire pipeline β€” from client research to final deliverable β€” by coordinating four specialized AI agents through a single conversational interface. What traditionally takes days of manual work is reduced to a single interactive session.


Architecture

The system follows an A2A (Agent-to-Agent) pattern where a central orchestrator powered by Claude coordinates four independent agents, each running as an MCP (Model Context Protocol) server.

                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚        User (CLI Chat)       β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚   Orchestrator (Claude LLM)  β”‚
                         β”‚   A2A Coordination Engine     β”‚
                         β”‚   Agentic Loop (max 10 iter) β”‚
                         β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”˜
                            β”‚       β”‚       β”‚       β”‚
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β” β”Œβ–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚  Client    β”‚ β”‚Knowledgeβ”‚ β”‚Proposalβ”‚ β”‚ Pricing β”‚
                  β”‚  Research  β”‚ β”‚  Base   β”‚ β”‚ Writer β”‚ β”‚  Agent  β”‚
                  β”‚  Agent     β”‚ β”‚  Agent  β”‚ β”‚ Agent  β”‚ β”‚         β”‚
                  β”‚ (MCP Srv)  β”‚ β”‚(MCP Srv)β”‚ β”‚(MCP Sv)β”‚ β”‚(MCP Srv)β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How It Works

  1. The user submits a request through the interactive CLI (e.g., "Create a proposal for Acme Corp for a mobile app project")
  2. The Orchestrator analyzes the request using Claude and determines which agents and tools to invoke
  3. Agents are called via MCP tool execution β€” each agent runs as a subprocess communicating over stdio
  4. The orchestrator loops (up to 10 iterations), calling tools and accumulating context until Claude produces a final synthesized response
  5. The user receives a complete, professional proposal ready for client submission
  6. Optionally, the proposal is exported to a .docx file with cover page, branding, and professional formatting

Agent Cards (A2A Discovery)

The system uses Agent Cards to implement the A2A discovery pattern. Each agent publishes a card (defined via Pydantic models in agent_cards.py) that declares its identity, capabilities, and how to start it. The orchestrator reads these cards at runtime to discover available agents and route tasks.

class AgentCard(BaseModel):
    agent_id: str           # Unique identifier (e.g., "client_research")
    name: str               # Human-readable name
    description: str        # What the agent does
    version: str            # Semantic version
    status: AgentStatus     # available | busy | offline
    skills: list[AgentSkill]        # List of capabilities with MCP tool mappings
    mcp_server_command: list[str]   # Command to launch the MCP server subprocess
    dependencies: list[str]         # Other agent IDs this agent depends on

Each AgentSkill maps a high-level capability to a specific MCP tool and includes example queries that help the orchestrator understand when to invoke it:

Agent Card Skills Dependencies
client_research company_research, rfp_analysis, linkedin_research β€”
knowledge_base project_search, project_details, tech_stack_search, case_studies β€”
proposal_writer full_proposal, timeline, executive_summary, export_docx client_research, knowledge_base
pricing project_estimation, custom_estimation, rate_card β€”

All cards are registered in AGENT_REGISTRY, making it easy to add new agents β€” just define a new AgentCard and register it.


Agents

Client Research Agent

Investigates prospective clients using web search and AI analysis.

Tool Description
search_company_info Searches the web via Tavily and extracts a structured company profile using Claude
analyze_rfp_document Parses RFP text to extract requirements, budget, timeline, and evaluation criteria
search_linkedin_company Finds key decision-makers and company info via LinkedIn proxy search

Knowledge Base Agent

Searches an internal database of past projects for relevant experience and case studies.

Tool Description
search_past_projects Keyword matching + Claude semantic ranking of internal projects
get_project_details Retrieves full details for a specific project by ID
search_tech_stack Finds projects that used specific technologies
get_case_studies Retrieves case studies relevant to a client's industry sector

Proposal Writer Agent

Generates professional, structured proposals with bilingual support (English/Spanish).

Tool Description
generate_proposal Creates a full 8-section proposal from gathered context
generate_timeline Builds project phases with milestones and deliverables
generate_executive_summary Distills the proposal into key executive talking points
export_proposal_docx Exports the markdown proposal to a professional Word (.docx) file

Proposal Sections: Executive Summary, Understanding, Proposed Solution, Methodology, Team, Case Studies, Investment, Next Steps

Pricing Agent

Estimates project costs with configurable team composition, complexity multipliers, and discount tiers.

Tool Description
estimate_project AI analyzes scope, recommends team composition, and calculates total cost
estimate_from_roles Manual team-based pricing with custom role selection
get_rate_card Returns hourly rates, complexity multipliers, and discount rules

Pricing Features:

  • 9 predefined roles with hourly rates (EUR 60–100/hr)
  • Complexity multipliers: low (0.8x) to very high (1.6x)
  • Discount tiers: standard, long-term, strategic (up to 10%)
  • Phase-based cost distribution (discovery 8%, design 12%, development 50%, testing 15%, deployment 15%)

Tech Stack

Category Technology Purpose
LLM Anthropic Claude API Reasoning, analysis, content generation
Agent Framework MCP (Model Context Protocol) / FastMCP Agent server framework and tool registration
Orchestration A2A Protocol Multi-agent coordination and routing
Web Search Tavily API Company research and LinkedIn proxy search
HTTP Client httpx Async HTTP requests to external APIs
Validation Pydantic v2 Input/output data validation and serialization
Document Export python-docx Export proposals to professional Word (.docx) files
Frontend Streamlit Web-based chat UI with agent visibility
Config python-dotenv Environment variable management
Language Python 3.10+ Async/await, type hints, structural pattern matching

Project Structure

smart-rfp-agent/
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ client_research/          # Client & RFP research agent
β”‚   β”‚   β”œβ”€β”€ server.py             # MCP server definition & entrypoint
β”‚   β”‚   β”œβ”€β”€ tools.py              # Tool implementations (Tavily + Claude)
β”‚   β”‚   └── models.py             # Pydantic input/output models
β”‚   β”œβ”€β”€ knowledge_base/           # Internal project database agent
β”‚   β”‚   β”œβ”€β”€ server.py             # MCP server definition
β”‚   β”‚   β”œβ”€β”€ tools.py              # Search & ranking logic
β”‚   β”‚   β”œβ”€β”€ models.py             # Pydantic models
β”‚   β”‚   └── data/
β”‚   β”‚       └── projects.json     # Past projects database
β”‚   β”œβ”€β”€ proposal_writer/          # Proposal generation agent
β”‚   β”‚   β”œβ”€β”€ server.py             # MCP server definition
β”‚   β”‚   β”œβ”€β”€ tools.py              # Proposal generation logic
β”‚   β”‚   β”œβ”€β”€ models.py             # Pydantic models (bilingual support)
β”‚   β”‚   └── templates/
β”‚   β”‚       └── proposal_structure.json  # 8-section proposal template
β”‚   └── pricing/                  # Cost estimation agent
β”‚       β”œβ”€β”€ server.py             # MCP server definition
β”‚       β”œβ”€β”€ tools.py              # Pricing calculation logic
β”‚       β”œβ”€β”€ models.py             # Pydantic models
β”‚       └── data/
β”‚           └── rate_card.json    # Rates, multipliers & discounts
β”œβ”€β”€ orchestrator/
β”‚   β”œβ”€β”€ main.py                   # Interactive CLI entrypoint
β”‚   β”œβ”€β”€ orchestrator.py           # A2A engine (Claude + agentic loop)
β”‚   β”œβ”€β”€ agent_cards.py            # Agent capability registry
β”‚   └── mcp_client.py             # MCP subprocess connection manager
β”œβ”€β”€ streamlit_helpers/
β”‚   β”œβ”€β”€ async_bridge.py           # Async-to-sync bridge (background event loop)
β”‚   └── components.py             # Reusable UI components (sidebar, chat, i18n)
β”œβ”€β”€ shared/
β”‚   β”œβ”€β”€ utils.py                  # Shared error handling utilities
β”‚   └── docx_exporter.py          # Markdown β†’ DOCX converter with branding
β”œβ”€β”€ config/
β”‚   └── settings.py               # Environment variables & configuration
β”œβ”€β”€ app.py                        # Streamlit web frontend
β”œβ”€β”€ requirements.txt
└── .env.example

Setup

Prerequisites

Installation

# Clone the repository
git clone https://github.com/your-username/smart-rfp-agent.git
cd smart-rfp-agent

# Install dependencies
pip install -r requirements.txt

# Configure environment variables
cp .env.example .env
# Edit .env and add your API keys

Environment Variables

Variable Required Description
ANTHROPIC_API_KEY Yes Claude API access key
TAVILY_API_KEY Yes Tavily web search API key
LINKEDIN_CLIENT_ID No LinkedIn API client ID
LINKEDIN_CLIENT_SECRET No LinkedIn API client secret
MCP_TRANSPORT No Transport protocol (default: stdio)
MCP_PORT No Server port (default: 8000)

Running

Web UI (Streamlit) β€” Recommended:

streamlit run app.py

This opens a browser-based chat interface with:

  • Real-time conversation with the AI orchestrator
  • Sidebar showing connected agents and their skills
  • Language selector (English / Spanish)
  • One-click DOCX export and download
  • New conversation button

CLI (Terminal):

python orchestrator/main.py
Command Description
/new Start a new conversation
/agents List available agents and their tools
/quit Exit the application

Running Agents Standalone

Each agent can be run independently as an MCP server for testing or integration:

python agents/client_research/server.py
python agents/knowledge_base/server.py
python agents/proposal_writer/server.py
python agents/pricing/server.py

Example Usage

> Research Acme Corp and create a proposal for a mobile e-commerce app

[Orchestrator calls Client Research Agent β†’ searches company info]
[Orchestrator calls Knowledge Base Agent β†’ finds similar past projects]
[Orchestrator calls Pricing Agent β†’ estimates project cost]
[Orchestrator calls Proposal Writer Agent β†’ generates full proposal]

βœ… Complete 8-section proposal generated with:
   - Company analysis and context
   - Technical solution architecture
   - Relevant case studies from past projects
   - Detailed cost breakdown and timeline
   - Executive summary and next steps

> Export the proposal to Word

[Proposal Writer Agent β†’ exports to DOCX]

βœ… Saved to exports/proposal_acme_corp_20260207_143022.docx

Key Design Decisions

  • MCP over REST: Agents communicate via stdio-based MCP rather than HTTP, eliminating network overhead and simplifying local deployment
  • Agentic loop: The orchestrator lets Claude decide which tools to call and in what order, enabling flexible multi-step reasoning
  • Bilingual support: Proposals can be generated in English or Spanish via a simple language parameter
  • Configurable pricing: Rate cards, complexity multipliers, and discount tiers are stored in JSON files for easy customization without code changes
  • DOCX export: Proposals can be exported to professional Word documents with cover page, branded styling, headers/footers, and page numbers via python-docx
  • Agent Cards (A2A discovery): Each agent publishes a structured card declaring its skills, MCP tool mappings, and dependencies, enabling dynamic discovery and extensibility
  • Modular agents: Each agent is fully independent and can be developed, tested, or replaced without affecting the rest of the system

About

Multi-agent system that automates the creation of professional commercial and technical proposals using A2A (Agent-to-Agent) orchestration and MCP (Model Context Protocol).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages