Building a CrewAI Financial-Analysis Team on Lightning AI

Matthew Berman demonstrates a 2024 two-agent workflow, first using Groq and then connecting a cloud-hosted Ollama model.

MBMatthew Berman연사 · Forward Future
채널
Matthew Berman
게시일
2024년 4월 15일
영상
19:46
읽기
5분
슬라이드
5
원문
영어
YouTube에서 열기
스크롤하면 영상이 오른쪽 아래로 작아져 계속 재생됩니다. 자막은 읽기 언어를 따릅니다.
읽기 언어2개 언어로 읽을 수 있음
이 글은 아직 한국어 번역이 없어 영어 원문으로 표시합니다.
요약

30초 요약

In this Lightning AI-sponsored tutorial, Matthew Berman structures a CrewAI project with YAML agent and task definitions, runs a Tesla analysis with Groq and begins switching to Mixtral served through Ollama in a Lightning Studio. He discloses an investment in CrewAI in the description. The code, tools and prices are historical. The video does not clearly attach its copied search tool or complete the second run, and its generated financial figures require independent verification.

  1. 1Modular structureYAML files define agents and tasks, while Python assembles the crew.
  2. 2Two agentsA researcher and analyst handle sequential tasks, with delegation disabled in the example.
  3. 3Data-source caveatThe video copies an SEC tool, but does not clearly show it attached to the agent.
  4. 4Hosted runThe output is a demonstration and its financial figures are not validated by the video.
  5. 5Remote model endpointOllama runs in a cloud Studio; authentication matters when the endpoint is exposed.

핵심 정리

  1. The example separates agent and task configuration from the crew orchestration and main entry point.
  2. A task instruction mentioning search is not evidence that an actual data tool was connected or used.
  3. The hosted run outputs financial figures that must be independently checked rather than assumed current or accurate.
  4. The Ollama model runs on a remote Lightning GPU, not on the viewer’s own device.
  5. The second run begins but is stopped before a complete end-to-end result is shown.
  6. Lightning AI sponsored the video; Berman discloses that he is a CrewAI investor.
전문

챕터별로 다듬은 전문 읽기

원본 자막만 보기
01

Project structure and tasks

Berman introduces the sponsored tutorial, creates a cloud Studio and defines research and analysis tasks. The instructions reflect 2024 versions.

In this April 2024 tutorial I build a financial-analysis crew using CrewAI and Lightning AI, then swap its hosted Groq model for an Ollama model running on a Lightning cloud GPU. Lightning AI sponsored the video, and I disclose in the description that I am an investor in CrewAI. The workflow is historical; interfaces, packages and service terms may have changed.

I create a new Lightning Studio and a code environment. It provides a browser-based editor and managed cloud compute, though dependencies still need installation and the environment is not inherently a fresh local machine. Credits, pricing and GPU availability depend on the service’s current terms.

The project is modular: a `src/financial_analyst_crew` package contains configuration, tools and a crew definition, while a short `main.py` supplies inputs and starts the run. I describe this as a structure recommended to me by CrewAI’s founder; it is an approach from 2024 rather than a guarantee of compatibility with future versions.

Inside `config`, I create `agents.yaml` and `tasks.yaml`. I expect the structure might eventually support automatically exposed crew endpoints, but that is my future-facing expectation at the time, not proof that the video itself creates such an API.

The first task researches a company, with a description and expected output. I use a `{company_name}` placeholder so the same task can accept different inputs and ask for enough financial information to analyze stock performance.

Research task configuration
슬라이드 1 / 5Research task configurationThe YAML file defines a task description and expected output.

I add an analysis task and use Claude to brainstorm metrics, such as profitability, liquidity and solvency ratios. The expected output is a readable financial report. This is a simple demonstration, not a complete investment-research system.

02

Agents and crew orchestration

He defines two agents, assembles sequential tasks and configures a hosted Groq model. The main entry point supplies a company name.

In `agents.yaml`, I define a financial researcher with a role, goal and backstory. I mention search tools explicitly, disable delegation and enable verbose output. A prompt mentioning a tool does not itself give an agent access to it; the tool must actually be configured and attached.

Financial researcher agent
슬라이드 2 / 5Financial researcher agentThe configuration shows the role, goal and delegation setting.

I create a second agent, the financial analyst, with the goal of turning company information into a clear report. I usually map one agent to each task in this example, though other architectures are possible. I note that the cloud editor saves files automatically in the demonstrated setup.

In `crew.py`, I import CrewAI’s `Agent`, `Crew`, `Process` and `Task`, project decorators, and `ChatGroq` from `langchain_groq`. I create a decorated crew class, point it at the YAML files and configure Mixtral on Groq. Exact imports and parameters reflect the versions in the recording.

The decorated researcher and analyst methods return agents configured from YAML and use the Groq language model. I note that separate agents can use different model providers when their integrations support it; the example initially uses one hosted model.

Crew class and model client
슬라이드 3 / 5Crew class and model clientThe code loads YAML configuration and initializes the Groq client.

