Models can fall behind fast-moving software projects because their training reflects an earlier snapshot of the world. PostHog lets the Wizard select current Markdown documentation based on the project and integration, giving the agent up-to-date guidance. Campos says this helps prevent invented keys, patterns, and APIs.
LLM codegen fails and how to stop 'em
Speaker
Danilo Campos of PostHog explains how the PostHog Wizard uses AI coding agents to create reliable integrations during an AI Engineer talk.
PostHog maintains lightweight example projects, which Campos calls model airplanes, across frameworks and languages. They are not full production apps, but they preserve recognizable structures such as authentication flows. The Wizard includes these examples in a skill file so the agent can reference working integration patterns without processing an entire application.
To keep 15,000 monthly integrations from taking wildly different forms, the team uses a sequence of small prompts. It first asks the agent to find business-relevant code, such as login or payment flows, then identify useful events without writing code. Once those event ideas are recorded, the agent gets the relevant documentation and implements the integration.
People can give agents contradictory instructions, point them to missing tools, or provide guidance for the wrong language. PostHog asks the agent at the end of each run what would have helped it succeed, which revealed issues such as inaccessible tools and JavaScript instructions in Python projects. The team also blocked environment-file reads and provided a narrow tool to check for or write a key without sending the file contents for inference.
Campos argues that code can lose value as models improve, while clear prose can become more useful to newer models. He says the Wizard is mostly Markdown, supported by tools for delivering it and a smaller amount of agent harness code. His design principle is to give agents enough information and sequence it well, while keeping controls against harmful actions.
Takeaways
- Serve current, project-specific documentation so agents do not rely on stale training knowledge.
- Use small, representative example projects to show integration patterns across frameworks.
- Break complex coding tasks into stages, such as identifying events before implementing them.
- Ask agents to explain what blocked them, and use those reports to fix instructions and tools.
- Restrict sensitive file access and give agents narrow tools for specific operations.
Mentioned in this talk
Search inside this talk
What was claimed 9
- builtDanilo Campos built
Wizard
“I make the PostHog Wizard.”
YouTube Verified2 sources· Talk, Web· archived
- works atDanilo Campos works at
PostHog
“I work at PostHog”
YouTube Verified2 sources· Talk, Web· archived
- feature
Wizard: Provides a working PostHog integration users like
“they get a PostHog integration that works and that they actually like”
YouTube Unverified1 source· Talk
- metric
Wizard: 15,000 people every month run the wizard
“15,000 people every single month running this wizard”
YouTube Unverified1 source· Talk
- feature
Wizard: Sequences prompts to identify valuable project files and candidate events before implementation
“We start by barely telling the agent what we're doing.”
YouTube Unverified1 source· Talk
- feature
Wizard: Interrogates the agent at the end of each run to identify setup problems
“At the end of every run, right at the stop hook, we ask a simple question.”
YouTube Unverified1 source· Talk
- feature
Wizard: Restricts environment-file access and uses a tool that checks for keys and writes new values without sending file contents for inference
“Nothing from the environment file went up for inference”
YouTube Unverified1 source· Talk
- metric
Wizard: 90% Markdown files
“The wizard ... is 90% Markdown files”
YouTube Unverified1 source· Talk











