A2UI Launched: Full CopilotKit support at launch!

A2UI Launched: CopilotKit has partnered with Google to deliver full support in both CopilotKit and AG-UI!

Check it out
LogoLogo
  • Overview
  • Integrations
  • API Reference
  • Copilot Cloud
Slanted end borderSlanted end border
Slanted start borderSlanted start border
  • Getting Started
  • Introduction to CopilotKit
  • LLM Quickstart
  • Agent Quickstart
  • Vibe Coding MCP
  • What's New
  • CopilotKit Features
  • Agentic Chat UI
  • Copilot Suggestions
  • Human in the Loop (HITL)
  • Generative UI
  • Frontend Actions
  • Backend Actions
  • Shared State
  • Premium Features
  • CopilotKit Premium
  • Fully Headless UI
  • Observability
  • Inspector
  • Agentic Protocols
  • Agentic Protocols
  • AG-UI (Agents<->Users)
  • MCP (Agents<->Tools)
  • A2A (Agents<->Agents)
  • Generative UI Specs
  • Generative UI Specs
  • A2UI
  • Open-JSON-UI
  • MCP-UI
  • Learning
  • Tutorial: AI Todo App
  • Tutorial: AI Travel App
  • Video: Research Canvas
  • Cookbook: State Machine
  • Troubleshooting
  • Error Debugging
  • Error Observability Connectors
  • Common Copilot Issues
  • Migrate to 1.10.X
  • Migrate to 1.8.2
  • Other
  • Integrations
  • ADK
  • A2A
  • Microsoft Agent Framework
  • AWS Strands
  • Direct to LLM
  • LangGraph
  • AutoGen2
  • Agno
  • CrewAI Crews
  • CrewAI Flows
  • LlamaIndex
  • Mastra
  • Open Agent Spec
  • Pydantic AI

Backend Actions

Enable AI agents to execute server-side operations, access databases, and integrate with external services.

What are Backend Actions?

Backend Actions are server-side functions that AI agents can call to perform operations that require backend resources, such as database queries, API calls, file operations, or complex computations. They extend agent capabilities beyond the frontend to access the full power of your server infrastructure.

Unlike frontend actions that modify UI state, backend actions handle data processing, external integrations, and operations that require server-side security or resources.

Ready to get started with Backend Actions?

Direct to LLM

Backend Actions are primarily designed for Direct to LLM applications, where you need explicit server-side functions that the LLM can call. CopilotKit provides multiple implementation approaches.

Common Backend Action Patterns

Database Operations

Actions that create, read, update, or delete data from databases, often with complex queries and relationships.

API Integrations

Actions that call external APIs, process responses, and integrate data from third-party services.

File Operations

Actions that handle file uploads, downloads, processing, or storage operations on the server.

Authentication and Authorization

Actions that manage user authentication, permissions, and access control for sensitive operations.

Data Processing

Actions that perform data transformation, analysis, aggregation, or complex computations.

Workflow Orchestration

Actions that coordinate multiple backend services or trigger complex business processes.

Types of Backend Actions

Synchronous Actions

Actions that execute and return results immediately, suitable for quick database queries or simple API calls.

Asynchronous Actions

Actions that handle long-running operations, often with progress tracking and completion notifications.

Streaming Actions

Actions that return data progressively, useful for real-time updates or large data sets.

Batch Actions

Actions that process multiple items or operations together for efficiency.

Transactional Actions

Actions that ensure data consistency across multiple operations, with rollback capabilities on failure.

When to Use Backend Actions

Consider Backend Actions when agents need to:

  • Access sensitive data that shouldn't be exposed to the frontend
  • Perform complex queries across multiple data sources
  • Integrate with external services requiring server-side authentication
  • Execute business logic that involves multiple systems
  • Process large amounts of data efficiently
  • Maintain data consistency across operations
  • Handle file operations or media processing
  • Implement security controls and access management

Agent Framework Applications

Agent frameworks (LangGraph, CrewAI, LlamaIndex, etc.) typically handle backend operations through their native agent architectures rather than explicit backend actions. These frameworks provide their own mechanisms for:

  • Tool calling and external service integration
  • Database access and data manipulation
  • Complex workflow orchestration
  • Multi-step reasoning and planning

For agent-based applications, backend functionality is usually implemented as agent tools or framework-specific integrations rather than CopilotKit backend actions.

PREV
Frontend Actions
Slanted end borderSlanted end border
Slanted start borderSlanted start border
NEXT
Shared State

On this page

What are Backend Actions?
Common Backend Action Patterns
Database Operations
API Integrations
File Operations
Authentication and Authorization
Data Processing
Workflow Orchestration
Types of Backend Actions
Synchronous Actions
Asynchronous Actions
Streaming Actions
Batch Actions
Transactional Actions
When to Use Backend Actions
Agent Framework Applications