agents
reference
ai-dev

Cedar-OS: Breaking AI Out of the Chat Window

10/3/2025

AI is stuck in a text box. You ask a question, get a brilliant answer, then manually copy-paste the output back into your application. This copy-paste tax breaks flow, kills productivity, and keeps AI trapped as a side-channel advisor instead of an integrated copilot.

Cedar-OS is an open-source framework designed to solve this fundamental problem. It provides the missing front-end layer that lets AI agents read and write application state directly—transforming them from conversational helpers into true co-pilots that live inside your product.

If you're building AI-native software, Cedar represents the architectural shift from "VSCode to Cursor"—moving from static file editing to an environment where AI is an active, state-aware participant in your application.

The core problem: the chat window prison

For the past two years, AI interactions have been confined to an isolated text box. This felt safe initially—AI couldn't accidentally break anything if it only produced text. But this isolation has become the primary efficiency killer.

The friction loop looks like this:

  1. User describes a complex task in chat
  2. AI generates a perfect 10-step plan (in text)
  3. User manually executes each step, translating AI text into application actions
  4. Repeat for every iteration and refinement

This is cognitively exhausting. Text is demanding to read and write. More critically, the human becomes a translation layer between AI intelligence and application state.

The historical parallel: CLI to GUI

Cedar's philosophy draws an explicit analogy to the graphical user interface revolution. In the terminal era, you maintained the entire system state mentally—typing commands and parsing text responses. The GUI breakthrough was making the computer reflect state visually: files, folders, settings all directly manipulable.

Evolution from CLI to GUI to Agentic AI The evolution of interfaces: from command-line terminals to graphical UIs to state-aware agentic systems

AI interactions must break out of chat just like the GUI broke out of the command line. The agent needs to see what you see, manipulate what you manipulate, and provide immediate visual feedback.

The architectural shift: from advisor to actor

The difference between an AI advisor and an AI copilot is simple: state access.

Without direct state access:

  • AI outputs instructions as text
  • Human interprets and executes manually
  • Every action requires context switching
  • Feedback loops are slow and lossy

With direct state access:

  • AI reads current application state
  • AI proposes changes to that state
  • Human reviews and approves changes
  • State updates happen in-place, visually

This shift turns AI from a separate service into a first-class participant in your application's data flow.

Core architecture: the components that enable agentic UX

Cedar-OS provides nine core features, but three are foundational for state-aware copilots.

1. State access: reading and writing application state

This is the engine. Cedar agents can directly read and modify your application's local state—form fields, data models, UI components, code structures.

Why this matters: imagine an AI agent helping with a customer support ticket. Instead of saying "change the customer's address field to 123 Main St," the agent can propose the state change directly. No copy-paste. No manual field updates.

// Traditional chat-based AI
const response = await chat("Update customer address to 123 Main St");
// Human reads response, opens form, manually types address

// Cedar-OS state-aware AI
const proposal = agent.proposeStateChange({
  path: "customer.address",
  value: "123 Main St",
  reason: "User requested address update"
});
// Human sees visual diff, clicks approve, state updates automatically

Cedar state and context awareness in action Cedar agents maintain full awareness of application state and user context

The challenge: giving AI read-write access sounds dangerous. What about accidental deletions? Concurrent edits? Debugging nightmares?

2. Differential history: the trust layer

This is how Cedar solves the trust gap. Every AI-proposed state change goes through a dedicated tracking system that:

  • Captures the agent's intent and reasoning
  • Creates a human-readable diff of the proposed change
  • Presents the diff in the application UI for approval
  • Tracks execution history with full audit trails

This isn't just a database transaction log or Git history—it's interaction-level state management focused on the user approval workflow. The system tracks what the AI intends to change, presents it visually, and only executes after human confirmation.

Why build a separate differential history system instead of using standard version control? Because this operates at the application UX layer, not the backend persistence layer. It needs to:

  • Show diffs in your application's UI components
  • Allow per-action approval gates
  • Track agent reasoning alongside state changes
  • Support rollback at the interaction level

Cedar human-in-the-loop approval workflow The approval interface: users review AI-proposed changes before execution

3. Spells: multi-step agentic workflows

A simple tool call is "fetch this customer's order history." A spell is a coordinated multi-step sequence:

  1. Fetch customer data from the backend
  2. Run a local transformation function
  3. Query the analytics API for usage patterns
  4. Update two database fields
  5. Send a confirmation email

The key: all five steps are bundled into a single atomic action that the user approves or rejects as one unit.

