Component: Capability Manifest #8
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Capability Manifest Artifact
A component for displaying AI agent capabilities, constraints, and connection status. This artifact helps set user expectations about what an AI agent can and cannot do, preventing the "Mental Model Mismatch" where users assume the agent has capabilities it doesn't possess.
Installation
Install using the HAX CLI:
This will:
src/hax/artifacts/capability-manifest/directorylucide-react,zod)Usage
Basic Usage
Using the CopilotKit Action Hook
The artifact includes a CopilotKit action hook for AI agents to dynamically create capability manifests:
Schema
CapabilityManifestData
The main data structure for the component:
Capability
Alert
CapabilityGroup
Status Types
Action Parameters
When using the CopilotKit action hook, the AI can call
create_capability_manifestwith these parameters:agentNameagentRolestatusTextagentTagsJsoncapabilitiesJsoncapabilityGroupsJsoncapabilitiesLabelshowCapabilitiesalertsJsonconnectionStatusconnectionLabelsessionIdstatusMetadataJsonshowSeparatorshowStatusvariantsizeshowShadowExamples
With Capability Groups
With Multiple Alerts
Different Styling Variants
With Event Handlers
Best Practices
Display at Session Start: Show the capability manifest during agent initialization (Phase 1) before user interaction begins.
Keep Capability Names Concise: Use clear, descriptive names that users can quickly understand.
Use Alerts Sparingly: Only include alerts for important constraints or warnings that affect user expectations.
Include Session ID: Add session identifiers for debugging and tracking purposes.
Group Related Capabilities: When there are many capabilities, use
capabilityGroupsto organize them logically.Set Appropriate Status: Reflect the actual agent state with the correct connection status.
File Structure
Dependencies
react>= 18.0.0lucide-react- Iconszod- Schema validation@copilotkit/react-core- CopilotKit integration