Overview
provideCopilotKit() is the main configuration function for CopilotKit in Angular applications. It returns an Angular Provider that should be included in your application’s provider array.
Usage
Configuration Interface
Parameters
URL endpoint for your CopilotKit runtime server. This is where agent execution requests are sent.
Custom HTTP headers to include with all runtime requests.
Your CopilotCloud license key. Required to remove the watermark in production.Format:
ck_pub_[32 hexadecimal characters]Custom properties to pass to your runtime and agents. These are forwarded with every request.
Map of client-side agents that run in the browser. The key is the agent ID.
Map of self-managed agents. These agents handle their own lifecycle and execution.
Array of client-side tools available to agents. Tools execute in the browser.
Configuration for custom rendering of tool calls in the chat UI.
Additional frontend tools with custom handlers.
Configuration for human-in-the-loop tool approvals.
Return Value
Returns an AngularProvider object that should be included in your application’s providers array.
Injection Token
You can access the configuration at runtime using dependency injection:Examples
Basic Configuration
With License Key
With Custom Headers and Properties
With Client-Side Tools
License Validation
CopilotKit automatically validates your license key:- Valid key format:
ck_pub_[32 hex characters] - Missing or invalid key: A watermark will be displayed in the UI with a console warning
- Valid key: No watermark, full functionality
See Also
- CopilotKit Service - Runtime service API
- Angular Components - UI component APIs
- CopilotRuntime - Runtime server configuration
