HomeNewsJules API: A practical guide for developers

Jules API: A practical guide for developers

Published on

Claude’s Agent Harness Patterns Are Rewriting Developer Assumptions About What AI Can Handle Alone

That’s Anthropic’s confirmed BrowseComp score for Claude Opus 4.6 running with a multi-agent harness, web search, compaction triggered at 50,000 tokens, and max reasoning effort.

Context switching burns time. You fix a bug, bounce to Slack, open CI, then back to code review. The Jules API lets you wire Google’s coding agent into that flow so tedious work can be kicked off from Slack, scheduled in CI, and reviewed as clean pull requests. Below is a plain guide to how it works, simple curl calls to try, and a few patterns you can ship this week.

Summary

  • Jules API exposes sources, sessions, and activities.
  • Typical flow: list a repo source → create a session with a prompt → approve plan → watch activities → review PR.
  • Great fits: Slack-reported bugs, weekly dependency bumps, pre-merge test fixes.
  • Alpha today; expect changes. Keep API keys safe.
  • Private repos aren’t used for training. Public ones may be.

What the Jules API does

Short Answer: The Jules API programmatically starts and manages work by Google’s coding agent in your repos. You pass a prompt and a source (like a GitHub repo) to create a session. Jules plans and executes work in a clean environment and reports back as activities and pull requests.

Source, Session, Activity in plain English

  • Source: where the code lives. Usually a GitHub repo you’ve connected.
  • Session: a tracked block of work with a title and a prompt, like “write tests for parser.”
  • Activity: the timeline inside that session. Plan created, message sent, progress updated, PR opened.

Where the API fits vs Jules Tools (CLI)
Use Jules Tools when you want an interactive terminal or to script local flows. Use the API when you need services talking to services: Slack bots, CI triggers, cron jobs, or internal dashboards.

Quickstart in 30 seconds (curl)

Keep your API key in a secret manager. Rotate often.

  1. Get an API key
    Create one in the Jules web app settings.
  2. List sources
curl 'https://jules.googleapis.com/v1alpha/sources' \
  -H 'X-Goog-Api-Key: YOUR_API_KEY'
  1. Create a session
curl 'https://jules.googleapis.com/v1alpha/sessions' \
  -X POST \
  -H "Content-Type: application/json" \
  -H 'X-Goog-Api-Key: YOUR_API_KEY' \
  -d '{
    "prompt": "Add unit tests for parseQueryString()",
    "sourceContext": {
      "source": "sources/github/yourorg/yourrepo",
      "githubRepoContext": { "startingBranch": "main" }
    },
    "title": "Parser tests"
  }'
  1. Approve plan (if required)
curl 'https://jules.googleapis.com/v1alpha/sessions/SESSION_ID:approvePlan' \
  -X POST -H 'X-Goog-Api-Key: YOUR_API_KEY'
  1. List activities
curl 'https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities?pageSize=30' \
  -H 'X-Goog-Api-Key: YOUR_API_KEY'

When the PR lands, review diffs like you usually do.

Common workflows you can automate today

Slack bug triage → session → PR
When someone tags a bug in #incidents, your Slack bot can create a Jules session with the issue title and a link to logs. The bot posts status updates in the same thread and drops the PR link when ready.

CI/CD “quality gate” before merge
For flaky tests or style regressions, have CI kick off a session with a minimal prompt: “stabilize failing tests in path X.” Merge stays blocked until the PR passes.

Backlog sweeps and scheduled chores
Once a week, pull low-risk issues labeled good-first-task and dispatch them to Jules. It’s predictable work that humans often postpone.

Jules API vs Copilot-style tools

Short Answer: Copilot speeds up typing and in-IDE suggestions. The Jules API treats code work as jobs: it plans, edits, tests, and opens PRs autonomously. Use Copilot to write code faster. Use Jules API to move tasks through your pipeline with less hand-holding.

Agent vs autocomplete
Autocomplete shines for small, local edits. Agents help with repository-wide changes, tests, and upgrades. Many teams run both.

Integration surfaces and team fit

  • Jules API: Slack, CI, schedulers, dashboards.
  • Jules Tools: terminal/TUI, local scripting.
  • Copilot: IDE.
    Pick based on where your team spends time.

Data use, privacy, and limits

Short Answer: Private repos aren’t used for model training. Public repos may be. Jules runs in a sandboxed environment and reports back as PRs. Plans can require explicit approval. There are daily and concurrent task caps that scale with plan tier.

What to set up on day one:

  • Plan approval for risky repos.
  • Policy on who can create sessions.
  • Repo selection to avoid high-blast-radius monorepos at first.

Pitfalls and guardrails

  • Scope creep: Prompts like “speed up the app” go nowhere. Be concrete: “optimize image resize in server/images.ts and add tests.”
  • Flaky environments: Capture env vars and setup scripts once, reuse everywhere.
  • Noisy PRs: Ask for smaller PRs or set a policy: one topic per session.
  • Access sprawl: Gate session creation to maintainers.

Mini case study: Slack→Jules for “version bump Fridays”

A fintech team labels dependency tickets bump-friday. A Slack workflow posts each ticket’s package name and repo. A bot creates Jules sessions at 6 p.m. Friday with prompts like “Bump Next.js to v15 and fix breaking changes,” using a staging branch. PRs arrive by Monday morning with test runs and changelogs. Humans still review. The net effect: the team stopped carrying month-old package debt.

