Home / Companies / PostHog / Blog / Post Details
Content Deep Dive

How we caught our AI agent embezzling tokens

Blog post from PostHog

Post Details
Company
Date Published
Author
Vincent Ge
Word Count
2,495
Company Posts That Month
21
Language
-
Hacker News Points
-
Post removed?
No
Summary

The PostHog Wizard is an AI agent designed to streamline the integration of PostHog into codebases by understanding business logic, capturing high-quality data, and configuring PostHog products efficiently. Despite its ability to onboard organizations quickly—saving engineering hours and adding stakeholder value—there are concerns about the high costs associated with its operation, particularly during the "edit" and "conclude" steps of its process. The Wizard's reliance on carrying excessive context through its tasks leads to inefficient token usage, with costs exacerbated by its interactions with the Anthropic Agent SDK, which requires reconstructing context caches during queries. Attempts to optimize by breaking tasks into separate queries or using subagents have not consistently reduced costs, with issues like cache write expenses and unreliable subagent termination causing further inefficiencies. Ultimately, the analysis suggests the need for improvements in context management, reducing unnecessary operations, and leveraging deterministic flows to enhance efficiency, while also considering the rapid advancements in AI models that could address these challenges in the future.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
MCP 8 4,186 446 170 +13%
AI Agents 6 4,369 971 249 +0%
LLM 1 5,987 964 233 +29%
Observability 1 4,076 672 175 +24%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.