Skip to main content

Use an AI agent

Have your AI agent handle this for you with this skill.

Build an app

Building with a coding agent

Claude
Authored by Claude ยท Last updated AI generated documentation written by reading the source code
self-hosted

A coding agent can build a working Cardinal app from a description of what you want, because everything it needs is published in a form it can read: this site, the API specification, and a skill that walks it through the build.

The skillโ€‹

Give your agent this prompt:

Fetch https://cardinalapps.io/skills/build-a-cardinal-app.md and follow it to help me build an app on Cardinal.

The skill is a one-time setup for a new project. It makes the agent:

  1. Ask what you want to build, from a small single-purpose app to a full one, and check it against what Cardinal can do.
  2. Check the backend it needs is in place: your Media Server, the media it uses, and any cloud service. If something is missing, it tells you where to fix it and stops.
  3. Have you create a personal access token, and keep it out of the code.
  4. Download the API specification and set up the project's foundations: configuration, an API client, permissions, and a health check that must pass.
  5. Write an AGENTS.md for the project, so every later session knows how it works and where this documentation is.
  6. Hand off. From then on you keep building with your agent as usual; you do not run the skill again. If you do, it notices the project is already set up and offers to continue instead.

The skill holds the process and the safety rules, and nothing about the API itself. It sends the agent to this site for every fact, so it stays correct as the API changes. As you build, the recipes cover the behaviour Cardinal's own apps get right, such as playback and the queue, and a remote connection for use away from home.

Before you startโ€‹

  • A running Media Server that the machine running the agent can reach. See the Quick Start.
  • Owner or administrator access to that server, to create a token. If someone else owns the server, ask them for a token for your account.
  • Media indexed on the server, so the app has something to show. See Indexing.

Consider creating a separate user for the app, with only the role it needs, and creating its token for that user. An agent testing the app can then only reach what that role allows.

Machine-readable documentationโ€‹

Point any agent or tool at these:

ResourceURL
Index of this site, for language modelshttps://help.cardinalapps.io/llms.txt
How agents should use this sitehttps://help.cardinalapps.io/agents.md
Any guide as MarkdownAppend .md to its URL, e.g. https://help.cardinalapps.io/guides/diy-apps/authentication.md
Recipes for the behaviour Cardinal's own apps implementhttps://help.cardinalapps.io/guides/diy-apps/recipes.md
The API specificationhttps://help.cardinalapps.io/openapi/media-server.json
The specification for one server's versionhttp://<server>/api/docs-json

Was this article helpful?

Use an AI agent

Have your AI agent handle this for you with this skill.

Build an app