Comparison Table

FeatureJules APIJules Tools (CLI)GitHub Copilot
Primary useAutomate repo work via servicesInteractive terminal controlIn-IDE code suggestions
Typical triggerSlack, CI, schedulersTerminal/TUI commandsEditor keystrokes
OutputPRs + activity logsPRs + terminal feedbackInline code
SetupAPI key + connected reposnpm i -g @google/julesIDE extension
Best forBug triage, test fixes, upgradesLocal scripting, dashboardsSpeeding up typing and small edits

Frequently Asked Questions (FAQs)

Is the Jules API stable?
It’s alpha. Endpoints and fields may change. Pin versions where possible and keep an eye on the docs.

Do I need the CLI?
No. The API is enough for automation. The CLI helps locally with discovery and ad-hoc tasks.

Does Jules train on my code?
Not on private repositories. For public ones, data may be used. See the references.

How many tasks can I run?
Plans define daily and concurrent caps. Start with the free tier to test fit, then scale.

What about security?
Use least-privilege repo access, rotate API keys, and require plan approval for sensitive code.

Checklist

  • Create API key and store it as a secret.
  • Connect only the repos you intend to automate.
  • Write task-sized prompts with file paths.
  • Enable plan approval on sensitive repos.
  • Start with Slack triage or package bumps before heavier refactors.
  • Review every PR like normal code.

Glossary

  • Source: the repo or input context.
  • Session: a tracked unit of work with a prompt and context.
  • Activity: events inside a session, like plan steps and messages.
  • Plan approval: toggle to require a human OK before work starts.

What is the Jules API?

The Jules API lets services trigger and manage work by Google’s coding agent in your repos. You pass a prompt and a repo source to create a session. Jules plans, edits, and tests in a sandbox, then opens a pull request for human review.

How do I get a Jules API key?

Open the Jules web app, go to Settings, and create an API key. Use the key in the X-Goog-Api-Key header for all requests. Rotate keys regularly and avoid hard-coding them into public code or CI logs.

Jules API vs Copilot what’s the difference?

Copilot speeds up coding inside your editor. Jules API treats work as jobs: it runs tasks against your repository, tests changes, and returns PRs. Many teams pair them—Copilot to write code, Jules to automate repetitive chores.

Does Jules train on private code?

Google states that private repositories are not used for training. Public repos may be used. Teams with sensitive code should connect only necessary repos and review access policies.

Mohammad Kashif
Mohammad Kashif
Senior Technology Analyst and Writer at AdwaitX, specializing in the convergence of Mobile Silicon, Generative AI, and Consumer Hardware. Moving beyond spec sheets, his reviews rigorously test "real-world" metrics analyzing sustained battery efficiency, camera sensor behavior, and long-term software support lifecycles. Kashif’s data-driven approach helps enthusiasts and professionals distinguish between genuine innovation and marketing hype, ensuring they invest in devices that offer lasting value.

Latest articles

Claude’s Agent Harness Patterns Are Rewriting Developer Assumptions About What AI Can Handle Alone

That’s Anthropic’s confirmed BrowseComp score for Claude Opus 4.6 running with a multi-agent harness, web search, compaction triggered at 50,000 tokens, and max reasoning effort.

Xcode 26.5 Beta Ships Swift 6.3 and an iOS SDK That Lays Groundwork for Maps Ads

Xcode 26.5 beta (17F5012f) arrived on March 30, 2026, and it carries more developer impact than a typical point release. Swift 6.3 ships as the new default compiler, five platform SDKs move forward simultaneously, and

macOS Tahoe 26.5 Beta 1 Quietly Tests RCS Encryption Again and Lays the Foundation for Apple Maps Ads

Apple released macOS Tahoe 26.5 Beta 1 on March 29, 2026, less than a week after macOS 26.4 reached Mac hardware worldwide. Most coverage frames this as a routine maintenance drop.

iOS 26.5 Beta Flips RCS Encryption Back On, Puts Ads Inside Apple Maps, and Expands EU Wearable Access

Apple dropped iOS 26.5 beta 1 (build 23F5043g) on March 29, 2026, one week after iOS 26.4 shipped to the public. Siri watchers will find nothing new here. But the update carries three changes significant enough to

More like this

Claude’s Agent Harness Patterns Are Rewriting Developer Assumptions About What AI Can Handle Alone

That’s Anthropic’s confirmed BrowseComp score for Claude Opus 4.6 running with a multi-agent harness, web search, compaction triggered at 50,000 tokens, and max reasoning effort.

Xcode 26.5 Beta Ships Swift 6.3 and an iOS SDK That Lays Groundwork for Maps Ads

Xcode 26.5 beta (17F5012f) arrived on March 30, 2026, and it carries more developer impact than a typical point release. Swift 6.3 ships as the new default compiler, five platform SDKs move forward simultaneously, and

macOS Tahoe 26.5 Beta 1 Quietly Tests RCS Encryption Again and Lays the Foundation for Apple Maps Ads

Apple released macOS Tahoe 26.5 Beta 1 on March 29, 2026, less than a week after macOS 26.4 reached Mac hardware worldwide. Most coverage frames this as a routine maintenance drop.