ag-ui
AG-UI
Use this skill to implement AG-UI compliant integrations with correct event ordering, tool lifecycle behavior, and state synchronization semantics.
Quick Triage
- Use this skill when the task is protocol-level integration between agent backend and UI client.
- Switch to
$langgraphwhen graph orchestration/checkpoint logic is the primary issue. - Switch to
$langchainwhen chain or tool orchestration internals are the primary issue. - Switch to
$copilotkitwhen CopilotKit hooks/provider behavior is primary.
Workflow
- Define integration mode.
Choose client-side
HttpAgent, customAbstractAgent, or middleware bridge. - Lock event subset and ordering. Map required lifecycle, text, tool, and state events before implementation.
- Implement lifecycle first.
Guarantee
RUN_STARTEDandRUN_FINISHED/RUN_ERRORframing around all runs. - Implement message and tool streams. Ensure tool call start/args/end/result sequence is valid and complete.
- Implement state synchronization. Choose snapshot-only, delta-only, or hybrid strategy intentionally.
- Add middleware with explicit order. Enforce auth, filtering, and logging without mutating protocol invariants.
- Validate against event traces. Use deterministic replay to confirm ordering and payload shape.
Default Patterns
- Emit minimal valid event streams rather than custom ad-hoc payloads.
- Keep tool result payloads parseable and bounded.
- Prefer explicit event schemas over inferred client parsing.
- Keep protocol payloads transport-agnostic.
Failure Modes
- Out-of-order lifecycle or tool events.
- Partial tool-call streams without terminal result events.
- State delta application mismatch on client.
- Middleware mutating payloads into non-compliant shapes.
Reference Map
Load only what is needed for the current subtask.
- Event contracts:
references/event-contracts.md - State sync strategy:
references/state-sync.md - Middleware usage:
references/middleware-patterns.md - Integration checklist:
references/integration-checklist.md
More from outlinedriven/odin-codex-plugin
copilotkit
CopilotKit integration patterns for providers, runtime wiring, `useCoAgent`, `useCopilotAction`, `useLangGraphInterrupt`, shared state, and HITL with LangGraph. Use when building agent-native product UX.
65mesop
Build Python-native web apps with Mesop. Triggers when users want to build, debug, or deploy Mesop applications, including AI chat interfaces, internal tools, and ML demos.
22plan
Generate a plan for how an agent should accomplish a complex coding task. Use when a user asks for a plan, and optionally when they want to save, find, read, update, or delete plan files in $CODEX_HOME/plans (default ~/.codex/plans).
22langgraph
LangGraph state-machine design and debugging for `StateGraph`, node/edge routing, checkpoints, `interrupt`, and HITL flows. Use when building or troubleshooting graph-based agents with conditional edges and thread state.
22code-simplifier
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
22ast-grep
Effective code search, analysis, and refactoring using ast-grep (sg). Use this skill for precise AST-based code modifications, structural search, and linting.
21