logoalt Hacker News

flowerthoughtsyesterday at 9:18 PM1 replyview on HN

Or the Python or Typescript Agent SDK libraries: https://platform.claude.com/docs/en/agent-sdk/overview


Replies

joshstrangeyesterday at 9:45 PM

Or can you? It's my understanding that you cannot use your subscription with the Agent SDK, that's what the docs say:

> Unless previously approved, Anthropic does not allow third party developers to offer claude.ai login or rate limits for their products, including agents built on the Claude Agent SDK. Please use the API key authentication methods described in this document instead.

Though there was that tweet [0] a while back by someone from Anthropic that just muddied the water. It's frustrating because I feel like the line between the Agent SDK and `claude -p` is not that large but one can use the subscription and one can't... or we don't know, the docs seem unambiguous but the tweet confuses things and you can find many people online saying you can, or you can't.

I'd love to play around with the Agent SDK and try out some automations but it seems I can only do that if I'm willing to pay for tokens, even though I could use Claude Code to write the code "for" the Agent SDK, but not "run" the Agent SDK.

Where is the line? Agent SDK is not allowed with subscription, but if I write a harness around passing data to and parsing the JSON response from `claude -p '<Your Prompt>' --output-format json` would that be allowed? If I run it on a cron locally? I literally have no idea and, not wanting my account to be banned, I'm not interested in finding out. I wish they would clarify it.

[0]

Twitter: https://x.com/trq212/status/2024212378402095389

XCancel: https://xcancel.com/trq212/status/2024212378402095389

Text:

> Apologies, this was a docs clean up we rolled out that’s caused some confusion.

> Nothing is changing about how you can use the Agent SDK and MAX subscriptions!

> We want to encourage local development and experimentation with the Agent SDK and claude -p.

> If you’re building a business on top of the Agent SDK, you should use an API key instead. We’ll make sure that’s clearer in our docs.

show 1 reply