How to automate stuff with AI

• By Nathan Sheffield

← All posts

Current as of November 2026. This area is changing fast.

Motivation

Originally, most of my AI use was interactive: I type a request, the LLM does its work and responds, and then I respond back. It’s something like sitting at a Python or R prompt, typing in code and getting responses. So a chatbot is kind of like a mix between a human text chat and a REPL. In a way you’re typing in commands, but then the feedback comes back as non-deterministic natural language output from a model. Obviously these chatbots have been very useful. This chat interface clearly has a lot of appeal. But a lot of useful work we can do with an AI doesn’t need a person sitting there, chatting with the bot. For example, an AI could summarize new papers each morning, triage email, or check repositories for problems. In this case, the AI can do a lot of these things autonomously, maybe on a schedule. So, moving beyond the REPL/chatbot interface, the next step you start to think about its: can we set up AIs to run things on schedules, so that we can get the results without having to spend time writing the prompts, and running the real-time chat? This is where things are heading, as more people see what autonomous agents can do. So, how do you actually set that up today?

I’ve been interested in automating things for a long time, even in a non-AI sense. For example, here are a couple of recent lab projects where we automated things: In PEPhub we set up scheduled jobs that find newly published data on GEO and ingest it automatically. This allowed us to create an auto-updating catalog of curated metadata from GEO. We update it quarterly. This all happens through a cron job, and traditional pipelines we built.

Another example is in BEDbase. It also gets its data from GEO, but it’s not just concerned with metadata. In BEDbase we automatically ingest any genomic region data (BED files) added to GEO; they show up in BEDbase within a few days. It’s set up as a scheduled GitHub action that uses GEO queries to find new data, which are then submitted through processing jobs to ingest them into BEDbase. So these are basically traditional ETL workflows that are taking public data and transforming it into my local databases for my purposes. I think AI takes this to the next level, because an automated job can now handle tasks that used to need human judgment.

So, for several months I’ve been exploring how to trigger scheduled or otherwise non-interactive calls to execute tasks using AI. There are now a lot of products to choose from, each working a different way. I needed to categorize them to get my head around all the options, and started to write down some notes on the topic. I figured this could be useful for others so I’ve expanded my notes into a more formal post, and here you go.

The components of an automated AI job

Think of each automated AI job as having four separate parts:

  1. Billing: How is the model usage paid for?
  2. Scheduler: Who decides when the job starts?
  3. Compute: Where does the agent actually run?
  4. Model: Which LLM does the work?

Once you separate those four things, the current mess starts making (some) sense. But it also makes it clear how complicated things are. You have tons of options. Choosing the best fit for a particular need isn’t trivial. And, things seem to change every day. But I think this framework will stay useful for sorting out new options as things change.

Billing

One of the most important considerations is billing, because the different approaches can change the cost of the autonomous job by a factor of 10. There are basically two ways to buy access to the major LLMs: subscriptions and APIs. The subscription gives you a bucket of usage for a fixed monthly price, while the API charges based on how much model you actually consume. There are two critical things about this:

  1. Cost difference. At least for now, the API costs are generally around an order of magnitude greater than equivalent subscription costs (if you use 100% of your subscription allotment). The degree may change, but I bet there will always be a significant subsidy for using a subscription, because that’s how things work for everything else, like cell phone minutes or data use, etc. Pay-as-you-go carries a price premium because of flexibility.
  2. How it’s used. Subscriptions seem geared primarily toward interactive use, so a human is sitting there using the model. The API seems geared primarily toward autonomous or embedded use.

Given the massive, 10x cost difference, the economics of how you’re billed is huge. Since our goal here is to figure out how to use AI resources in automated processes, this is the critical question. Typically interactive use is billed through subscription, and automated use is billed through API — but the distinction between interactive and autonomous use is … complicated. OpenAI, Anthropic, and Google now all provide ways to use subscription allowance for automated tasks. But they’re all different, and geared toward different use cases, and that makes things confusing. And whether you’re allowed to use subscription capacity or required to pay API rates depends on the task you want to automated.

Since jobs billed to subscription are cheaper, the question we want to ask is this: what can we automate before being forced onto the API? It’s tempting to treat a $20/month subscription as a very cheap API key, but it doesn’t work that way. Each provider allows subscription billing only through its own approved tools, like Jules (now killed, maybe it will move into Antigravity?), ChatGPT scheduled tasks, Claude Code Routines, or a Claude Code OAuth token. None of them will let you put your subscription behind your own product as a flat-rate inference endpoint.

