Overview
Chainloop can automatically collect AI agent configuration files during the attestation process. This creates aCHAINLOOP_AI_AGENT_CONFIG material that captures how agentic development tools are configured in your project, providing visibility and policy enforcement over AI tool usage in your software delivery lifecycle.
The collector currently supports Claude configuration files, with support for additional AI agents planned for future releases.
How it works
When you pass the--collectors aiconfig flag to chainloop attestation init, the CLI scans your project for known AI agent configuration files. The discovered files are bundled into a single CHAINLOOP_AI_AGENT_CONFIG material and automatically included in the attestation (no manual attestation add step is required).
The material is named ai-agent-config-<agent> after the agent that was discovered — for example, ai-agent-config-claude for Claude configuration files.
The collected material includes metadata about the agent, a hash of the overall configuration, timestamps, and details about each discovered file.
Collected files
Theaiconfig collector currently looks for the following Claude configuration file patterns:
Support for additional AI agents beyond Claude will be added in future releases.
Material schema
TheCHAINLOOP_AI_AGENT_CONFIG material follows this structure:
Enabling the collector
1
Initialize the attestation with the collector
Pass the The CLI will scan for AI agent configuration files and report what it found.
--collectors aiconfig flag during attestation initialization:2
Continue the attestation as normal
Add any other materials required by your contract and push:
Contract example
While the collector automatically attaches the material, definingCHAINLOOP_AI_AGENT_CONFIG in your contract allows you to attach policies to it:
contract.yaml
Built-in policies
Chainloop ships with built-in policies for AI agent configuration governance. Attach them to your contract to start enforcing best practices immediately — no custom Rego required:
To use a built-in policy, reference it by name in your contract:
Writing a custom policy
You can also write custom Rego policies to enforce rules on the collected AI configuration. The following example checks that the agent name isclaude and produces a violation otherwise.
check-agent-name.yaml
valid_inputchecks that the material contains anagent.namefield, skipping evaluation if the schema is unexpected.- The
violationsrule fires whenagent.nameis anything other than"claude", producing a descriptive error message.
Testing the policy locally
Use the policy development CLI tools to validate your policy before deploying it:Related resources
- Material Types — Full list of supported material types
- How to write custom policies — In-depth guide on writing and testing Rego policies
- Policies concept — How policies work in Chainloop
