How fadynabil10/ai-salesgrid-on-aws works
1. Repository purpose
- This repo is a two-part AWS-hosted sales automation system: a Streamlit chat frontend and a backend Amazon Nova agent that performs multi-agent sales orchestration.
2. Top-level architecture
- The main request path is: user in Streamlit UI → AWS API Gateway → Nova/Bedrock agent backend → response back through API Gateway → Streamlit UI.
- The README positions API Gateway as the secure boundary between the UI and the agent runtime.
3. Frontend subsystem: 2- Streamlit Frontend/
- This is the interactive operator-facing application.
- app.py is the entry point and likely owns the chat UI, request submission, and rendering of agent responses.
- requirements.txt and Dockerfile show it is meant to run as a containerized Python 3.8 Streamlit app.
4. Frontend dependencies and responsibilities
- The frontend uses Streamlit for UI, requests for HTTP calls, and boto3/botocore for AWS SigV4-authenticated access to API Gateway.
- Its architectural role is thin-client orchestration: it does not contain sales logic, only input collection, API invocation, and response display.
5. Backend subsystem: 3- Amazon Nova Agent/
- This is the intelligence layer and is containerized separately from the UI.
- agents/ai-salesgrid/agent.py is the core agent implementation; __init__.py makes it a Python package.
- The backend is described as an AWS Bedrock / Amazon Nova-based agent that can orchestrate specialized sub-agents.
6. Backend responsibilities
- The agent is responsible for sales workflow intelligence: requirement analysis, pricing, proposal generation, risk assessment, and executive summaries.
- The README indicates rule-based validation around pricing, discounts, margins, approvals, and compliance, so the backend is more than simple text generation.
7. Agent runtime and integration surface
- The backend is designed to talk to Amazon Nova using an API key and is described as using the openai client against https://api.nova.amazon.com/v1.
- The Dockerfile suggests an ADK-style agent runtime (adk implied), so the backend is intended to run as a packaged agent service rather than a direct library call.
8. AWS boundary and deployment model
- AWS services are the main infrastructure boundary: API Gateway for ingress, IAM for auth, and likely ECS/EKS/Lambda for hosting the agent.
- The README also references Bedrock agents, knowledge base, and Flow, indicating the backend may rely on AWS-managed AI orchestration and retrieval components.
9. Configuration and secrets flow
- Frontend configuration is driven by environment variables for AWS credentials and the API Gateway URL.
- Backend configuration is driven by an Amazon Nova API key and an agent ID.
- This makes the architecture environment-driven and container-friendly, with no checked-in secrets.
10. Documentation and architecture artifacts
- The 1- Architecture Diagram/ folder and the two PDFs are not runtime code, but they are important architectural references.
- They likely define the intended agent topology, AWS deployment choices, and any CRM extension points.
11. Data flow and trust boundaries
- User prompts enter only through Streamlit.
- All backend execution happens behind AWS API Gateway, which is the main trust boundary.
- Any external knowledge, CRM data, or sales rules are conceptually consumed by the agent layer, not the frontend.
12. What to show in an architecture diagram
- Separate the diagram into:
- Presentation layer: Streamlit container
- API/security layer: API Gateway + IAM
- AI orchestration layer: Nova/Bedrock agent container/runtime
- Optional enterprise data layer: knowledge base / CRM / persistence, if depicted from the PDFs
- Also show the two Dockerized deployables as independent units with different runtime responsibilities.
Main entry points: app.py Streamlit app · agent.py Nova agent · README.md README · Dockerfile UI container
Components 17
Docs & diagrams
Architecture references and solution documentation
- README · Top-level overview of the solution and its deployment model
README.md - Diagram assets · Repository folder containing architectural diagrams
1- Architecture Diagram - AWS solution PDF · Solution architecture reference document
AI SalesGrid - Solution on AWS.pdf - AWS deploy PDF · Deployment-oriented architecture reference document
AI SalesGrid - Tech Deployment on AWS.pdf
Streamlit frontend
Operator-facing chat application
- Streamlit app · Operator chat interface and request submission flow
2- Streamlit Frontend/app.py - UI container · Container definition for the Streamlit frontend runtime
2- Streamlit Frontend/Dockerfile - UI deps · Frontend runtime dependencies and AWS client libraries
2- Streamlit Frontend/requirements.txt
AWS boundary
Ingress, auth, and service exposure layer
- API Gateway · Secure HTTP boundary between UI and agent runtime
- IAM auth · AWS authentication and request authorization boundary
Nova agent backend
AI orchestration and sales workflow service
- Nova agent · Backend containerized agent service
3- Amazon Nova Agent/agents/ai-salesgrid/agent.py - Agent package · Package wrapper for the sales agent implementation
3- Amazon Nova Agent/agents/ai-salesgrid/__init__.py - Agent container · Container definition for the backend agent runtime
3- Amazon Nova Agent/Dockerfile - Sales orchestration · Coordinates requirement analysis, proposal drafting, and summaries
3- Amazon Nova Agent/agents/ai-salesgrid/agent.py - Pricing rules · Rule-based checks for pricing, discounts, margins, and approvals
3- Amazon Nova Agent/agents/ai-salesgrid/agent.py
External services
Managed AI and enterprise data dependencies
- Nova API · Amazon Nova model endpoint used by the backend agent
- Bedrock tools · AWS-managed agent orchestration and knowledge components
- Enterprise data · External knowledge base, CRM, or sales data consumed by the agent
Connections 18
- README → Streamlit app: describes · README documents the frontend app role
- README → Nova agent: describes · README documents the backend agent role
- README → API Gateway: positions · README identifies API Gateway as the trust boundary
- Streamlit app → API Gateway: calls · Frontend submits user prompts through the gateway
- UI deps → Streamlit app: supports · Dependencies enable Streamlit UI and AWS client calls
- UI container → Streamlit app: packages · Containerizes the UI application
- Streamlit app → IAM auth: signs requests · Frontend uses AWS-authenticated access patterns
- API Gateway → IAM auth: enforces · Gateway applies request authentication and authorization
- API Gateway → Nova agent: routes to · Gateway forwards requests to the backend agent service
- Agent container → Nova agent: packages · Containerizes the agent runtime
- Agent package → Nova agent: exposes · Package wrapper exposes the agent implementation
- Nova agent → Sales orchestration: drives · Core agent logic coordinates sales workflows
- Nova agent → Pricing rules: applies · Agent enforces pricing and approval constraints
- Sales orchestration → Nova API: invokes · Agent calls Amazon Nova for generation and reasoning
- Sales orchestration → Bedrock tools: integrates · Agent can use Bedrock-managed orchestration and knowledge features
- Sales orchestration → Enterprise data: consumes · Agent may retrieve external knowledge or CRM context
- Bedrock tools → Enterprise data: retrieves · Managed AI layer can surface enterprise knowledge to the agent
- API Gateway → Streamlit app: returns · Responses flow back to the UI after backend execution