Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

README.md

39 lines1.1 KB

1<div align="center">
2 <picture>
3 <source
4 media="(prefers-color-scheme: dark)"
5 srcset="https://tanstack.com/api/readme/ai.png?theme=dark"
6 />
7 <source
8 media="(prefers-color-scheme: light)"
9 srcset="https://tanstack.com/api/readme/ai.png"
10 />
11 <img
12 src="https://tanstack.com/api/readme/ai.png"
13 alt="TanStack AI"
14 width="900"
15 />
16 </picture>
17</div>
18​
19<br />
20​
21# @tanstack/ai-codex
22​
23Codex harness adapter for [TanStack AI](https://tanstack.com/ai) — run [OpenAI Codex](https://developers.openai.com/codex) (via `@openai/codex-sdk`) as a chat backend with local tool execution, stateful coding sessions, and TanStack tool bridging.
24​
25```typescript
26import { chat } from '@tanstack/ai'
27import { codexText } from '@tanstack/ai-codex'
28​
29const stream = chat({
30 adapter: codexText('gpt-5.1-codex', {
31 cwd: '/path/to/project',
32 sandboxMode: 'workspace-write',
33 }),
34 messages: [{ role: 'user', content: 'Fix the failing test.' }],
35 threadId: 'thread-1',
36})
37```
38​
39Server-only (Node). See the [Codex adapter docs](https://tanstack.com/ai/latest/docs/adapters/codex) for sessions, tool bridging, sandboxing, and limitations.