Details

# Falcon Foundry Skills
[](https://github.com/CrowdStrike/foundry-skills/releases/tag/v1.7.1)
[](https://github.com/CrowdStrike/foundry-skills/actions/workflows/main.yml)
AI coding assistant skills for building [CrowdStrike Falcon Foundry](https://www.crowdstrike.com/en-us/platform/next-gen-siem/falcon-foundry/) apps. Build Foundry apps from a natural language prompt — API integrations, workflows, UI pages, functions, collections, AI agents, and knowledge bases — all scaffolded with the Foundry CLI and deployed to the Falcon console.
## Getting Started
### Prerequisites
- **Foundry CLI**: Install with `brew tap crowdstrike/foundry-cli && brew install crowdstrike/foundry-cli/foundry` (macOS/Linux) or [download for Windows](https://assets.foundry.crowdstrike.com/cli/latest/foundry_Windows_x86_64.zip)
- **CrowdStrike Account**: With Falcon Foundry access
- **Authentication**: Run `foundry login` to authenticate
- **AI Coding Assistant**: Claude Code, Codex, Copilot CLI, Cursor, Antigravity CLI, or any tool that supports loading reference documentation
### Install
| Assistant | Command | Marketplace |
|-----------|---------|-------------|
| Claude Code | `/plugin install crowdstrike-falcon-foundry` | [Anthropic](https://claude.com/plugins/crowdstrike-falcon-foundry) |
| Codex | `codex plugin add crowdstrike-falcon-foundry@openai-api-curated` | [OpenAI](https://chatgpt.com/plugins/plugins_6a8f6d7f7fac819191e3eba5a7a2e0df) |
| Copilot CLI | `copilot plugin install CrowdStrike/foundry-skills` | [GitHub](https://awesome-copilot.github.com/plugin/crowdstrike-falcon-foundry/) |
| Cursor | `/plugins` (CLI) or `/add-plugin crowdstrike-falcon-foundry` (IDE) | [Cursor](https://cursor.com/marketplace/crowdstrike/crowdstrike-falcon-foundry) |
| Antigravity CLI | `agy plugin install https://github.com/CrowdStrike/foundry-skills` | [Google](https://antigravity.google/docs/plugins) |
> [!NOTE]
> **Codex** has two install paths depending on how you signed in. The command above installs from the curated CLI marketplace, which **API-key and Amazon Bedrock** sessions load. If you authenticated Codex with a **ChatGPT** account, that marketplace isn't loaded — instead run `/plugins` inside Codex, search for `crowdstrike`, and install from the results.
All five assistants have been verified end to end: the skills were loaded from a local clone, then used to build and deploy an app to a live Falcon Foundry tenant from the example prompt below.
For local development with Claude Code, use `claude --plugin-dir /path/to/foundry-skills`. These skills follow the [Agent Plugins](https://agent-plugins.org) format and include a `.codex-plugin/plugin.json` manifest for native Codex discovery. See the [blog post](https://www.crowdstrike.com/tech-hub/ng-siem/build-falcon-foundry-apps-with-claude-code/) for a full walkthrough.
<details>
<summary><strong>Install from a local clone</strong> (for development or testing a branch)</summary>
```bash
git clone https://github.com/CrowdStrike/foundry-skills.git
```
| Assistant | Command |
|-----------|---------|
| Claude Code | `claude --plugin-dir /path/to/foundry-skills` |
| Copilot CLI | `copilot --plugin-dir /path/to/foundry-skills` |
| Cursor | `agent --plugin-dir /path/to/foundry-skills` |
| Antigravity CLI | `agy plugin install /path/to/foundry-skills` |
Codex has no `--plugin-dir`. It discovers skills from `~/.agents/skills/` instead, one symlink per skill:
```bash
mkdir -p ~/.agents/skills
for skill in /path/to/foundry-skills/skills/*/; do
ln -s "${skill%/}" ~/.agents/skills/
done
```
`~/.agents/skills/` is a flat, shared namespace: foundry-skills' skill names don't overlap with fusion-skills', so both can be symlinked in together. A marketplace or `--plugin-dir` install namespaces the skills as `crowdstrike-falcon-foundry:<skill>` and sidesteps the question entirely. Edits are live immediately. Restart Codex to re-index.
</details>
## Usage
### Example prompt
This prompt exercises the full skill set — API integration, workflow, and UI:
> Create a Falcon Foundry app for me that has an Okta API integration with openapi. Share its listusers endpoint with Falcon Fusion SOAR. Then, create a workflow that can be run on-demand to email or print the list of users. Finally, create a UI extension that calls the listusers endpoint and displays the results.
### How plugin skill routing works
Repository-backed installs in Claude Code, Codex, Copilot CLI, and Cursor include hooks that ensure the right skills get used. Codex requires reviewing and trusting bundled hooks through `/hooks` before they run. Cursor loads them from `.cursor-plugin/plugin.json`:
1. **`UserPromptSubmit` hook** — Matches an action verb paired with a Foundry noun — e.g., "create a foundry app". Explicit CLI commands and skill requests also trigger it.
2. **`PreToolUse` hook** — When Foundry intent is detected, injects a non-blocking advisory reminder to use the Foundry workflow skill. The assistant can still use all tools normally. The one exception is `foundry api-integrations create`, which is blocked when the OpenAPI spec can't be adapted for Falcon Foundry. In Claude Code, calls to `superpowers:brainstorming` get advice to switch to the Foundry workflow skill when the task is Foundry app work.
3. **`PreToolUse` hook (CLI guard)** — Checks shell commands and flags Foundry CLI commands missing the `--no-prompt` flag (prevents `Error: EOF` failures) and manual directory creation for app structure (prevents invalid `manifest.yml`). It's advisory: it adds guidance to the tool call rather than blocking it, and you'll only see it when it catches a problem. Cursor's shell tool is `Shell`; the guard treats that the same as Claude's `Bash`.
Hooks observe prompts and tool I/O to keyword-match Foundry-specific actions; no data leaves the session.
Local Codex installs made with skill symlinks, and other assistants that do not load bundled hooks, must apply the documented `--no-prompt` guardrails and run the OpenAPI adaptation helper explicitly. Skill-specific helpers live beside their `SKILL.md` files so Agent Skills and plugin installations remain self-contained; this packaging is separate from Falcon Foundry CLI connectivity, which is covered by the sandbox diagnostics in the debugging skill.
## Skills
| Skill | Purpose |
|-------|---------|
| `development-workflow` | Primary orchestrator — coordinates the full app lifecycle |
| `api-integrations` | OpenAPI spec import, auth scheme configuration, SOAR sharing |
| `functions-falcon-api` | Calling Falcon APIs from within Functions (OAuth, SDKs) |
| `workflows-development` | YAML workflow creation, Falcon Fusion SOAR actions and triggers |
| `ui-development` | React/Vue UI pages with Shoelace components and Falcon theming |
| `functions-development` | Go/Python serverless functions with CrowdStrike SDK |
| `collections-development` | JSON Schema data modeling and CRUD operations |
| `ai-agents-development` | AI agents and knowledge bases, plus exposing collections and API operations as agent tools |
| `security-patterns` | OAuth scoping, input validation, content security |
| `debugging-workflows` | Systematic troubleshooting for CLI, manifest, and deployment issues |
| `e2e-testing` | End-to-end testing with `@crowdstrike/foundry-playwright` |
| `app-upgrades` | Upgrade a template-installed app to a newer template version in place |
| `app-audit` | Scan an existing app for documented anti-patterns and fix the safe ones |
| `fusion-redirect` | Declines standalone Falcon Fusion workflow requests and points to the `crowdstrike-falcon-fusion` plugin |
## Architecture
The skills follow a hub-and-spoke pattern. `development-workflow` is the orchestrator that parses your requirements, runs CLI commands for scaffolding, and delegates capability-specific implementation to sub-skills:
```mermaid
graph TD
O["development-workflow<br/>(Orchestrator)"]
O --> UI["UI Development"]
O --> FN["Functions Development"]
O --> CO["Collections Development"]
O --> WF["Workflows Development"]
O --> AI["API Integrations"]
O --> FA["Functions — Falcon API"]
O --> AG["AI Agents &<br/>Knowledge Bases"]
UI -.-> SP["Security Patterns"]
FN -.-> SP
CO -.-> SP
WF -.-> SP
AI -.-> SP
AG -.-> SP
UI -.-> DB["Debugging Workflows"]
FN -.-> DB
CO -.-> DB
WF -.-> DB
AI -.-> DB
AG -.-> DB
CO -.->|"agent tool"| AG
AI -.->|"agent tool"| AG
style O fill:#6366f1,stroke:#4f46e5,color:#fff
style SP fill:#f59e0b,stroke:#d97706,color:#fff
style DB fill:#f59e0b,stroke:#d97706,color:#fff
```
## Use Cases
The `use-cases/` directory contains real-world implementation patterns extracted from [CrowdStrike Tech Hub](https://www.crowdstrike.com/tech-hub/ng-siem/) blog posts:
- API pagination strategies
- Detection enrichment with UI extensions
- LogScale data ingestion from functions
- Lookup table enrichment with 3rd-party data
- Custom SOAR actions
- NGSIEM query export to CSV/JSON
- Publishing certified apps
- And more (see [use-cases/README.md](use-cases/README.md))
## Recommended Companion: Superpowers
These skills pair well with [obra/superpowers](https://github.com/obra/superpowers), which adds structured planning, TDD discipline, and code review workflows. Foundry skills handle the Foundry-specific CLI and platform knowledge while superpowers provides general software engineering best practices.
See [skills/development-workflow/references/superpowers-integration.md](skills/development-workflow/references/superpowers-integration.md) for details on how they work together.
**Note:** The without-superpowers path produces more reliable results because the Foundry skill has full control from the start. Superpowers brainstorming loads first and creates a plan before the Foundry skills are read, which may not follow Foundry-specific patterns.
## Foundry CLI Quick Reference
```bash
foundry login # Authenticate
foundry apps create --name "My App" --no-prompt --no-git # Create app
foundry api-integrations create --name "X" --spec /tmp/spec.json --no-prompt # Add API integration
foundry ui pages create --name "X" --from-template React --no-prompt # Add UI page
foundry ui extensions create --name "X" --from-template React --sockets "activity.detections.details" --no-prompt # Add UI extension
foundry functions create --name "X" --language python --no-prompt # Add function
foundry collections create --name "X" --schema /tmp/schema.json --no-prompt # Add collection
foundry workflows create --name "X" --spec /tmp/workflow.yaml --no-prompt # Add workflow
foundry knowledge-bases create --name "X" --description "desc" --files /tmp/doc.md --no-prompt # Add knowledge base
foundry agents create --name "X" --description "desc" --system-prompt /tmp/prompt.md --expose-charlotte-chat --no-prompt # Add AI agent
foundry apps deploy --change-type Patch --change-log "msg" --no-prompt # Deploy to cloud
foundry apps release # Release to catalog
```
## Troubleshooting
### Skills not invoked
If Claude doesn't use Foundry skills automatically, phrase your prompt with a clear action verb and Foundry noun (e.g., "create a foundry app", "fix the foundry function"). You can also say "Use Foundry skills" at any point to redirect.
### CLI authentication
```bash
foundry profile active # Check current profile
foundry login # Re-authenticate
foundry profile list # List all profiles
```
### Deployment failures
1. Validate immediately after `foundry api-integrations create` (`foundry apps validate --no-prompt`) — Foundry's server-side OpenAPI parser is stricter than `redocly lint` and may reject large vendor specs
2. Run `foundry apps deploy` from the project root directory
3. Check the `debugging-workflows` skill for systematic troubleshooting
## Testing
Three scripts validate skill changes at different levels. All require macOS or Linux (bash).
**Tip:** Wrap long-running tests with `caffeinate -i` to prevent macOS from sleeping mid-run:
```bash
caffeinate -i ./run-ab-test.sh --fresh 5
```
### Hook tests
```bash
./test-hooks.sh
```
Unit tests for the four hook scripts (skill router, superpowers bridge, CLI guard, session start). Fast, no API calls, no Foundry CLI needed. Run after any hook change.
### Skill test (single run)
```bash
./test-skill.sh # 5 runs against local plugin
./test-skill.sh --runs 1 # Quick single run
./test-skill.sh --plugin-dir . # Explicit plugin path (default is ".")
```
Runs the example Okta prompt end-to-end: scaffolds an app, deploys it, and scores the result. Each run takes 5-10 minutes and costs ~5-10M tokens. Results go to `/tmp/foundry-skill-test/`.
### Verify apps (after test-skill)
```bash
SKIP_BROWSER=1 ./verify-apps.sh # Phase 1 only: spec analysis + release
OKTA_DOMAIN=... OKTA_API_KEY=... ./verify-apps.sh # Phase 1 + Phase 2: browser install/uninstall
```
Verifies apps created by `test-skill.sh` or A/B tests — analyzes OpenAPI specs, releases apps, and optionally installs them in the Falcon console via browser automation.
```bash
./verify-apps.sh # Verify test-skill.sh runs (default: /tmp/foundry-skill-test/)
./verify-apps.sh --green # Verify GREEN phase of A/B test
./verify-apps.sh --dir /path # Verify runs in a specific directory
```
### A/B test (main vs local branch)
```bash
./run-ab-test.sh # 5 runs per phase (baseline: main)
./run-ab-test.sh 1 # Quick single run per phase
./run-ab-test.sh 5 --ref v1.0.0 # Compare against a specific release tag
./run-ab-test.sh --no-skill # No plugin vs local plugin (1 run each)
```
To compare against the last release with a fresh baseline, without macOS sleeping mid-run:
```bash
caffeinate -i ./run-ab-test.sh --ref "$(git describe --tags --abbrev=0)" --fresh 5
```
Compares baseline ref skills (RED) against local branch skills (GREEN). The `--ref` flag accepts any git ref (tag, branch, commit SHA) and defaults to `main`. Results saved to `/tmp/foundry-skill-ab/baseline.json` and `/tmp/foundry-skill-ab/optimized.json`. Tokens and cost come from each session's final `result` event, so compare cost per run first; a baseline saved before that change is re-run automatically.
## Contributing
The skills improve every time someone uses them to build an app. If you hit a rough edge or find that Claude struggles with a particular pattern, you can teach the skills to handle it better.
### Use the skills, then improve them
1. Clone this repo and configure your AI coding assistant (see [Getting Started](#getting-started))
2. Try a multi-capability prompt (see [Example prompt](#example-prompt) above)
3. Watch for patterns where Claude struggles, retries, or produces incorrect output
4. At the end of the session, ask Claude to fix the skills directly:
```
What did you learn from this session that could improve the Foundry skills?
Clone https://github.com/CrowdStrike/foundry-skills.git,
create a branch, update the skills with this knowledge, and
create a PR on GitHub.
```
Claude handles the branch, skill edits, and PR creation. Even when Claude struggles to build an app, it usually figures it out eventually. This step captures that learning so the next session is faster and uses fewer tokens.
### Development workflow
1. Clone the repo (see [Getting Started](#getting-started))
2. Edit skill files in `skills/*/SKILL.md`
3. Run `./test-hooks.sh` to validate hooks
4. Test with `./test-skill.sh --runs 1` for a quick end-to-end check
5. Run `./run-ab-test.sh 1` to compare against main before opening a PR
### Release process
Releasing these skills is easy! Just run the following command:
```bash
./release.sh
```
This walks you through a semantic version bump (major/minor/patch), updates the version in `plugin.json`, `marketplace.json`, README badge, all `SKILL.md` files, and the CHANGELOG date, then creates a release branch and PR. After the PR is approved and merged, create a draft GitHub release to tag main:
```bash
gh release create v<version> --target main --title "v<version>" --generate-notes --draft
```
This generates release notes from merged PRs and saves them as a draft. Review and edit the notes at [github.com/CrowdStrike/foundry-skills/releases](https://github.com/CrowdStrike/foundry-skills/releases), then click **Publish** when ready.
After publishing the release, update the marketplaces that pin a snapshot. Build and upload the OpenAI skills-only bundle with `./release.sh --bundle v<version>`, email the Cursor marketplace team to re-index the listing, and open a PR to [github/awesome-copilot](https://github.com/github/awesome-copilot) that bumps the `version`, `ref`, and `sha` of the `crowdstrike-falcon-foundry` entry. `release.sh` prints the exact steps when it finishes.
## Cross-Plugin: Fusion Workflows
`foundry-skills` builds **Falcon Foundry apps** with the full lifecycle: API integrations, UI pages, serverless functions, collections, and workflows wrapped in a `manifest.yml`. When a request is a standalone Fusion workflow (a trigger plus actions that already exist, with no app to build), use the sibling plugin ([fusion-skills](https://github.com/CrowdStrike/fusion-skills)):
```
/plugin install crowdstrike-falcon-fusion
```
The two plugins detect each other and advise the right path. Use `foundry-skills` for the full app lifecycle; use `fusion-skills` for standalone workflows with live action discovery. Neither requires the other to function.
## License
See [LICENSE](LICENSE) for details.
## skills/ai-agents-development/SKILL.md
---
name: ai-agents-development
description: Build AI agents and knowledge bases for Falcon Foundry apps. TRIGGER when user asks to "create an AI agent", "add a Foundry agent", "build a knowledge base", "give my agent documents", "expose a collection as an agent tool", "expose an API operation to an agent", "put my agent in Charlotte", "expose an agent as a tool for other agents", "delete an agent or knowledge base", runs `foundry agents create`, `foundry agents delete`, `foundry knowledge-bases create`, or `foundry knowledge-bases delete`, or needs help with the `ai.agents` / `ai.knowledge_bases` manifest blocks, agent system prompts, agent input/output formats, agent exposure, or agent tool references. DO NOT TRIGGER for Fusion SOAR workflow YAML — use workflows-development. DO NOT TRIGGER for serverless function handlers — use functions-development. DO NOT TRIGGER for designing a collection schema itself — use collections-development, then return here to wire the collection up as an agent tool.
version: 1.7.1
updated: 2026-11-10
tags: [foundry, ai, agents, knowledge-bases, charlotte, agent-tools]
author: CrowdStrike
license: MIT
compatibility: Claude Code >=1.0
metadata:
category: ai
---
# Foundry AI Agents and Knowledge Bases
> Create knowledge bases before the agents that reference them, and scaffold both with the CLI.
> **Part of a suite.** If `development-workflow` has not already run, and this is a new app or its first capability, load the `development-workflow` skill first — it owns the CLI prerequisite check, scaffolding order, and manifest coordination.
An **AI agent** is a Foundry artifact that pairs a system prompt with a model, a set of tools, and optional knowledge bases. A **knowledge base** is a named bundle of files the agent can draw on. Both live under a single `ai:` block in `manifest.yml`.
Agents are the only consumer of knowledge bases. A knowledge base on its own does nothing; a collection or API integration becomes agent-usable only when it is exposed as a tool and named in the agent's `tools` list.
## Build Order Is Mandatory
```
1. Collections / API integrations (if the agent needs them as tools)
2. Knowledge bases → foundry knowledge-bases create
3. Agents → foundry agents create (exposure via --expose-* flags)
4. Hand-edit ai.agents[].model / .tools (no CLI flags exist for these two)
```
**Create knowledge bases first.** `foundry agents create --knowledge-bases X` validates that `X` is already in the manifest and fails the whole command otherwise:
```
agent "my_agent" references knowledge base "X" which is not defined in the manifest
```
The agent directory is rolled back, so nothing is left half-created.
## Naming and Description Constraints
Both artifacts share the CLI's create-time validators, which bite constantly: **names are 5–100 chars** (must start alphanumeric; `kb`, `agent`, `bot` all fail), **descriptions 3–500 chars** when present (`-d "x"` fails), agent names unique among agents and KB names among KBs. KBs are the one asymmetry — `knowledge-bases create` enforces the 5-char floor, but the *manifest* validator accepts a KB name as short as 1 character (and no longer checks the description), so a short name already in the manifest passes `apps validate`. The on-disk directory is a sanitized form of the name (every char outside `[a-zA-Z0-9-_]` → `_`, then leading/trailing `_` trimmed): `--name "Threat Intel Docs"` yields `knowledge-bases/Threat_Intel_Docs/` and records `path: Threat_Intel_Docs`; the manifest resolves files against `path`, never `name`. Full regex/length table: [references/manifest-schema.md](references/manifest-schema.md#shared-validators).
## CLI Scaffolding
Both artifacts support `create` and `delete`. There is no `list` or `edit`. To change an agent beyond the [allowed hand-edits](#allowed-manifest-hand-edits), delete and recreate it, which orphans the deployed copy in AgentWorks (see below).
```bash
# 1. Knowledge base FIRST (--files REQUIRED with --no-prompt; accepts local paths and HTTP(S) URLs).
foundry knowledge-bases create \
--name "Threat Intel Docs" \
--description "Runbooks and IOC references" \
--files ./runbook.md,./iocs.csv \
--no-prompt
# 2. Agent SECOND, referencing the KB by NAME. Plain json needs no schema; json_with_schema needs
# --output-schema pointing at a file named output_schema.json (see below).
foundry agents create \
--name "Detection Triage Agent" \
--description "Triages detections against the runbooks" \
--system-prompt ./prompts/triage.md \
--knowledge-bases "Threat Intel Docs" \
--output-format json \
--expose-charlotte-chat \
--no-prompt
```
`foundry kb create` is a working alias for `knowledge-bases create`.
### Deleting agents and knowledge bases
`delete` removes the manifest entry **and** the artifact's directory. It takes `--name` (matching `manifest.yml`) plus `--no-prompt` (required — an unknown name then fails fast instead of opening a picker):
```bash
foundry agents delete --name "Detection Triage Agent" --no-prompt
foundry knowledge-bases delete --name "Threat Intel Docs" --no-prompt
```
A KB still referenced by an agent cannot be deleted (`cannot delete knowledge base "X": still referenced by agent(s): …`) — delete the agent first, or remove the KB from its `knowledge_bases` list. Empty parent dirs are left behind (harmless). `delete` is local-only: the next deploy leaves the previously deployed agent in Charlotte AI > AgentWorks as an unpublished orphan (recreating under the same name shows two entries), so remove the orphan by hand and match agents at runtime by the IDs in `manifest.yml`, not by name. `foundry apps delete` does remove the platform-side agents.
### The `--system-prompt` value is a path *or* literal text
The CLI reads the value as a file path/URL first and silently falls back to treating it as inline prompt text when that fails — always writing to `agents/<path>/system_prompt.txt`. So a typo'd path (`./prmopts/triage.md`) becomes your entire system prompt with no error. **Always read back `agents/<path>/system_prompt.txt` after creating an agent.** Omitting the flag yields a generic default prompt.
### Input and output formats
| Flag | Allowed values | Default | Paired requirement |
|------|---------------|---------|--------------------|
| `--input-format` | `text`, `json` | `text` | `json` requires `--input-schema`, and the file **must be named `input_schema.json`** |
| `--output-format` | `text`, `json`, `json_with_schema`, `markdown`, `html` | `text` | `json_with_schema` requires `--output-schema`, and the file **must be named `output_schema.json`** (see below) |
Note the asymmetry: `output_format: json` needs **no** schema; only `json_with_schema` does. Omitting the paired schema is caught late at manifest save (`agent "my_agent" input_schema is required when input_format is json`).
> **The schema file name is fixed** — it must be `input_schema.json` / `output_schema.json` in the agent directory (a manifest key naming any other file breaks every CLI command in the app; CLI 2.1.2+ renames the file you pass to `--input-schema`/`--output-schema`), and the bound schema is re-validated against the agent's model at deploy (unsupported keywords like `minimum`/`maximum` surface only in App manager "Show errors"). Full error strings + allowed keywords: [references/manifest-schema.md](references/manifest-schema.md#schema-file-names-are-fixed).
### Keeping a large-JSON agent from bailing to prose or timing out
An agent asked for a big structured object fails two ways: it emits a prose preamble before the JSON (breaking downstream `JSON.parse`), or it runs long enough that the action times out (observed at about 10 minutes). The driver is almost always **output + reasoning volume, not input size** — a large prompt with a small, capped output is fine; a modest prompt asking for an unbounded list is not. Fixes, in order:
1. Impose a hard **output contract** in the system prompt: top-N caps on every array, terse field values, and an explicit "emit only the JSON object — no preamble or explanation before or after it."
2. Lower reasoning volume. A manifest agent has no reasoning setting (see below), so for it rely on 1 and 3. For an agent built in AgentWorks, open its **Agent configuration** page, open the menu, select **Model settings**, and set **Reasoning Effort** lower; a high **Maximum Length** can also cause timeouts.
3. **Split the agent** (per-domain shards + a deterministic merge function) only if a capped single-shot still overflows; a split adds workflow nodes and cost, so exhaust 1–2 first.
4. As a last resort, add a **client-side JSON salvage** in the renderer (drop anything before the first `{` / after the last `}`, then parse) so a stray preamble degrades gracefully instead of blanking the view.
`output_format: json` drops replies that aren't valid JSON, and agents the app creates are app-owned: see [manifest-schema](references/manifest-schema.md#output-format-json-and-long-replies).
## Manifest Structure
Both artifact lists live under one top-level `ai:` key (omitted when empty) — never a top-level `agents:` key. This is a shape sketch, not YAML to copy; the CLI writes the entries:
```yaml
ai:
agents: # ai.agents[]: id, name, description, path, model, tools,
- id: … # system_prompt, input/output_format, knowledge_bases (by NAME), exposure
knowledge_bases: # ai.knowledge_bases[]: id, name, description, encrypt, path, bare-filename files
- id: …
```
System prompts live at `agents/<path>/system_prompt.txt`; KB files at `knowledge-bases/<path>/<file>`. Full annotated YAML + on-disk layout: [references/manifest-schema.md](references/manifest-schema.md#full-worked-example).
## Allowed Manifest Hand-Edits
`model` and `tools` have **no CLI flags**. `foundry agents create` always writes `model: ""` and omits `tools`. Configuring them means editing `manifest.yml` directly.
> **This is a narrow, explicit exception to the plugin-wide rule against editing `manifest.yml`** (which protects the CLI-owned `id`, `path`, `entrypoint`, scopes). The complete list of allowed hand-edits: `model`, `tools`, and `exposure` keys under `ai.agents[]`; a schema key naming the wrong file; and the KB rename in [knowledge-bases](references/knowledge-bases.md#changing-a-deployed-knowledge-base). Leave everything else alone.
- **`model`** — **never invent a model ID** (there's no client-side list, so a made-up ID validates locally and fails server-side at deploy). Nothing supplied → leave `""` (platform default). User named one → write it verbatim and note it's only checked at deploy; don't guess a "close enough" ID. Already set → leave it.
- **`tools`** — a list of `<type>:<reference>` strings, not validated client-side. See below.
**No other tuning knobs exist in `manifest.yml`.** Manifest agents have no temperature, maximum length, or reasoning settings (agents built in AgentWorks set those under **Model settings**), and knowledge bases have no chunk size, embedding, similarity, or `top_k`; indexing is server-side. Never add such keys to the manifest. Tell the user those settings aren't available.
## Agent Exposure
`exposure` controls where the agent can be reached from. Unlike `model` and `tools`, it **does** have CLI flags, so prefer setting it at create time:
| Flag | Manifest key | Effect when `true` |
|------|--------------|--------------------|
| `--expose-charlotte-chat` | `charlotte_chat` | Agent is reachable from Charlotte chat |
| `--expose-agent-as-tool` | `agent_as_tool` | Agent can be invoked as a tool by other agents |
| `--expose-workflow-system-action` | `workflows.system_action` | Agent is published as an app-scoped Fusion action |
Three behaviors worth knowing:
- **No flag means unreachable, even by your own app.** With no `--expose-*` flag the `exposure` block is omitted entirely when nothing is exposed (the same as all three `false`) — an absent block is correct, not a missing default to "repair" — and no workflow can call the agent. For an agent used only by this app's automations, pass `--expose-workflow-system-action` alone; it stays out of Charlotte chat. Call it from the app's workflows as `ai_agents.<agent name>`, never a generic LLM action with the prompt copied inline ([workflow-invocation](references/workflow-invocation.md)).
- **`ai_agents.<name>` binds only to an agent in this app's `ai.agents` block.** The alias resolves against that agent's manifest `name`, nothing else. An agent already in the CID but not in this app's manifest (one built in Charlotte AI > AgentWorks, say) has no manifest entry, so `ai_agents.<its name>` resolves to nothing. A workflow can reach such an agent only by its resolved `<uuid>_<cid>` action ID, which differs in every CID, so the workflow won't port. To make it portable, recreate it as a manifest agent (a new, app-owned copy, not a link).
- **An AgentWorks agent must be published before a workflow that references it deploys.** Only published agents are exposed to Falcon Fusion SOAR, so referencing an unpublished agent's `<uuid>_<cid>` fails deploy with error code 2015: `(2015) action with <uuid>_<cid> does not exist`. Publish first: after that failure the app's deploys keep failing (`Dependent artifact failed (400)`) until you use a fresh app.
- **`--expose-agent-as-tool` requires `--input-schema`.** A calling agent needs a declared signature; the check runs before any files are written (`--input-schema is required when --expose-agent-as-tool is set`), and the same rule is enforced on the manifest, so hand-adding `agent_as_tool: true` without an `input_schema` breaks every subsequent CLI command in the app.
- **Nothing else here is validated client-side.** The CLI ignores unknown keys, so a misspelled `exposure` key raises no error and vanishes on the next CLI save.
Adding or removing exposure after create means editing `manifest.yml`; there is no `agents edit`.
## Agent Tool References
Each `tools` entry is `<type>:<reference>`. The artifact must be exposed on its own side *and* named here — one without the other produces an agent that silently cannot call it, with no error at validate or deploy.
| Target | Entry |
|--------|-------|
| App collection | `action:collections.<collection_name>.<Operation>` |
| Agent runtime collection | `action:mcp/gce/collections:collections:generic:<Operation>` |
| API integration | `action:mcp/gce/integration:<integration id>~<hash>` (its platform tool ID) |
Any other form fails the whole deploy, usually with a bare `500`. A concrete `tools` entry (note the required `action:` prefix) looks like:
```yaml
tools:
- action:collections.triage_notes.CreateObject
```
An API-integration tool ID exists only after the integration deploys, so deploy without that entry, look the ID up, then add it. See [manifest-schema](references/manifest-schema.md#tool-reference-format).
Valid collection operations — exact casing required:
`CreateObject`, `GetObject`, `DeleteObject`, `ListObjects`, `SearchObjects`
The generic collection is a scratch collection the platform creates for the agent at runtime. Use it for agent working memory; use a named app collection when the data must outlive the agent or be readable by other capabilities.
Exposing the target artifact on its own side — the collection `--agent-tools-expose` flag and the API-integration `x-cs-operation-config.agent_tools` block — is covered in [references/manifest-schema.md](references/manifest-schema.md#exposing-an-artifact-as-an-agent-tool) (and owned by `collections-development` / `api-integrations`). No other artifact type supports agent-tool exposure, and no `tools` form reaches a function or workflow. To pair an agent with a function, have a workflow call `ai_agents.<name>`, then a function action ([workflow-invocation](references/workflow-invocation.md)).
## Invoking an Agent from Code
Charlotte chat and the app's own workflows (`ai_agents.<agent name>`) invoke an agent for you. Calling the agent definition API yourself (from a function or the UI) has one thing the API reference does not spell out:
- **`credit_cents_limit` has an undocumented floor of `100`.** Lower values are rejected with a `400`, so budget in whole credits.
## Common Pitfalls
| Symptom | Cause | Fix |
|---------|-------|-----|
| `must be at least 5 characters long` | Name under 5 chars at create | Lengthen the name; `kb` and `agent` are both too short |
| `invalid value for --description` | Description under 3 chars | Write a real description or omit `-d` |
| `references knowledge base "X" which is not defined` | Agent created before its KB | Create the KB first, then re-run the agent command |
| `flag --files is required when --no-prompt flag is used` | KB create without `--files` | KBs must ship at least one file |
| `input_schema is required when input_format is json` | Format/schema mismatch | Pass the paired `--input-schema` |
| `--input-schema is required when --expose-agent-as-tool is set` | Agent exposed as a tool with no declared signature | Add `--input-schema`, or drop the exposure flag |
| `input_schema is required when exposure.agent_as_tool is true` | Hand-added `agent_as_tool` to an agent with no input schema | Add `input_schema` to that agent, or set the flag back to `false` |
| `flag --name is required when --no-prompt flag is used` | `delete` without `--name` | Pass the artifact name as it appears in `manifest.yml` |
| `still referenced by agent(s): Y` | Deleting a KB an agent still lists | Delete the agent first, or remove the KB from its `knowledge_bases` |
| `file <name> already exists` | Re-running KB create over existing files | Delete the file or the KB directory first. As a deploy `409`: see [knowledge-bases](references/knowledge-bases.md) |
| System prompt is a file path string | Typo'd `--system-prompt` path fell back to inline text | Read back `agents/<path>/system_prompt.txt` |
| KB file missing after deploy | The packager ignores any path containing `svg` (any case), not just `.svg` files | Rename it; convert SVGs to PNG |
| `must be a filename only, not a path` | Subdirectory in a KB `files` entry | Flatten — KB directories cannot nest |
| Agent cannot call an exposed collection | Exposed but not listed in `tools` | Both sides are required |
| Bare `500` from deploy, agent has `tools` | An entry isn't in a form from Agent Tool References | Fix the entry |
| `output_schema must be "output_schema.json"` (or `input_schema …`), or `output schema is required when using JSON format` at deploy | Schema file misnamed, or an inline schema | Name it `output_schema.json` / `input_schema.json` under `agents/<path>/`; see [manifest-schema](references/manifest-schema.md#schema-file-names-are-fixed) |
| Deploy `Failed` with `output schema … uses unsupported schema keyword …` in App manager "Show errors" | Keyword the agent's model provider rejects (`minimum`/`maximum`, for example) | Drop it, state the constraint in `description`; see [manifest-schema](references/manifest-schema.md#schema-file-names-are-fixed) |
| `model <id> does not support structured output` at deploy | `json_with_schema` on a model without it (newer Claude models such as Opus 4.7+ and Sonnet 5+, and Nemotron) | Use `output_format: json` for that agent, or a model that supports it (`openai.gpt-5.5` does) |
| Two agents with the same name in Charlotte AI > AgentWorks | `agents delete` + redeploy left the old platform-side agent unpublished | Delete the orphan in the console; match agents by the IDs in `manifest.yml`, not by name |
| Deploy fails with `model <id> is not available`, and still fails after setting `model: ""` | Model IDs are CID-specific, and a failed deploy leaves the pinned model on the platform-side agent | Pick an ID from `/agentic-studio/queries/models/v1` in that CID, or remove the agent and create it again |
| `400` when invoking an agent with `credit_cents_limit` | Value below the undocumented floor | Pass `100` or more |
| Deploy fails with Falcon Fusion SOAR `(2015) action with <uuid>_<cid> does not exist` | Workflow references an AgentWorks agent that isn't published yet | Publish the agent in Charlotte AI > AgentWorks, then deploy. For the other cause of 2015, see [workflow-invocation.md](references/workflow-invocation.md) |
| Agent's JSON won't `JSON.parse`, or the action times out (observed at about 10 minutes) | Prose preamble before the JSON, or output/reasoning volume too high (not input size) | Output contract (top-N caps, terse fields, "no preamble"); for an AgentWorks agent, lower **Reasoning Effort** in **Model settings**; split only if still overflowing; client-side JSON salvage as fallback |
## Reading Guide
| Task | Reference |
|------|-----------|
| KB sourcing, encryption, packaging, changes after deploy | [references/knowledge-bases.md](references/knowledge-bases.md) |
| Full field-by-field schema, every validation error string | [references/manifest-schema.md](references/manifest-schema.md) |
| Product docs: Falcon Foundry AI capabilities overview | [AI Capabilities](https://docs.crowdstrike.com/access?ft:originId=ce325bab) |
| Product docs: agents via the CLI | [AI agents (Foundry CLI)](https://docs.crowdstrike.com/access?ft:originId=d82146c3) |
| Product docs: knowledge bases via the CLI | [Knowledge bases (Foundry CLI)](https://docs.crowdstrike.com/access?ft:originId=l69669e4) |
## Related Skills
- `collections-development` — schema design for collections used as agent tools
- `api-integrations` — OpenAPI spec work, including `x-cs-operation-config`
- `workflows-development` — Fusion workflows that call the agent as `ai_agents.<agent name>`
- `security-patterns` — prompt-injection surface review before exposing an agent to Charlotte
- `debugging-workflows` — deploy and validation failures
## skills/api-integrations/SKILL.md
---