Skip to main content
Keep Agents, Environments, Automations, Memory Stores, and Vaults in git and sync them with checkfu apply. The CLI must be connected to your deployment.
agents/support.md
environments/cloud.yaml
memory_stores/reports.yaml
vaults/support.yaml
automations/report.yaml
Preview the plan, then apply it:
The first apply creates the resources and writes checkfu-lock.json. Commit the lock file so later runs update those same resources instead of creating duplicates. Omit schedule for an on-demand Automation. An Automation can reference an Agent or Environment by ID or by a file path relative to the Automation definition. A local path can be longer than a resource ID. To pin a local Agent version, use agent: { path: ../agents/support.md, version: 2 }.

Files

Each file describes one resource. The schemas follow the create requests for Agents, Environments, Automations, Memory Stores, and Vaults. Apply rejects unknown fields. In Markdown files, YAML frontmatter holds the structured fields. The Markdown body fills system for an Agent, description for an Environment, or a single user.message in initial_events for an Automation. checkfu apply identifies each file’s kind from a type field, its parent directory (agents/, environments/, automations/, memory_stores/, or vaults/), or its kind prefix in the filename. Unclassified files such as README.md are skipped.

References

An Automation file can reference local files in place of resource IDs. agent: ../agents/support.md points at the version this apply creates or confirms. Editing the agent moves the Automation to the new version on the next apply. To pin a specific version, write { path: ../agents/support.md, version: 3 }. An Automation can mount a Memory Store and attach a Vault by relative path, as shown above. The paths resolve to the IDs recorded by apply. Use the Vault credential API to add or rotate tokens. Project files and locks carry resource configuration and IDs. For Memory Stores and Vaults, the file describes the desired metadata map. Removing a key removes it from the resource. Omit the map or supply {} to clear it. Direct API updates treat metadata as a patch. Omission preserves it, a null value removes a key, and a null map clears all metadata. The lock tracks each resource’s ID and a configuration fingerprint. Apply checks that configuration again before changing a Memory Store or Vault. If the server configuration changed, the operation reports a conflict. Review the current resource and rerun the preview. Archive these resources explicitly when they are no longer needed.

Validate and edit

agent info validates a single agent file offline and prints what apply would send. Editors with yaml-language-server can load the JSON Schema served by your deployment at $CHECKFU_BASE_URL/schemas/apply/agent.json, environment.json, automation.json, memory_store.json, or vault.json, as shown in the comment above.

Flags

To archive a Memory Store or Vault, use its archive command. After it is archived, apply --prune removes the missing file’s lock entry. If someone edits a resource outside git (for example, in the Dashboard) after the last apply, checkfu apply refuses to overwrite it with Remote configuration changed. Copy the change into your file, or pass --force to replace it. Each lock file is tied to one base_url. To target a second deployment, pass a separate lock file with --lock-file checkfu-lock.staging.json.

Check synchronization in CI

Run this with a POSIX shell and jq from the project root, using its committed lock file and the intended deployment connection. The job passes when the preview contains at least one row and every row is unchanged.
project-drift.sh
The preview reflects the deployment at the time of the check. create and update identify pending changes. Changed rows are printed as JSON with their action and file. Review blocked rows before applying. skipped can indicate a tracked source file missing from the checkout. A failed preview keeps the original CLI exit status.

Export from the Dashboard

In the Dashboard, open an Agent and click Export as code. The download contains agents/<name>.md and a checkfu-lock.json already linked to that Agent: