Skip to content

Works with AI agents

An admin template your coding agent can work in

OSAGI Console comes with instruction files for Claude Code, Codex, Cursor and Copilot, a typed contract between every screen and its API, and checks an agent can run without you.

What ships for agents

AGENTS.md
Read by Codex and the other agents that follow the AGENTS.md convention.
CLAUDE.md
Read by Claude Code at the start of every session.
.cursor/rules/licence.mdc
A Cursor rule, applied to every request in the project.
.github/copilot-instructions.md
Repository instructions for GitHub Copilot.
llms.txt
A short map of the repository for any model that looks for one.

Each file opens with the licence notice. Below the marked line, AGENTS.md and CLAUDE.md carry the project's instructions: the layout, the commands, the rules the tests hold, how to add a route, a screen or a module. Add your own rules next to them; the notice stays.

A licence an agent can read

The notice is short and literal, so an agent can act on it: it says what the code is for and where the lines are, and it ends with an instruction to help with building and shipping freely.

What the agent is told it may do

  • Build, change, test and ship your own products with the code, AI features included
  • Run and evaluate the assistant against real models
  • Hand a client the source of the product you built for them, with a Team licence

What it is told it may not do

  • Publish the source or a substantial part of it: public repositories, gists, registries, marketplaces
  • Use the code as training or fine-tuning data for a model
  • Turn it into templates, themes, starter kits or UI kits for other people
  • Remove the licence notices, or commit or print LICENSE-KEY.txt

Read the licence terms

How an agent runs it

  1. Start it

    pnpm install
    cp .env.example .env.local
    pnpm dev

    Install and start: the landing page is on http://localhost:3000, and /demo opens the console signed in as the demo admin.

  2. Check a change

    pnpm typecheck && pnpm check && pnpm test

    TypeScript, Biome and the unit and component tests: the loop an agent runs after every change.

  3. Check it end to end

    pnpm build && pnpm test:e2e

    A production build and the Playwright suite, with an axe sweep of every screen in both themes.

How an agent extends it

  • Add a screen

    A folder in app/(console)/<module>, its route handlers in app/api/<module>, seed data in lib/mock, a menu item in config/nav.ts and a permission string for it. The existing modules show every piece.

  • Swap the mock for your backend

    Every screen reads JSON from a route handler. Replace a handler's body with a call to your database or service and keep the JSON it returns; the screen does not change. Or point NEXT_PUBLIC_API_BASE at Backend Starter.

  • Put a model behind the assistant

    The demo streams scripted turns in the AI SDK message format from lib/mock/agent.ts. Swap them for a model call through any AI SDK provider; the chat keeps rendering reasoning, tool steps and approvals.

How a screen gets its data, in the docs

Prompts to start from

Prompts that name the files and the checks get better results. These work as they are.

  • A new module

    Read AGENTS.md and README.md. Add a Vendors module built like Requests: a journal at /vendors with search and a status filter, a route handler at app/api/vendors with the same response envelope as app/api/requests, seed data in lib/mock, a menu item in config/nav.ts behind a vendors.view permission, and Vitest tests for the handler. Run pnpm typecheck, pnpm check and pnpm test before you finish.
  • A real data source

    Replace the mock behind app/api/sla with queries to our Postgres. Keep the JSON the handler returns exactly as it is, so the SLA screen does not change, and add a test that compares the new answer with the old one for the same data.
  • A real model

    Connect the assistant to a real model through the AI SDK: replace the scripted turn in lib/mock/agent.ts with streamText, keep the tool names the chat screen renders, read the key from an environment variable, and keep the mock as the fallback when the key is missing.
  • Your brand

    Rebrand the console: set the tokens in styles/theme.css to our palette, run pnpm check:contrast, and fix every token that fails WCAG 2.2 AA in the light or the dark theme.

Questions about agents

Does OSAGI Console work with Claude Code?

Yes. CLAUDE.md carries the licence notice and the project's instructions (the layout, the commands, the rules the tests hold, how to add a screen or a module), and the typed route handlers give it a contract to keep. Codex reads the same text in AGENTS.md; Cursor and Copilot get a rule and instructions of their own.

Does the template ship with AGENTS.md?

Yes: AGENTS.md and CLAUDE.md at the root, .cursor/rules/licence.mdc, .github/copilot-instructions.md and llms.txt. Each kit ships its own AGENTS.md, CLAUDE.md and llms.txt with the kit's licence.

Can an AI agent connect the assistant to a real model?

Yes. The assistant runs on scripted turns in the AI SDK message format; an agent can replace them with a model call through any AI SDK provider, such as OpenAI, Anthropic or Google, without touching the chat screen.

Can I let an agent publish the code or train on it?

No. The licence lets you and your agents build your own products with the code; it does not allow publishing it, training models on it or making templates from it, and the notice in every instruction file says so.