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

> ## Agent Instructions
> Maximem Synap is a managed memory layer for AI agents: it ingests conversations and documents, extracts structured memory, and returns scoped context to the agent at retrieval time.
> The Python and JavaScript/TypeScript SDKs are the supported way to use Synap. Write integration code with SDK calls, not raw HTTP requests.
> Start with the Quickstart: https://docs.maximem.ai/getting-started/quickstart.md. Every SDK method is documented in the SDK reference: https://docs.maximem.ai/sdk-reference/overview.md.
> For requests about adding Vity memory to OpenClaw, Hermes, an MCP client, or a browser, start with the Vity Quickstart: https://docs.maximem.ai/vity/quickstart.md.

# knowledge.describe

> See what your documents can be asked: sources, document counts, and the entity and fact types with their properties and relations.

```python Python theme={null}
await sdk.knowledge.describe(user_id=None, customer_id=None, scope=None)
```

```typescript TypeScript theme={null}
await sdk.knowledge.describe(options?: KnowledgeScope)
```

REST One HTTPS request.

> [!NOTE]
>
> Added in Python SDK 0.9.0 and JavaScript and TypeScript SDK 0.9.0. In TypeScript, pass one options object; every option is accepted in snake\_case or camelCase (`customer_id` or `customerId`). The result is returned as the server sends it, with snake\_case fields, typed as `Record<string, unknown>`.

Ask Synap what it knows in a scope, in a form you can build a [`knowledge.query`](https://docs.maximem.ai/sdk-reference/knowledge/query) from. Call it first: it lists the types you can name as a `target`, the properties you can filter on with the operators each accepts, and the relations you can follow.

> [!WARNING]
>
> Enabled per instance, and needs a Pro plan or above. Where it is not enabled the call raises `ContextNotFoundError`. A plan without it raises `FeatureNotInPlanError`. Each call uses credits.

### Parameters

**user\_id** `string`

The user you ask as. The answer covers that user's documents and client-wide documents, and the customer's documents too when you also pass `customer_id`.

**customer\_id** `string`

The customer you ask as. Without `user_id`, the answer covers that customer's documents and client-wide documents. Not accepted on B2C.

**scope** `dict[str, str]`

The deeper scope level you ask at, as level name to id.

With none of the three, the answer covers client-wide documents only. Use the same ids you use with `context.fetch`.

### Returns

**sources** `list[dict]`

Where documents came from, each as `{"system": ..., "documents": count}`. Only documents with a recorded source appear.

**documents\_by\_type** `dict[str, int]`

How many documents of each [document type](https://docs.maximem.ai/sdk-reference/types-and-enums.md#document-type) the scope can see.

**fact\_types** `list[dict]`

The kinds of fact Synap extracts from documents: `Obligation`, `Commitment`, `Transaction` and `Decision`. Each has `name`, the `document_types` it is extracted from, its `properties` and its `relations` (`PARTY` and `COUNTERPARTY`).

**entity\_types** `list[dict]`

The kinds of entity: the types your instance defines plus the core types. Each has `name`, `core_type`, `properties` and the `relations` your instance declares.

Every property is listed as `{"name": ..., "type": ..., "operators": [...]}`. `type` is `text`, `enum`, `number`, `date` or `bool`, and an `enum` also lists its `values`, for example the statuses of an obligation. `operators` names the conditions `where` accepts for that property.

**limits** `dict`

The limits a query works within: hops, page size and the size of a complete set.

### Example

```python Python theme={null}
from maximem_synap import MaximemSynapSDK

sdk = MaximemSynapSDK()  # reads SYNAP_API_KEY from your environment
await sdk.initialize()

schema = await sdk.knowledge.describe(customer_id="acme-corp")
print(schema["documents_by_type"])
for t in schema["fact_types"]:
    print(t["name"], [p["name"] for p in t["properties"]])
```

```typescript TypeScript theme={null}
import { SynapClient } from '@maximem/synap-js-sdk';

const sdk = new SynapClient(); // reads SYNAP_API_KEY from your environment
await sdk.initialize();

const schema = await sdk.knowledge.describe({ customer_id: 'acme-corp' });
console.log(schema.documents_by_type);
for (const t of schema.fact_types as Array<Record<string, unknown>>) {
  console.log(t.name, (t.properties as Array<Record<string, unknown>>).map((p) => p.name));
}
```

### Raises

* `ContextNotFoundError`: when the feature is not enabled on your instance.
* `FeatureNotInPlanError`: when your plan does not include knowledge queries.
* `CustomerIdNotAcceptedError`: when `customer_id` is passed on a B2C instance.
* `InvalidInputError`: when `scope` is not a flat dict of strings.

### See also

* [knowledge.query](https://docs.maximem.ai/sdk-reference/knowledge/query.md)
* [Query and navigate documents as an agent](https://docs.maximem.ai/guides/agent-query-and-navigation)


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