Your first agent
A 10-line example that uses the browser tool to summarize a URL. Run it, then make it your own.
The quickstart walked through a no-tools haiku. This page walks through an agent that uses the browser on its computer to do real work.
The task
Browse to a URL, extract the headline, and return a one-sentence summary.
The spawn call
curl -X POST https://jettson.dev/api/v1/agents \
-H "Authorization: Bearer $JETTSON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "URL summarizer",
"task": "Use jettson_browser_navigate to load https://news.ycombinator.com. Use jettson_browser_extract_text to grab the page text. Return JSON: {\"top_headline\": \"<the top story headline>\", \"summary\": \"<one-sentence why-this-matters>\"}."
}'That's it. No SDK, no orchestration code.
What the agent does
The reasoning loop you see in the Console reads roughly:
- Plan — "I need to navigate to a URL, extract text, find the top story, summarize."
jettson_browser_navigatewithurl: "https://news.ycombinator.com"— returns the page title and a text preview.jettson_browser_extract_text— returns the full body text (truncated at 5000 chars).- Reason — picks the first headline, drafts a summary.
- End — emits the final JSON.
Total wall-clock time: 5-8 seconds on a warm pool hit. 18-25 seconds cold.
Reading the result
AGENT_ID="ag_..." # the agent_id from the spawn response
curl https://jettson.dev/api/v1/agents/$AGENT_ID \
-H "Authorization: Bearer $JETTSON_API_KEY" | jq '.final_result'{
"top_headline": "...",
"summary": "..."
}Iterating on the prompt
You can rewrite the task however you want. A few variations that work as-is:
- "Summarize the top 5 stories instead of just the first."
- "Also fetch the comments page for each story and tell me which is most contentious."
- "If you've seen a similar story before (use
jettson_memory_search), only include it if there's new news."
The first two variations work without any other changes. The third one turns this into a memory-aware agent — the next run will skip stories already covered. That's the pattern most production agents end up using.
Where to go from here
- Memory concepts — why agents that remember are better than agents that don't
- Tools reference — the full surface of every built-in tool
- Examples — three full templates ready to fork