Capstone Project: The Autonomous Market Analyst
The Final Challenge. Build a production-ready, agentic RAG system that analyzes companies and returns structured research reports via a REST API.
Capstone Project: The Sovereign Analyst
Welcome to the final challenge. Over the last 15 modules, you have built the components of a digital brain. Now, you will assemble them into a single, cohesive Market Analyst Agent.
This agent will not just "Chat"; it will investigate companies, read their documents, search for current events, and provide a professional, structured investment summary.
1. Project Requirements
Your system MUST include the following components:
A. Document Ingestion (Module 5 & 6)
- The ability to load a PDF (e.g., an annual report) or a URL.
- Split the documents into optimized chunks.
- Store them in a persistent Chroma or FAISS database.
B. Agentic Reasoning (Module 9 & 10)
- The agent must have access to at least two tools:
- Retriever Tool: To find facts in its local database.
- Web Search Tool: (Tavily or DuckDuckGo) to find current metrics.
- The agent must use the ReAct loop to combine these sources.
C. Conversation State (Module 8)
- The agent must remember the user's previous questions using Persistent Memory.
D. Structured Output (Module 11)
- The final report must be a JSON object with the following fields:
company_name: stringsummary: string (1 paragraph)sentiment: enum (Bullish / Bearish / Neutral)sources: list of strings
E. Production Wrapper (Module 14 & 15)
- Serve the agent via a FastAPI endpoint.
- Include Caching for search results.
- Provide a Dockerhfie for deployment.
2. The Architectural Blueprint
graph TD
User[User Question] --> API[FastAPI Server]
API --> Agent[Agent Executor]
Agent --> Memory[(Memory Store)]
Agent -->|Logic| Brain[LLM Reasoner]
Brain -->|Tool Choice| T1[Vector DB Search]
Brain -->|Tool Choice| T2[Web Search]
T1 --> Data[Context]
T2 --> Data
Data --> Brain
Brain -->|Output| Parser[Pydantic Parser]
Parser --> Result[JSON Report]
Result --> API
API --> User
3. Implementation Steps
- Step 1: Setup: Create your project structure, virtual environment, and
.envfile. - Step 2: Data: Ingest a sample business PDF into your vector store.
- Step 3: Tools: Wrap your retriever and search engine as LangChain tools.
- Step 4: Brain: Build the agent using
create_openai_functions_agent(or equivalent). - Step 5: Surface: Create the FastAPI route and the
with_structured_outputschema. - Step 6: Test: Ask the agent: "Read the provided report for Vortex Inc., check their current stock price online, and give me a summary."
4. Deliverables
To complete the course, you should have:
- A GitHub repository containing the source code.
- A
README.mdwith setup instructions. - A sample output JSON report generated by your agent.
Final Congratulations
By completing this Capstone, you have proven that you can architect and deploy a complex, safe, and useful AI system. You are no longer just a "Prompt Engineer"—you are an Agentic AI Developer.
What's Next?
If you want to continue your journey into Multi-Agent systems, high-reliability state machines, and Human-in-the-loop governance, join our Course 3: Agentic AI Development (Advanced).
The future is automated, and you have just built the engine. 🚀