Messages API with Tool Use

LunoGen uses Anthropic's Messages API with tool use for structured agent actions. Claude decides which tool to call, and the agent executes HTTP requests, sends WhatsApp messages, or writes files in one loop.

WhatsApp DMmessagestoolsagent

Conversation example

Check the weather in Tokyo and if it's raining, reschedule my 3 PM walk to tomorrow

http_request → Anthropic Messages

Calling Messages API with tool use (weather + calendar tools)...

Tool use trace (Claude Sonnet) 1. weather.get(location='Tokyo') → 'heavy rain, 16C, 90% humidity' 2. calendar.get_event(title='walk', time='3 PM today') → found 3. calendar.move(event_id='abc', new_time='tomorrow 3 PM') → success Done. It's raining in Tokyo so I moved your 3 PM walk to tomorrow 3 PM. Weather tomorrow: partly cloudy, 19C. Your calendar is updated.

More Anthropic use cases

Deploy this in minutes

Create a LunoGen agent, connect Anthropic, and start running this workflow from WhatsApp today.