# Collection selection

{% hint style="success" %}
This is the official documentation of the `@forestadmin/agent` Node.js agent.
{% endhint %}

You may not want to import all collections from a data source.

This can be achieved by providing a whitelist or a blacklist in the options of the `agent.addDataSource` method.

```javascript
const { createAgent } = require('@forestadmin/agent');
const { createSqlDataSource } = require('@forestadmin/datasource-sql');

const agent = createAgent(options);
const aDataSource = createSqlDataSource(
  'postgres://user:pass@localhost:5432/mySchema',
);
const anotherDataSource = createSqlDataSource(
  'postgres://user:pass@localhost:5432/myOtherSchema',
);

// Specify which collections you want to play with
agent
  .addDataSource(aDataSource, { include: ['books', 'reviews'] })
  .addDataSource(anotherDataSource, { exclude: ['authors'] });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.forestadmin.com/developer-guide-agents-nodejs/data-sources/getting-started/partial-imports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