// Conceptual spell definition
const upgradeCustomerSpell = {
  name: "upgrade_to_premium",
  steps: [
    { tool: "fetchCustomer", args: { id } },
    { tool: "calculateDiscount", args: { tier: "premium" } },
    { tool: "updateDatabase", args: { customerId: id, tier: "premium" } },
    { tool: "sendEmail", args: { template: "welcome_premium" } },
  ],
  presentAs: "Upgrade customer to premium tier"
};

Cedar spells executing multi-step workflows Spells bundle complex multi-step operations into a single approvable action

Spells let you package complex AI workflows into manageable, approvable actions. The user sees "Upgrade customer to premium tier" with a clean diff showing the before/after state, not five separate approval prompts.

The developer experience: craft and control

Cedar targets serious engineering teams building mission-critical AI products. Three architectural choices stand out.

Shadcn-style component ownership

Cedar components aren't installed as a black-box npm dependency. You download the actual source code into your project using a CLI tool (Shadcn style).

# Traditional package install
npm install cedar-os
# You get a compiled library; can't easily modify internals

# Cedar approach
npx cedar add floating-chat
# Source code copied into your project; you own it completely

Why this matters:

  • Full transparency: debug line-by-line like any other code
  • Complete control: fork and modify for proprietary requirements
  • No dependency lock-in: the code lives in your repo, not in node_modules
  • Long-term maintenance: manage it like first-party infrastructure

This ownership model is critical for production systems where reliability and customization are non-negotiable.

One-line overrides: every function is customizable

Cedar claims "every single internal function can be overwritten in one line." This is about deep extensibility without fragility.

// Example: override the default state diff presentation
const cedarConfig = {
  renderDiff: (before, after, metadata) => {
    // Your custom diff UI logic
    return <CustomDiffViewer before={before} after={after} />;
  },
  // Override state persistence
  persistState: async (state) => {
    // Send to your custom backend
    await yourAPI.saveState(state);
  },
};

This architecture allows you to integrate Cedar's sophisticated state-management framework while maintaining complete control over your proprietary logic, security policies, and backend integrations.

Simplicity alongside power

Despite the underlying complexity, the basic integration is minimal:

import { CedarFloatingChat } from "@cedar/components";

function App() {
  return (
    <div>
      {/* Your existing app */}
      <CedarFloatingChat 
        tools={yourTools}
        onStateChange={handleStateChange}
      />
    </div>
  );
}

Out of the box, you get:

  • Streaming message rendering
  • Tool call visualization
  • Agentic state management
  • Differential history
  • Approval workflows

This simplicity-with-power balance suggests real production hardening. According to their materials, Cedar was refined through months of implementing AI copilots for actual customers, including multiple Y Combinator companies.

Additional features: the full toolkit

Beyond the core three, Cedar provides:

Mentions: Context-aware system for referencing application data directly in chat. Tag database records, files, or UI components to ground the conversation.

Voice integration (beta): Voice-powered agent interactions. Still in beta, but on the roadmap for ambient AI experiences.

Streaming and tool calls: Standard real-time rendering of AI responses and tool executions, with visual feedback so users know the agent is working.

Flexible UI components: Floating bubble, persistent side panel, or deeply embedded components. Cedar is designed for agents that live everywhere in your application, not just in a corner chat widget.

Security and trust considerations

Giving an AI direct write access to application state requires paranoia and discipline.

Scope every action:

  • Limit state paths the agent can modify
  • Enforce allow-lists for operations
  • Use granular permissions per agent/tool

Human-in-the-loop by default:

  • Start with approval gates on all state changes
  • Graduate to semi-autonomous actions only after proven reliability
  • Keep audit trails for compliance and debugging

Differential history as the safety net:

  • Every change proposal is visible before execution
  • Users can reject, modify, or approve changes
  • Full rollback capability at the interaction level

Observability:

  • Emit structured events: plan, tool call, state proposal, approval, execution
  • Attach correlation IDs across agent runs
  • Build a simple dashboard to replay and inspect sessions

The Cedar approach is not "let AI do whatever it wants." It's "give AI precise capabilities with explicit approval gates and complete auditability."

Production deployment patterns

Based on the architecture, here's a practical deployment approach:

// Minimal production setup
import { CedarRuntime, DiffHistoryStore } from "@cedar/core";
import { PgStore } from "@your-org/state-store";

