> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Manifests

> Explicitly register agent configuration for version tracking when auto-detection isn't enough.

A **manifest** is the deterministic fingerprint of your agent at a point in time — its tools, prompts, models, sub-agents, and output schema. DecimalAI auto-detects manifests for OpenAI Agents and LangChain. Use `register_manifest()` only when you need full control or use a custom framework.

See the [Manifests guide](/guides/manifests) for the conceptual model.

***

## `decimalai.register_manifest()`

Explicitly register an agent's configuration for version tracking.

```python theme={null}
result = decimalai.register_manifest(
    agent_name="travel-planner",
    tools=[
        {"name": "search_flights", "schema": {"type": "object", "properties": {...}}},
        {"name": "book_hotel"},
    ],
    prompts={"system": "You are a travel planning assistant."},
    models={"default": {"provider": "openai", "model": "gpt-4o"}},
    subagents=[
        {"name": "flight_agent"},
        {"name": "hotel_agent"},
    ],
    version_label="v2.1",
)

print(f"Manifest: {result['manifest_id']}")
print(f"New version: {result['is_new']}")  # True if a fresh manifest row was created
```

<ParamField path="agent_name" type="str" required>
  Name of the agent.
</ParamField>

<ParamField path="tools" type="list[dict]">
  Tool descriptors: `[{"name": "...", "schema": {...}}]`.
</ParamField>

<ParamField path="prompts" type="dict">
  Prompt templates: `{"system": "..."}`.
</ParamField>

<ParamField path="models" type="dict">
  Model configs: `{"default": {"provider": "openai", "model": "gpt-4o"}}`.
</ParamField>

<ParamField path="subagents" type="list[dict]">
  Sub-agent references: `[{"name": "flight_agent"}]`.
</ParamField>

<ParamField path="output_schema" type="dict">
  Output contract JSON schema.
</ParamField>

<ParamField path="version_label" type="str">
  Human-readable version label (e.g., `"v2.1"`).
</ParamField>

<Note>
  For OpenAI Agents and LangChain, manifests are **auto-detected** from your agent configuration. Use `register_manifest()` only when you need full control or use a custom framework.
</Note>

**Returns** the backend registration response (a `dict`):

<ResponseField name="status" type="str">
  Always `"ok"` on a successful registration.
</ResponseField>

<ResponseField name="manifest_id" type="str">
  ID of the manifest row this config resolved to.
</ResponseField>

<ResponseField name="manifest_hash" type="str">
  Deterministic content hash of the manifest — identical configs hash identically.
</ResponseField>

<ResponseField name="version_label" type="str">
  The human-readable version label, echoed back.
</ResponseField>

<ResponseField name="is_new" type="bool">
  `true` only when a fresh manifest row was created. A re-register of an unchanged config dedups and returns `false`.
</ResponseField>

<ResponseField name="components" type="int">
  Number of manifest components captured across all surfaces.
</ResponseField>

<ResponseField name="compatibility_report_id" type="str | null">
  ID of the generated compatibility report, or `null` if none was produced.
</ResponseField>

***

## `decimalai.flush_manifest_for_ci()`

Register the manifest as a regression-check candidate and write its ID for the next CI step to read. This is the helper your CI init script (typically `init_for_decimal.py`) calls under `DECIMALAI_MODE=manifest_only`, after building the agent. It requires a positional `agent_name`.

```python theme={null}
import decimalai

decimalai.init(api_key="dai_sk_...", openai_agents=True)
agent = build_agent()  # your existing agent factory

# agent_name is REQUIRED (positional). Calling with no args raises TypeError.
decimalai.flush_manifest_for_ci(
    "travel-planner",
    tools=[{"name": "search_flights", "schema": {"type": "object"}}],
    prompts={"system": SYSTEM_PROMPT},
    models={"default": {"provider": "openai", "model": "gpt-4o"}},
)
```

Components are taken from what you pass, not from global SDK state: supply `chain=` (below) or the explicit `tools` / `prompts` / `models` dicts, otherwise you register an empty manifest and every later PR diffs against nothing.

The manifest ID is written to (in order): the `output_path=` you pass, else `$GITHUB_OUTPUT` if set (appended as `decimal_manifest_id=<id>`, the standard GitHub Actions mechanism), else `./decimal_manifest_id.txt` in the current directory. An explicit `output_path` therefore *overrides* the GitHub Actions handoff — the Action itself only auto-discovers `$GITHUB_OUTPUT` and `./decimal_manifest_id.txt`, so if you write somewhere else, pass that ID to the Action's `candidate-manifest-id` input yourself. The path actually used comes back as `output_path` in the return value.

<Warning>
  Inside GitHub Actions `$GITHUB_OUTPUT` is **always set**, so branch 2 always wins and `./decimal_manifest_id.txt` is never written. And `$GITHUB_OUTPUT` is **per-step** — the file the next step sees is a fresh one, so the Action's auto-discovery finds neither source and stops with *"No candidate-manifest-id provided or discoverable"*. Give the step an `id:` and pass
  `candidate-manifest-id: ${{ steps.<id>.outputs.decimal_manifest_id }}` to the Action explicitly.
</Warning>

You can also let `flush_manifest_for_ci` introspect a LangChain/LangGraph agent instead of passing component dicts:

```python theme={null}
decimalai.flush_manifest_for_ci("travel-planner", chain=agent)
```

See the [Regression Check guide](/guides/regression-check) for the full CI setup.

***

## What's next

<CardGroup cols={2}>
  <Card title="Evaluations" icon="check-double" href="/sdk/python/evaluations">
    Push scores onto traces and read back the verdict.
  </Card>

  <Card title="Manifests guide" icon="book" href="/guides/manifests">
    Conceptual deep-dive on what a manifest is and how diffs work.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.