How to Cut API Costs Without Compromising Agent Reliability

Aug 19, 3:00 – 5:00 PM (UTC)

AT AI/ML Community

Join us for another insightful and hands-on meetup where we tackle one of the least glamorous but most painful realities...

51 RSVPs

Airtime APIBest PracticesMeetupSMS APIUSSD APIVirtualVoice API

Log in to RSVP

About this event

Join us for another insightful and hands-on meetup where we tackle one of the least glamorous but most painful realities of running AI agents in production: the bill. Every token counts — context, tool definitions, retries, and failure recovery all add up fast, and the tempting fix (just trim the prompt) is exactly the one that quietly breaks your agent. In this session, we'll explore the practices and architectural patterns that cut API cost without sacrificing reliability, drawing on real experience building Melduo, a GitHub-to-AWS agentic deployment platform.

Whether you're a beginner wondering why your agent's API costs keep climbing, or an experienced ML engineer looking to squeeze waste out of your agentic stack, this session is for you. Each practice comes with a live demo: what it costs before, what changes, and what it costs after.

Agenda

Here's our agenda for the day:

1. Welcome and Introduction (15 minutes)

Meet the community and organizers.

Overview of today's theme: "How to Cut API Costs Without Compromising Agent Reliability."

The cost/reliability tension: why naive prompt-trimming backfires, and how the wrong cut makes agents forget instructions, mishandle tools, or loop on the same failure.

2. Prompt Caching & Lean Tool Definitions (35 minutes)

Prompt Caching: How caching works across providers (Anthropic, OpenAI, Gemini) and how to structure prompts for stable cache prefixes. Live demo: cost before/after enabling caching.

Tool Definitions & Descriptions: The hidden cost of verbose tool schemas and the trade-off between terse definitions and tool misuse. Live demo: token cost of a bloated vs. lean tool schema.

3. Building for Failure & Model Routing (40 minutes)

The Harness for Failure: Why raw failure logs blow up context, how to compress failure signal instead of dumping noise, and how to keep agents from forgetting constraints mid-retry. Live demo: Melduo's failure-recovery loop, cost and reliability before/after.

Model Routing: Routing by task complexity instead of defaulting to the biggest model — where routing pairs with caching, and where it adds risk. Live demo: routed vs. single-model run, cost comparison.

Putting it together: A provider-agnostic checklist to take home for reducing token spend across your whole agent stack.

4. Q&A and Community Showcase (10 minutes)

Ask questions, share your work, and get feedback from the community.


Join us for another insightful and hands-on meetup where we take the mystery out of securing AI agent systems! In this session, we’ll explore the tools, practices, and architectural patterns that keep agentic AI infrastructure safe, resilient, and production-ready whether you’re building autonomous agents, multi-agent pipelines, or AI-powered APIs.

Whether you’re a beginner curious about what “agent security” even means, or an experienced ML engineer looking to harden your agentic workflows, this session is for you.

Gigs

We would love to reach out to you so that you can build for our customers, please fill out this form with details to ensure we have your details:

GIG/HACK DEVELOPER PORTFOLIO FORM

Join community channels

Africa's Talking AI/ML Community:

Slack

Join Africa's Talking slack community here

Please follow our Twitter handles to:

You can get our videos, recaps, and event interviews on our youtube channels, subscribe to get updates:

Africa's Talking community allows developers to learn skills for the modern-day African Developer. We are language and framework agnostic. All developers are welcome. This is where Africa's Talking developers community meets to build, learn and exchange knowledge.

We are helping software developers and businesses to bring their ideas to life through easy-to-use APIs easily.

Would you like to partner with us? Kindly contact the Developer Experience Team.

Speaker

  • Brian Mwangi

    Melduo.com

    Co-Lead Africastalking

Mentors

  • Mainye Ben

    Africa's Talking LTD

    Data Scientist & Maker

  • Sylvia Jebet Kipkemoi

    Africa's Talking

    Developer Relations

When

When

Wednesday, August 19, 2026
3:00 PM – 5:00 PM (UTC)

Agenda

Welcome and Introduction
Dive Deep: How to Cut API Costs Without Compromising Agent Reliability
Wrapping Up and Open Forum

Hosts

  • Josphat Mwangi

    Africa's Talking

    Community Lead Nairobi

  • Brian Mwangi

    Melduo.com

    Co-Lead Africastalking

Organizers

  • Mainye B

    Africa's Talking

    Data Scientist

  • Sylvia Jebet Kipkemoi

    Dev Rel Associate, AT Women in Tech Co-Lead

  • Josphat Mwangi

    Co-Lead AT AI/ML Community

Global sponsor

Africa's Talking logo

Africa's Talking

CONTACT US