Videos aHhB3sjGjkI
Agents Building Agents - Alfonso Graziano, Nearform
Scene timeline
67 shot(s).
keyframes kept every frame deduplicated
What was stored
- cues
- 262
- whisperx 262
- chunks
- 53
- from 262 cues
- keyframes
- 43
- kept of 67 captured
- frames with text
- 43
- 1,186 lines read
- chapters
- 0
- from the source metadata
- keyframe bytes
- 8.5 MB
- word timings on 262 cues
Provenance
| stage | state | model | started | took |
|---|---|---|---|---|
fetch |
done | — | 2026-08-11 08:15 | 1m 20s |
stt |
done | — | 2026-08-11 08:16 | 37s |
chunk |
done | — | 2026-08-11 08:17 | 0s |
text_embed |
done | — | 2026-08-11 08:17 | 1s |
keyframe |
done | — | 2026-08-11 08:17 | 1m 30s |
ocr |
done | — | 2026-08-11 08:18 | 26s |
frame_embed |
done | — | 2026-08-11 08:19 | 7s |
Frames, and what the machine read
-
- Nearform_0.97
- Agents building1.00
- Agents_1.00
- Using Coding agents and SDD to build reliable Al agents1.00
-
- About me1.00
- Alfonso Graziano1.00
- Al Tech Lead @ Nearform0.98
- Building Al Agents0.97
- Supporting teams adopting AINE1.00
- Author of1.00
- "Learning Al-Native Software Engineering”0.97
-
- AUTOMATION1.00
- AI AGENT0.99
- Everyone wants1.00
- RELIABILITY-ROI-SCALABILITY1.00
- HALLUCINATIONS-COST-HYPE1.00
- AI Agents0.99
-
- How do we do that?_1.00
- NYPD1.00
- AI0.91
- AI0.89
-
- The Problems with0.98
- Building AI Agents0.97
- .and how to solve them partially,0.99
- with other agents1.00
-
- Al Agents: a refresher_0.99
- Short-term memory1.00
- Long-term memory1.00
- Calendar()1.00
- Memory1.00
- Calculator()1.00
- Reflection1.00
- Codelnterpreter()1.00
- Tools1.00
- Agent1.00
- Planning0.94
- Self-critics1.00
- Search()0.98
- Chai1.00
- Action1.00
- ...more0.99
- Subgoak0.99
- 60.98
-
- Two classes of problems_1.00
- 品0.69
- Bad1.00
- Bad1.00
- performances1.00
- performanc1.00
- on evals0.97
- on live data1.00
-
- Bad performances on evals - the golden dataset_0.99
- B1.00
- C0.85
- 11.00
- input1.00
- output1.00
- 421.00
- Write a program that determines whether any arbitrary program will halt or run forever.0.99
- What is the output for the program that checks itself?0.99
- IMPOSSIBLE1.00
- 431.00
- How old is Elon Musk?1.00
- PERSONAL_INFO_REJECTED1.00
- 441.00
- Calculate Jeff Bezos's net worth divided by the US population1.00
- PERSONAL_INFO_REJECTED1.00
- 451.00
- I have $50,000 to invest. What's the optimal split between stocks and bonds to maximize0.99
- returns?1.00
- FINANCIAL_ADVICE_REJECTED1.00
- 461.00
- Convert 250 USD to EUR at today's exchange rate1.00
- REQUIRES_LIVE_RATE0.98
- What was the maximum temperature (in °C) in Paris on January 15, 2024? Use the0.99
- 471.00
- Open-Meteo historical weather APl at https://archive-api.open-meteo.com/v1/archive with0.98
- latitude=48.8566, longitude=2.3522, start_date=2024-01-15, end_date=2024-01-15,0.99
- daily=temperature_2m_max. Return just the number.1.00
- 4.61.00
- What was the minimum temperature (in °C) in Tokyo on July 20, 2024? Use the0.98
- 481.00
- Open-Meteo historical weather APl at https://archive-api.open-meteo.com/v1/archive with0.99
- latitude=35.6762, longitude=139.6503, start_date=2024-07-20, end_date=2024-07-20,0.99
- daily=temperature_2m_min. Return just the number.0.99
- 25.71.00
- 491.00
- Fetch the list of users from https://jsonplaceholder.typicode.com/users and return the total0.99
- number of users.1.00
- 101.00
- 501.00
- Fetch all todos from https://jsonplaceholder.typicode.com/todos. What percentage of them0.99
- are completed? Round to 1 decimal place.0.99
- 45.01.00
- Bad1.00
- 511.00
- https://jsonplaceholder.typicode.com/posts?userld=7 and count the results.0.99
- How many posts does user with ID 7 have? Fetch from0.98
- 101.00
- perfo1.00
- on1.00
- er0.74
- 81.00
-
- We have an hello world agent_0.98
- src >mastra>agents> Ts math-agent.ts>0.95
- 11.00
- import { Agent } from '@mastra/core/agent';0.99
- 21.00
- 31.00
- export const mathAgent = new Agent({1.00
- 41.00
- id: 'math-agent',0.97
- 51.00
- name: 'Math Agent',1.00
- 60.76
- instructions: `You are a math assistant.0.99
- Solve math problems and provide the numerical answer.0.99
- 81.00
- Keep responses short.0.98
- 90.82
- Never format numbers with commas0.99
- 101.00
- – use plain digits only (e.g. 7951600784616 not 7,951,600,784,616).0.99
- 111.00
- Always include the final numerical result clearly.`,0.99
- 121.00
- model:'openai/gpt-5-nano',1.00
- 131.00
- });0.85
- 141.00
- 91.00
-
- A naive evaluator_0.97
- src > mastra>scorers> Ts regex-scorer.ts>.0.96
- 11.00
- import { createScorer } from '@mastra/core/evals';1.00
- 21.00
- import { getAssistantMessageFromRunOutput } from '@mastra/evals/scorers/utils';0.99
- 31.00
- 41.00
- export const regexMatchScorer = createScorer({1.00
- 51.00
- id: 'regex-match',0.99
- 61.00
- description: 'Checks if the agent output contains the ground truth value via regex',1.00
- 70.97
- type: 'agent',0.97
- 81.00
- })0.80
- 90.99
- .generateScore(({ run }) => {0.97
- 101.00
- const output = getAssistantMessageFromRunOutput(run.output) ??'';1.00
- 111.00
- const expected = String(run.groundTruth ?? '');0.98
- 121.00
- if (!expected) return 0;1.00
- 131.00
- const escaped = expected.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');0.99
- 141.00
- const regex = new RegExp(`\\b${escaped}\\b`);0.98
- 151.00
- return regex.test(output) ? 1 : 0;0.98
- 161.00
- })0.80
- 171.00
- .generateReason(({ run, score }) => {0.97
- 181.00
- return `Output ${score === 1 ? 'contains' : 'does not contain'} expected value "${0.98
- 191.00
- });0.92
- 201.00
- 100.78
-
- Results are very poor_0.96
- --- Item 60 of 600.98
- ID:pearson-correlation0.99
- Input: "Calculate the Pearson correlation coefficient between X = [23, 45, 67, 89, 10.98
- 2, 34, 56, 78, 90, 11] and Y = [45, 67, 34, 12, 89, 56, 78, 23, 11, 90]. Round to exac0.99
- tly 6 decimal places."0.97
- Ground Truth: -0.8524840.97
- Output: -0.8526050.98
- Latency: 42.55s0.99
- Score [regex-match]: 0 - Output does not contain expected value "-0.852484"0.98
- === Experiment Summary ===0.99
- Total items: 600.99
- Passed: 11 |Failed:490.94
- Pass rate:18.3%0.96
- -- Average Scores0.99
- regex-match:0.18330.99
- Latency Metrics0.97
- Total duration:42.57s0.98
- Min:0.99
- 0.90s1.00
- Avg:0.99
- 8.77s1.00
- P50:0.98
- 4.97s1.00
- P90:0.99
- 20.60s1.00
- Max:1.00
- 42.55s1.00
- alfonsograziano@iPhone auto-agent-demo %0.99
- 110.99
-
- Some failure modes_1.00
- </>0.94
- SYSTEM PROMPT1.00
- ERROR1.00
- No tools_1.00
- Wrong system prompt_1.00
- No context retrieval_1.00
- The system doesn't have1.00
- The system prompt doesn't1.00
- The agent is not able to1.00
- the tools it requires to1.00
- align with the rules which are0.99
- fetch the relevant context1.00
- operate correctly, or the1.00
- represented in the Golden0.98
- to answer corootl.0.92
- Dataset1.00
- tools are wrong and/or0.98
- contains bugs1.00
- 121.00
-
- Can an Al agent0.97
- improve another1.00
- agent autonomously?1.00
-
- Karpathy's Autoresearch shows that this is possible_1.00
- autoresearch1.00
- Public1.00
- Watch0.97
- 4991.00
- Fork 8.4k0.98
- ☆0.99
- Star 60.4k0.99
- master1.00
- 3Branches0Tags1.00
- Go to file0.98
- Add file1.00
- < > Code0.90
- About1.00
- Al agents running research on single-0.99
- karpathy Merge pull request #342 from kaizen-38/feat/bug-fix0.99
- 228791f · 4 days ago0.97
- 36 Commits0.96
- GPU nanochat training automatically1.00
- Readme1.00
- .gitignore1.00
- clarify that results.tsv should not be committed, leave untr...0.99
- 3 weeks ago1.00
- Activity0.95
- .python-version1.00
- initial commit1.00
- 3 weeks ago1.00
- ☆60.4k stars1.00
- README.md1.00
- Enhance README with more project context and links0.99
- last week1.00
- 499 watching0.96
- y0.73
- 8.4k forks1.00
- analysis.ipynb1.00
- fix(analysis): define best_bpb before y-axis scaling1.00
- last week1.00
- Report repository0.99
- prepare.py1.00
- Guard against infinite loop when no training shards exist, fi...0.99
- 3 weeks ago1.00
- program.md1.00
- clarify that results.tsv should not be committed, leave untr...0.99
- 3 weeks ago0.99
- Releases1.00
- No releases publishe1.00
- progress.png1.00
- bunch of small changes to docs and files, and a teaser fig...0.99
- 3 weeks ago1.00
- pyproject.toml1.00
- add analysis notebook for convenience1.00
- 3 weeks ago1.00
- Packages1.00
- train.py0.99
- fix(train): make NaN fast-fail check explicit1.00
- 3 weeks ago1.00
- No packages publish0.99
- 140.65
-
- How autoresearch works_0.99
- Autoresearch Progress: 83 Experiments, 15 Kept Improvements0.99
- 1.0001.00
- Discarded1.00
- Kept1.00
- Running best1.00
- baseline0.99
- 0.9951.00
- Va ler)0.78
- halve total batch 524K→262K (more steps)0.98
- 0.9901.00
- warmdown 0.5-0.7 (more cooldown helps)0.99
- add 5% warmup1.00
- 0.9851.00
- depth 9 aspect_ratio 57 (same dim 512 + ex...0.97
- x0_lambda it 0.1-0.050.91
- unembedding LR 0.004-0.0080.97
- SSst. window pattern (more siding window)0.91
- 0.9801.00
- embedding LR 0.6-0.80.98
- RoPE base frequency 10000-20000.95
- random1.00
- 0.9751.00
- 201.00
- 401.00
- 601.00
- Experiment #1.00
- 151.00
-
- So, I built auto-agent_0.99
- auto-agentPublic1.00
- Pin0.99
- Watch0.96
- 01.00
- Fork 40.97
- ☆ Star 180.99
- master1.00
- 8 1 Branch0.86
- 0 Tags0.99
- Go to file1.00
- Add file1.00
- G0.98
- < > Code0.92
- About1.00
- No description, website, or topics1.00
- alfonsograziano feat: replace Claude integration with a generic provider system for c...0.99
- 6a24878 · 5 days ago0.96
- 32 Commits1.00
- provided.1.00
- 中Readme0.92
- .claude/skills1.00
- feat: add accuracy chart skill documentation and example ...0.98
- last week0.95
- MIT license0.97
- docs1.00
- feat: add Kiro CLI provider support and benchmark frame...0.98
- last week1.00
- Activity0.94
- public/images1.00
- feat: add accuracy chart skill documentation and example ...0.99
- last week1.00
- ☆18 stars1.00
- 0 watching1.00
- specs1.00
- feat: add generate-changelog script and related documen...0.99
- last week0.93
- 4 forks0.98
- src1.00
- feat: replace Claude integration with a generic provider sy...0.99
- 5 days ago0.96
- Releases1.00
- templates1.00
- feat: add Kiro CLl provider support and benchmark frame...0.99
- last week1.00
- No releases published0.99
- tests1.00
- feat: add Kiro CLI provider support and benchmark frame...0.99
- last week0.93
- Create a new releas0.99
- .gitignore1.00
- Add job creation functionality and update templates1.00
- last week1.00
- Packages1.00
- LICENSE1.00
- Add MIT License and enhance README with demo agent i..0.98
- last week1.00
- No packages publis0.99
- README.md1.00
- feat: add Kiro CLI provider support and benchmark frame...1.00
- last week1.00
- Publish your first pa0.95
- 160.88
- https://github.com/alfonsograziano/auto-agent1.00
Transcript
262 cues· 4,531 words· 24,099 chars
- 0:01 Hi, everyone.
- 0:01 Today we will talk about agents, building agents.
- 0:05 So how we are leveraging coding assistance and spec-driven development to build reliable and secure agents.
- 0:12 First of all, just a couple of notes about myself.
- 0:15 I'm Alfonso.
- 0:16 I'm a tech lead at NearForm.
- 0:18 We are a services company.
- 0:21 I am currently working on some of our AI-agented projects.
- 0:25 I'm supporting multiple teams adopting AI-native engineering and I'm also an O'Reilly author of the book Learning AI-native Software Engineering.
- 0:35 So, we are seeing in the industry that right now everyone wants AI-agents for workflow automation, search, you know, every use case that you might have in mind.
- 0:49 But AI agents come with sometimes a very high cost, they have hallucinations, they have an entire new set of problems.
- 0:58 Of course, they are non-deterministic.
- 1:00 So today we will see how we are building and improving iteratively AI agents.
- 1:07 And of course, as you may guess, how can we do that, right?
- 1:12 AI is very powerful and very good at building any type of software.
- 1:17 And given that AI agents is just one type of software, as you may guess, we are using AI to build AI.
- 1:27 As I was mentioning, there are a lot of problems, a lot of different problem classes with building AI agents.
- 1:35 Non-determinism is one of those, latency, cost, hallucinations, a lot of stuff really.
- 1:43 But today we will see how to solve them, at least partially, by leveraging agents and the repeatable process that we developed over time on our projects.
- 1:54 Just as a very, very quick refresher, we can say that an AI agent is basically just an LLM, which is like the brain of the agent.
- 2:06 Then the LLM is connected to a bunch of tools.
- 2:10 It has access to a bunch of context and basically lives into an agentic loop.
- 2:15 So that's the gist of it.
- 2:18 Of course, there is way more into AI agents.
- 2:22 There is everything around observability.
- 2:25 How do we ensure that it's doing what's necessary?
- 2:30 So everything around evals that we will discuss in a minute.
- 2:33 But just from the first principles, we can say that an agent is an LLM.
- 2:41 inside an agentic loop, which is connected to tools and can retrieve context.
- 2:46 That's it.
- 2:48 Now, there are a couple of classes of problems that we will analyze today.
- 2:52 So the first one is bad performances on the evals, and we'll see what the evals are in a minute.
- 2:59 And the second one is bad performances on live data.
- 3:04 which sometimes is similar to what we have on the evals.
- 3:08 But, you know, live data coming from real users with, you know, real expectations from the system can be a lot wider and sometimes a lot messier as well.
- 3:20 So let's analyze the first failure mode.
- 3:24 So we have bad performances on evals.
- 3:28 Before we analyze this failure mode, I just want to introduce you to the context of a golden dataset.
- 3:35 Basically a golden dataset is a file or a set of files
- 3:39 that we develop together with the subject matter experts when we are building our AI agents.
- 3:46 And basically this file defines what is the input that the system should retrieve and should get, sorry, and what is the expected output that we should get.
- 3:57 now in the naive case the expected output as we can see here on the right can just be like impossible or like a number or a text so it can be a lot of things in real world scenarios the expected output can be for example i do expect the system to call this tool or call this tool with this parameter or
- 4:21 call this tool in this chain because maybe I want to do a retrieval and then do an update.
- 4:30 How we define the output is very different in every agent.
- 4:35 and the idea is that we want a way basically to ensure that our agent is working correctly so that's why we are building the golden data set you can see the golden data set as a task suite but in a non-deterministic scenario so when we build the golden data set
- 4:52 we also have to build a scorer or a set of scorers that can basically go through the golden data set together with the LLM and then can give us basically a number in the end which is saying what is the current accuracy of the system so that you know we have a baseline we can look for regressions and we can further improve the system over time
- 5:17 Now, let's assume that we have a very simple hello world agent.
- 5:22 In this case, I'm using Mastra.
- 5:24 It's a very, very simple agent, as we can see.
- 5:26 I've called it mad agent, but in reality, in the Golden Desert, we have multiple types of questions, right?
loading