If you need predictable throughput, your own infrastructure, or machine-to-machine authentication at scale, you still need the API. I think of subscription automation as a way to extend my own personal agent setup, for jobs I would otherwise kick off by hand.

The rules also keep changing. Anthropic announced that starting June 15, 2026, programmatic use would stop counting against ordinary subscription limits and would draw from a separate monthly credit instead. Then they paused the change, and as of now it still comes out of subscription limits. Google also announced in October that it will shut down Jules, its cloud coding agent, on December 31, 2026, and fold it into Antigravity. So a setup that works this month may not work next month. Fun, right?

Scheduling

The scheduler decides when a job starts. There are two main kinds.

The first is a scheduler built into the AI product itself. ChatGPT, Antigravity, Cowork, and Claude Code Routines all let you write a prompt, pick a time, and let the provider start the job for you. This is the easiest option, since you don’t need any infrastructure of your own. The downside is that you’re limited to whatever triggers that product supports. Each product also has its own interface for managing jobs.

The second is GitHub Actions. GitHub can start a job on a schedule, or in response to an event like a new issue or pull request. This is how the BEDbase ingestion runs, so for me it’s familiar territory. From a GitHub workflow you can either call out to a provider’s service (like a Claude Routine), or run an agent CLI directly on the GitHub runner. GitHub is more work to set up, but it lives right next to your code. It also doesn’t care which AI provider you call.

Compute

Compute is where the agent actually runs. This matters because it decides what the agent can touch. There are three places a job can run:

  1. The provider’s cloud. ChatGPT tasks run in OpenAI’s cloud, and Claude Routines run in Anthropic’s cloud. The disadvantage (or advantage?) is that the agent sees only what the service gives it, usually a copy of your repository, so it’s harder to shape a complete, complicated context.
  2. A GitHub runner. A CLI on a GitHub runner gets that runner’s filesystem, secrets, and network.
  3. Your own machine. A local scheduled task runs on your actual computer, with access to everything you can access. That’s powerful, since the agent can use your local files and tools, but it also means your computer has to be on.

Model

In practice, the model is mostly chosen for you once you pick the other three parts, because the provider of the above things use their own models. BUT, you do have some control over things if you select a generic scheduler; a single GitHub workflow could run Codex for one job and Claude for another, so you can choose the model if using a third-party scheduling system.

Putting it together

Here are the options I’ve been exploring. Each row below is an option; the columns are the four parts from above.

OptionBillingSchedulerComputeModel
Antigravity scheduled taskSubscriptionAntigravityYour machineGemini
GitHub → Antigravity CLIAPIGitHubGitHub runnerGemini
ChatGPT scheduled taskSubscriptionChatGPTOpenAI cloudGPT
ChatGPT scheduled local taskSubscriptionChatGPTYour machineGPT
GitHub → Codex ActionAPIGitHubGitHub runnerGPT
Claude Code RoutineSubscriptionAnthropicAnthropic cloudClaude
Cowork scheduled taskSubscriptionClaudeYour machineClaude
GitHub → Claude RoutineSubscriptionGitHubAnthropic cloudClaude
GitHub → Claude Code Action (OAuth)SubscriptionGitHubGitHub runnerClaude
GitHub → Claude Code Action (API key)APIGitHubGitHub runnerClaude

Ok, so you can already see, it’s complicated. If you only use the provider’s own scheduler, all three providers let you bill to your subscription. The differences show up when GitHub is the scheduler. Running the Antigravity CLI or the Codex Action on a GitHub runner needs the API, so Google and OpenAI have no subscription option with GitHub as the scheduler. Anthropic is the only provider that lets a GitHub Actions job use your subscription, by running Claude Code on the runner with an OAuth token.

Conclusion

Not long ago, automating an AI task meant writing code against an API and paying for every token. Now all three major providers let you run agents on a schedule billed to the same subscription you already use interactively. You can mix and match the four parts from different companies. The old rule of thumb, that interactive use means subscription and automated use means API, doesn’t hold anymore, but that doesn’t mean you can necessarily just mix and match whatever you want; the offerings are complicated. It can be challenging to figure out which combination of parts fits a given job.

I expect the specific options to keep shifting as providers change prices, limits, and which tools count as subscription use. But I’ve found this four-part breakdown to be a useful conceptual framework to try to make sense of the options as the details change.

Tags: ai software