I define each task with its configuration and assigned agent, then define the crew with the collected agents and tasks. A sequential process runs the research task before analysis so the latter can use earlier output.

Task-to-agent assignment
슬라이드 4 / 5Task-to-agent assignmentThe crew definition connects each task with its assigned agent.

In `main.py`, I load environment variables, import the crew and call `kickoff` with Tesla as the `company_name` input. CrewAI interpolates that input into the task descriptions. I place a Groq API key in an environment file and say I will revoke the example key before publishing; readers should keep their own credentials out of shared files and screenshots.

03

Tools, dependencies and the first run

He copies an SEC tool and installs the project with Poetry. The resulting financial output is not independently verified.

I copy an SEC tools example into a `tools` folder. The walkthrough does not clearly show that the tool is imported and attached to the researcher: a copied file and a prompt alone do not prove live data was retrieved. Verify the actual tool wiring and its sources before relying on generated figures.

I install Poetry, create `pyproject.toml`, lock dependencies and install them. After correcting the project name and addressing a missing `langchain-groq` module, I run the crew. These commands and dependency behavior are version-specific; use a consistent project environment and consult current documentation.

The hosted run produces a Tesla research answer, ratios and a financial report. I praise its speed, but the displayed figures and dates are not independently verified and include stale or questionable values; a fluent answer does not establish that the agent retrieved current information or performed correct calculations. Verify figures against primary filings and market data.

04

Ollama on a cloud GPU

Berman exposes an Ollama endpoint and switches the model client. He stops the second run before a complete result is shown.

To change model serving, I open a Lightning Studio template for Mixtral through Ollama. The Studio runs on cloud hardware; “local” here refers to inference within that remote environment, not inference on the viewer’s own computer. Larger GPUs can incur charges, and a model’s resource needs depend on configuration.

I install Lightning’s API Builder, expose the Ollama service on port 11434 and copy the endpoint. The video disables authentication for its demonstration, but an internet-accessible endpoint should be protected even during testing: [Lightning’s documentation](https://code.lightning.ai/docs/platform/build/ai-studio/deploy-on-public-ports/) describes authentication options. Do not expose credentials or leave the endpoint open.

Back in the crew code, I create an Ollama language-model client using Mixtral and the remote base URL, then replace the hosted Groq client assigned to the agents. The exact LangChain import and API compatibility depend on package versions; the demonstration itself shows a deprecation warning.

Starting the Ollama-backed run
슬라이드 5 / 5Starting the Ollama-backed runThe terminal shows the second run beginning; the full analysis is not shown completing.

I start another run and observe GPU activity in the Ollama Studio. I stop before completing the full inference, so the footage supports that a request reached the model and began work, not that the entire financial-analysis workflow completed accurately with the replacement model.

The tutorial closes with the modular crew structure, a cloud-hosted open-weight model and an exposed model endpoint. Review generated financial information, tool access, endpoint security and current dependencies before adapting the example.

같은 채널의 다른 글

슬라이드 5장14:45EN
Matthew Berman· 2026년 10월 29일Matthew Berman Examines Google’s Gemini 4 Carbon AnnouncementMatthew Berman · Forward FutureMatthew Berman reviews Google’s reported benchmark results, staged rollout and pricing for Gemini 4 Carbon, while noting he has not yet used the model.Foundation ModelsBenchmarksAI cost & performance+2
슬라이드 7장21:11EN
Matthew Berman· 2026년 10월 28일Matthew Berman tests DeepSeek V4.1 Flash: coding, vision and local appsMatthew Berman · Forward FutureA hands-on tour of visual coding, image reasoning, local applications and provider economics reveals both impressive results and visible flaws.코딩 에이전트Multimodal AILocal inference+2
슬라이드 12장34:21EN
Matthew Berman· 2026년 10월 27일Matthew Berman Examines Anthropic’s IPO Filing, AI Growth and GovernanceMatthew Berman, Sam Altman · Forward FutureThe presenter reviews the S-1’s financial metrics, compute strategy and voting structure while questioning the tension between rapid AI development and safety.AnthropicAI Safety엔터프라이즈 AI+2
0:26EN
Matthew Berman· 2026년 10월 25일Sam Altman on Human Values and Problem-Solving in an AI WorldSam Altman · OpenAIIn a short interview excerpt, Altman considers the enjoyment of solving hard problems and the human role in interpreting results.Human-AI CollaborationFuture of WorkAI Strategy
슬라이드 2장0:36EN
Matthew Berman· 2026년 10월 25일Kimi K3.1 and a Rubik’s Cube Solver DemonstrationMatthew Berman · Forward FutureMatthew Berman shows a scrambled virtual cube being solved and gives the Kimi K3.1 test a favorable assessment.평가(Evals)코딩 에이전트Open-weight models
슬라이드 2장0:21EN
Matthew Berman· 2026년 10월 24일An AI-Generated Kimi Benchmark Chart Used Invented ScoresMatthew Berman · Forward FutureMatthew Berman asks for a graph of Kimi K3.1 Pro benchmarks, then discovers that the displayed figures are illustrative placeholders.Benchmarks평가(Evals)Generative media