const runtime = new CedarRuntime({
  stateStore: new PgStore({ connectionString: process.env.DB_URL }),
  diffHistory: new DiffHistoryStore({ 
    retention: "90d",
    auditLog: true 
  }),
  approvalGates: {
    // Require approval for all state writes
    stateWrite: "always",
    // Auto-approve read-only operations
    stateRead: "auto",
  },
  tools: {
    // Register your domain-specific tools
    fetchCustomer,
    updateOrder,
    sendNotification,
  },
  limits: {
    maxStepsPerSpell: 10,
    timeoutMs: 30_000,
  },
});

Rollout strategy:

  1. Start read-only: Agent can query state but not modify
  2. Add write proposals: Agent proposes changes; 100% human approval
  3. Graduate per-workflow: Move specific trusted spells to auto-approve
  4. Monitor and adjust: Track approval rates, rework frequency, user satisfaction

Where this leads: AI-native software

The vision is clear: products that don't just use AI, but are fundamentally AI-native from the ground up. Interfaces that visually reflect the intelligence driving them.

Current state (2024-2025):

  • AI is a feature bolted onto existing apps
  • Chat windows are isolated from application state
  • Humans translate between AI advice and actions

Near future (Cedar's bet):

  • AI is a first-class participant in application logic
  • State access is standard, with robust approval mechanisms
  • Applications become "living" through continuous AI interaction

The philosophical shift: trust and control

This architecture raises profound questions about agency and responsibility in software.

If an AI can read and write state—with diffs, history, and approval gates—where does user responsibility begin and end?

How do we visually communicate the difference between a human-initiated change and an agent-initiated change in the UI?

As applications become more autonomous, designers will need new patterns to show:

  • Intent: Why did the agent propose this change?
  • Confidence: How certain is the agent about this action?
  • Impact: What downstream effects will this change trigger?
  • Reversibility: Can this action be undone, and how?

Cedar's differential history system is a first attempt at making agentic state changes legible and trustworthy. But this is early innings. The full set of UX patterns for "living applications" is still being discovered.

When to reach for Cedar

Cedar is not for:

  • Simple chatbots with no state manipulation needs
  • Read-only Q&A interfaces
  • Demos and prototypes with no production requirements

Cedar is for:

  • AI copilots that need to modify application data
  • Complex multi-step workflows (spells) requiring coordination
  • Production systems where auditability and control are critical
  • Teams that need complete ownership and customization of AI infrastructure

The team behind Cedar offers consultation services for advanced workflows: complex human-in-the-loop systems, agent performance monitoring, and custom state management patterns. They also back their product with a three-month money-back guarantee and claim no customer has ever requested a refund—suggesting that once teams integrate state-aware AI, they can't go back to chat-only interfaces.

Implementation checklist

If you're evaluating Cedar for your product:

Week 1: Proof of concept

  • Install Cedar and integrate the floating chat component
  • Define 2–3 simple state read operations
  • Test the mentions and context system

Week 2: State writes with approval

  • Implement differential history for your data model
  • Add one state-write tool with full approval UI
  • Test the diff visualization with real users

Week 3: First spell

  • Design a multi-step workflow (3–5 steps)
  • Bundle into an atomic spell
  • Measure time saved vs. manual execution

Week 4: Production hardening

  • Add observability: structured logs, correlation IDs
  • Set up audit trails for compliance
  • Define rollback procedures
  • Create a golden eval set for regression testing

Month 2+: Graduate autonomy

  • Move from 100% approval to selective auto-approve
  • Add domain-specific tools and spells
  • Build internal dashboards for agent performance
  • Scale to additional workflows

The bigger picture: a new interface layer

Cedar-OS represents a bet that the next generation of software will have AI deeply woven into the interface layer—not as a chatbot sidekick, but as a state-aware participant in application logic.

This requires:

  • New primitives: state access, differential history, approval workflows
  • New trust models: explicit consent for every agent action
  • New design patterns: visual diffs, spell composition, multi-step coordination
  • New developer tools: component ownership, one-line overrides, full observability

If this vision is correct, every product category will eventually need a Cedar-like layer. The question is whether to build it in-house or adopt a hardened open-source framework.

For teams building AI-native products today, Cedar offers a production-ready starting point—a bridge from isolated chat to integrated copilot, from text advice to direct state manipulation, from the command line to the GUI of AI interaction.

Resources

Visual examples courtesy of Cedar-OS

The chat window era is ending. The state-aware copilot era is beginning. Cedar is one framework helping to build that bridge.