---
title: "Kronk AI: Building a Basic AI Chat Agent with Message History Pt. 2"
url: https://daily.dev/posts/kronk-ai-building-a-basic-ai-chat-agent-with-message-history-pt-2-u3giiyj5h
source_url: https://www.youtube.com/watch?v=tCcvES2UqZw
type: video:youtube
source: "Ardan Labs (YouTube)"
published: 2026-05-31T07:46:41.149Z
updated: 2026-05-31T07:57:54.132Z
tags: ["llm", "golang", "ai-agents"]
reading_time: 7
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Kronk AI: Building a Basic AI Chat Agent with Message History Pt. 2

**[Ardan Labs \(YouTube\)](https://daily.dev/sources/ardanlabs-youtube)** · 7 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of implementing tool calling mechanics in an AI chat agent with message history. The tutorial demonstrates how to define a tool (a weather function), pass it to a language model, handle the model's tool call response, append the tool call and its result back into the conversation history with the correct roles and IDs, and feed everything back to the model to get a final answer. Key insights include the importance of tool ID mapping, using structured JSON for tool responses, keeping tool parameter lists simple for lower-level models, and the difference between chat completions (client manages history) and a responses API approach.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=tCcvES2UqZw>

---

Tags: [#llm](https://daily.dev/tags/llm), [#golang](https://daily.dev/tags/golang), [#ai-agents](https://daily.dev/tags/ai-agents)

[View this post on daily.dev](https://daily.dev/posts/kronk-ai-building-a-basic-ai-chat-agent-with-message-history-pt-2-u3giiyj5h)
