Inspiration

We wanted to build something that made environmental activism feel less like reading through endless corporate reports and more like having a knowledgeable friend who could help you figure out what to actually do.

The idea started with a simple question: What if you could just text the Lorax?

Instead of automatically contacting companies or taking action on a user's behalf, we wanted the Lorax to be a research assistant that puts the human in control. You can text it like a normal iMessage conversation, ask about a company, and have it research the company's environmental claims and prepare a practical, sourced action kit.

And because nobody wants to receive a corporate sustainability lecture from a robot, we gave it a grumpy forest-guardian personality.

What it does

Lorax Hotline is an iMessage-based environmental research agent.

You can text the Lorax naturally, and it responds in character. When you ask it to investigate a company, it can:

Research the company using web search. Collect relevant claims and their source URLs. Save those claims into a persistent company dossier. Generate an actionable "action kit" based on the research. Prepare draft messages that a human can review and send themselves.

The system deliberately does not contact companies automatically. The Lorax researches and prepares; the human decides what to do.

We also built a separate, tightly constrained prank/nudge system for friends. It includes an explicit allowlist, mute/STOP handling, quiet hours, send limits, dry-run defaults, and message validation so generated text can't bypass the safety rules.

How we built it

The project is written in TypeScript and runs on Bun.

At the center is an agent loop that connects an OpenAI-compatible chat API through OpenRouter with custom tools. The agent can decide when it needs to search for information or save information into a company dossier.

The main pieces are:

Bun + TypeScript: runtime and application logic. Spectrum iMessage provider: receiving and sending iMessages. OpenRouter: LLM access and tool calling. DuckDuckGo Instant Answer: web research. Local JSON dossiers: persistent, sourced company research. SQLite: operational state such as users, mutes, allowlists, nudges, and send logs. Custom guardrail layer: validates every outbound send before it can reach the messaging transport.

We also wrote 45 automated tests around the send-guardrail decision function, including tests proving that the messaging transport is never called when a send is blocked.

The entire system defaults to dry-run mode so that developing and testing the agent doesn't accidentally send real messages.

Challenges we ran into

One of the biggest challenges was that an LLM can generate convincing information even when that information isn't actually supported by a source. We therefore made source validation part of the dossier workflow rather than simply trusting whatever the model generated.

Another challenge was giving an AI access to a real messaging system without giving it too much autonomy. A generated message is still capable of causing real-world consequences, so we built several layers between the model and the transport.

Every send has to pass checks for things like:

Whether the recipient is allowlisted. Whether they have been muted. Whether the send is occurring during allowed hours. Whether the recipient has already received the maximum number of messages. Whether the generated text follows our opener/follow-up rules. Whether the system is running in dry-run mode.

We also had to balance the ambition of the action-kit feature with what we could realistically verify during the hackathon. The research and drafting pipeline is implemented, but full end-to-end search coverage and action-kit behavior still need additional verification.

Accomplishments that we're proud of

We got inbound and outbound iMessage communication working and manually verified the transport. We implemented a functioning LLM tool-use loop rather than simply sending prompts and receiving text. We built persistent, sourced company dossiers.

What we learned

We learned that building an agent is much more than getting an LLM to call a tool.

The difficult part is everything around the model: state, validation, permissions, failure modes, and deciding what the model should never be allowed to do.

We also learned that human-in-the-loop systems can be surprisingly powerful. The AI doesn't need to send an email, contact a company, or make a decision for the user to be useful. Sometimes the better role for an agent is to do the tedious research and preparation while leaving the consequential decision to a human.

Finally, we learned that making an AI agent feel natural requires more than a good prompt. The combination of iMessage, persistent context, tools, and a consistent persona makes the Lorax feel much more like something you can actually interact with rather than a traditional chatbot.

What's next for The Lor-hax

The next step is to make the Lorax's research capabilities substantially more robust.

We want to:

Improve source verification and citation quality. Add more useful environmental actions beyond contacting companies. Improve the agent's ability to distinguish marketing claims from independently supported facts. Continue strengthening the safety layer around any action that could affect the real world.

Eventually, we'd love for the Lorax to become a genuinely useful personal environmental research companion, one you can text whenever you want to understand what a company is doing, separate real claims from greenwashing, and figure out what you can actually do about it.

The trees have been waiting.

Built With

Share this project:

Updates

Submission history