LogicAppsUX / a2a-core
CLAUDE.md114 starsChanged 5 months agoMITView on GitHub
React SDK for building chat interfaces that connect to AI agents using the A2A (Agent-to-Agent) protocol. Package: @microsoft/logic-apps-chat Uses Zustand for chat state: IndexedDB storage via idb: - Message history - Session state - Offline support Uses Zod for runtime validation: Minimal external dependencies: - @fluentui/react-components - UI framework - eventemitter3 - Events - idb - IndexedDB - immer - Immutability - marked - Markdown - prismjs - Highlighting - zod - Validation - zustand - State Read libs/a2a-core/src/graphify-out/GRAPH_REPORT.md for…
In this repository17 other files it gives its agents.
- apps/docs/CLAUDE.mdCLAUDE.md
- apps/iframe-app/CLAUDE.mdCLAUDE.md
- apps/Standalone/CLAUDE.mdCLAUDE.md
- apps/vs-code-designer/CLAUDE.mdCLAUDE.md
- apps/vs-code-react/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- libs/chatbot/CLAUDE.mdCLAUDE.md
- libs/data-mapper/CLAUDE.mdCLAUDE.md
- libs/data-mapper-v2/CLAUDE.mdCLAUDE.md
- libs/designer/CLAUDE.mdCLAUDE.md
- libs/designer-ui/CLAUDE.mdCLAUDE.md
- libs/designer-v2/CLAUDE.mdCLAUDE.md
- libs/logic-apps-shared/CLAUDE.mdCLAUDE.md
- libs/vscode-extension/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- uiSkill
- verify-prSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 152
Protocol compliance: Follow A2A specification
- Distinctive: line 155
Offline support: Consider IndexedDB persistence
- Distinctive: line 156
Accessibility: Ensure chat is screen-reader friendly
- Very specific: line 160
Read libs/a2a-core/src/graphify-out/GRAPH_REPORT.md for structural context (god nodes, communities, surprising connections).
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- AUTO-GENERATED from docs/ai-setup/packages/a2a-core.md. DO NOT EDIT directly. -->A2A Core (Logic Apps Chat SDK)
React SDK for building chat interfaces that connect to AI agents using the A2A (Agent-to-Agent) protocol.
Package: @microsoft/logic-apps-chat
Purpose
- A2A protocol client - Connect to A2A-compatible AI agents
- React components - Pre-built chat UI components
- State management - Zustand-based chat state
- Message streaming - Real-time response handling
- Persistence - IndexedDB message storage
Commands
pnpm run build # Build library
pnpm run dev # Watch mode
pnpm run test # Run tests
pnpm run test:ui # Tests with Vitest UI
pnpm run test:coverage # Coverage report
pnpm run typecheck # TypeScript validationArchitecture
Entry Point
Multiple entry points:
dist/index.js- Core SDKdist/react/index.js- React componentsdist/react/styles.css- Component styles
Structure
/src
/core/ - A2A protocol implementation
/client/ - A2A client
/types/ - Protocol types
/events/ - Event emitter
/react/ - React integration
/components/ - Chat components
/hooks/ - React hooks
/store/ - Zustand store
/utils/ - UtilitiesCore SDK
A2A Client
import { A2AClient } from '@microsoft/logic-apps-chat'
const client = new A2AClient({
agentUrl: 'https://agent.example.com',
onMessage: (message) => console.log(message),
})
await client.sendMessage('Hello!')Message Types
interface Message {
id: string
role: 'user' | 'assistant'
content: string
timestamp: Date
streaming?: boolean
}React Components
ChatProvider
import { ChatProvider, ChatWindow } from '@microsoft/logic-apps-chat/react'
<ChatProvider agentUrl="https://...">
<ChatWindow />
</ChatProvider>Available Components
ChatWindow- Full chat interfaceMessageList- Message displayMessageInput- User inputMessage- Individual messageCodeBlock- Code display with syntax highlighting
State Management
Uses Zustand for chat state:
import { useChatStore } from '@microsoft/logic-apps-chat/react'
const { messages, sendMessage, isLoading } = useChatStore()Persistence
IndexedDB storage via idb:
- Message history
- Session state
- Offline support
Validation
Uses Zod for runtime validation:
import { MessageSchema } from '@microsoft/logic-apps-chat'
const validated = MessageSchema.parse(rawMessage)Technologies
- React 19 - Latest React features
- Zustand - State management
- Zod - Schema validation
- Immer - Immutable updates
- marked - Markdown rendering
- Prism.js - Syntax highlighting
- IndexedDB (idb) - Persistence
- EventEmitter3 - Event handling
Testing
pnpm run test # Run all tests
pnpm run test:coverage # With coverage
pnpm run test:ui # Vitest UIDependencies
Minimal external dependencies:
@fluentui/react-components- UI frameworkeventemitter3- Eventsidb- IndexedDBimmer- Immutabilitymarked- Markdownprismjs- Highlightingzod- Validationzustand- State
Development Tips
- Protocol compliance: Follow A2A specification
- Streaming: Handle partial message updates
- Error recovery: Implement retry logic (p-retry)
- Offline support: Consider IndexedDB persistence
- Accessibility: Ensure chat is screen-reader friendly
Graphify
Read libs/a2a-core/src/graphify-out/GRAPH_REPORT.md for structural context (god nodes, communities, surprising connections).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

