Compose AI agents like reusable components A developer introduced Agent Markup Language (AML), a JSX-based framework for composing AI agents as reusable components, enabling explicit dataflow and parallel execution. The Codex SDK provides a low-level thread API, while AML abstracts orchestration into a declarative component model. Imagine composing AI assistants the way you create reusable React components. One agent reviews correctness. Another plans the tests. Their outputs flow into a third agent that produces one release recommendation. Correctness ──┐ ├── Synthesis ── Release recommendation Test plan ────┘ That is agent composition: small specialists, explicit dataflow, one final result. The Codex SDK https://github.com/openai/codex/tree/main/sdk/typescript gives TypeScript applications a clean thread-and-turn API. Composing several threads is still your application's job: js import { Codex } from "@openai/codex-sdk" const codex = new Codex async function run prompt: string { const thread = codex.startThread return await thread.run prompt .finalResponse } const correctness = await run "Review the current diff for correctness defects." const tests = await run "Write the smallest useful test plan for the current diff." const coordinator = codex.startThread const result = await coordinator.run Write one release recommendation from these reports. Do not invent findings. CORRECTNESS ${correctness} TEST PLAN ${tests} console.log result.finalResponse This is perfectly reasonable TypeScript. It also makes the application responsible for threads, execution order, result extraction, and prompt assembly. As the workflow grows, the glue becomes the thing you spend time reading. Agent Markup Language https://aml.wearesingular.com/ puts that composition into TypeScript and JSX: function ReleaseReview { return