Installation
Import styles
Add CopilotKit styles to your Or in your
angular.json or import in your global styles:styles.css:Core Concepts
Configuration Provider
TheprovideCopilotKit function configures the CopilotKit service with your runtime settings:
Configuration Options
runtimeUrl- URL of your CopilotKit runtime endpointheaders- Custom headers to include in requestslicenseKey- CopilotCloud license keyproperties- Additional properties to send with requestsagents- Local agents (development only)selfManagedAgents- Self-managed agent instancesfrontendTools- Array of frontend tool configurationshumanInTheLoop- Array of human-in-the-loop tool configurationsrenderToolCalls- Array of tool call render configurations
CopilotKit Service
TheCopilotKit service is the core service that manages the connection to your runtime. Inject it into your components or services:
Frontend Tools
Register frontend tools using theCopilotKit service. Tools can be added at the application level or dynamically in components:
Tool Call Rendering
Render custom UI for tool executions by creating a component and registering it:Human-in-the-Loop
Add approval flows to tools using the human-in-the-loop pattern:Chat Components
CopilotChat
The main chat interface component:CopilotChatView
A lower-level chat view component with more customization options:Directives
copilotKitAgentContext
Provide dynamic context to your agent using the directive:Complete Example
Here’s a full example of a standalone Angular component with CopilotKit:Reactive Programming with RxJS
The CopilotKit service uses Angular Signals, but you can convert them to Observables when needed:TypeScript Support
CopilotKit Angular is fully typed. Import types for custom implementations:Next Steps
Human-in-the-Loop
Learn how to add approval flows to your tools
Tool Development
Build custom tools for your agents
Agent Configuration
Configure and customize your agents
