Skip to content

Add C++ agentic examples using agt and Mistral#260

Open
0x9dhcf wants to merge 2 commits intomistralai:mainfrom
0x9dhcf:cpp-agt-examples
Open

Add C++ agentic examples using agt and Mistral#260
0x9dhcf wants to merge 2 commits intomistralai:mainfrom
0x9dhcf:cpp-agt-examples

Conversation

@0x9dhcf
Copy link
Copy Markdown

@0x9dhcf 0x9dhcf commented Apr 3, 2026

Cookbook Pull Request

Description

Adds four progressive examples showing how to use Mistral models from C++ using agt, a minimal provider-agnostic C++ library for building LLM-powered agents.

The examples cover:

  • Direct completion with thinking effort control
  • Agent with tool calling and persistent SQLite session
  • Streaming with full lifecycle hooks and parallel tool calls
  • MCP server integration

agt is an independent open-source library, not a production framework. It grew out of chatty, a personal terminal assistant. These examples are shared as a starting point for developers working in C++ codebases who want to use Mistral models.

Dependencies:

  • C++23 compiler,
  • CMake 3.21+,
  • libcurl,
  • SQLite3,
  • Node.js (example 4 only).

All C++ dependencies are fetched automatically via CPM.

Type of Change

  • New Cookbook
    • Markdown File

Cookbook Checklist

  • My code is easy to read and well structured.
  • I've tagged the versions of any dependency required.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings or errors.

README.md Checklist

  • README file updated.

Additional Context

All four examples have been tested and produce the expected output shown in the README. The streaming example confirms that Mistral supports parallel tool calls, the model requested all four tools in a single turn before composing its final answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant