top | item 47148023

(no title)

buremba | 4 days ago

I spent 3 months adopting Codex and Claude Code SDKs only to realize they're just vendor lock-in and brittle. They're intended to be used as CLI so it's not programmable enough as a library. After digging into OpenClaw codebase, I can safely say that the most of its success comes from the underlying harness, pi agent.

pi plugins support adding hooks at every stage, from tool calls to compaction and let you customize the TUI UI as well. I use it for my multi-tenant Openclaw alternative https://github.com/lobu-ai/lobu

If you're building an agent, please don't use proprietary SDKs from model providers. Just stick to ai-sdk or pi agent.

discuss

order

bjackman|4 days ago

IIUC to reliably use 3P tools you need to use API billing, right? Based on my limited experimentation this is an order of magnitude more expensive than consumer subscriptions like Claude Pro, do I have that right?

("Limited experimentation" = a few months ago I threw $10 into the Anthropic console and did a bit of vibe coding and found my $10 disappeared within a couple of hours).

If so, that would support your concern, it does kinda sound like they're selling marginal Claude Code / Gemini CLI tokens at a loss. Which definitely smells like an aggressive lockin strategy.

buremba|4 days ago

Technically you're still using claude CLI with this pattern so it's not 3P app calling Anthropic APIs via your OAuth token. Even if you would use Claude Code SDK, your app is 3P so it's in a gray area.

Anthropic docs is intentionally not clear about how 3P tools are defined, is it calling Claude app or the Anthropic API with the OAuth tokens?

vanillameow|4 days ago

Unfortunately it's currently very utopian for (I would assume) most devs to use something like this when API cost is so prohibitively expensive compared to e.g. Claude Code. I would love to use a lighter and better harness, but I wouldn't love to quintuple my monthly costs. For now the pricing advantage is just too big for me compared to the inconvenience of using CC.

badlogic|4 days ago

OpenAI officially supports using your subscription with pi. Same for OpenCode and other 3rd party harnesses.

buremba|4 days ago

You technically still use CC, it's not via SDK but via CLI programmatically triggered via pi.

kzahel|4 days ago

I left some notes about this. I agree with you directionally but practically/economically you want to let users leverage what they're already paying for.

https://yepanywhere.com/subscription-access-approaches/

Captures the ai-sdk and pi-mono.

In an ideal world we would have a pi-cli-mono or similar, like something that is not as powerful as pi but gives a least common denominator sort of interface to access at least claude/codex.

ACP is also something interesting in this space, though I don't honestly know how that fits into this story.

siva7|4 days ago

I also wondered for months why it feels so difficult to use Openai or Anthropic SDKs until i came to a similar conclusion.

burgerquizz|4 days ago

how do you replicate the claude code system prompts in pi? i have tried using claude agebt sdk without the claude code preset, and it is quite bad